Well, made some good progress tonight in between watching tv..  Screenshots at the bottom of the post.. but you have to read it all.. come on.. it takes what, a couple minutes? =D

Lets see.. first off, ships that are manually targetted, now only target those targets.. I still need to go back and check whether they just sit there idle after their target is sunk.. We also added in fleeing combat tonight.. that was a job.. since the fled ships kept wanting to stay in the fight and fire back.. =D  Ships that are fleeing CAN be fired upon, and since I have the ability in the shipyards to upgrade their sails, well, the better the sail, the faster they get out of harms way.. The chance of whether or not they can flee or not is based on several factors in the game, including their sails, the enemy fleet stats, etc etc etc… Fleeing ships also take less damage, and are harder for the enemy to hit.. 

On the opposite side of that, a ship of yours thats preparing to try to board an enemy ship, well, its a bit easier for them to hit it!!

After that, we updated everything so that enemy ships no longer fire on your ships that have sunk.. or have already fled.. they still fire on sinking ships, just to make sure they stay sunk.. ;)  

I did run into one bug which tormented me for an hour.. it seemed that with all my changes, the enemy fleet could never sink all of your ships.. it always left 1 floating.. grrr… my stupid mistake in generating my random targets.. fixed.. 

Now, since the ship class in the main game already has a ton of data associated with it, I’ve decided im not going to add all the combat variable to that class, but rather maintain a seperate ‘encounterShip’ class.. It will easy to just duplicate the current ship list into encounterShips.. I think this will make my wrapup after combat a bit easier to deal with.. we’ll see.. 

Also, since i need to keep log entries of things that have happened, im not deleting ships from the shipLists when they’re sunk.. they just go inactive.. this will make it easier to reconcile the 2 lists after combat is over, figure which ships safely fled, which sunk, etc etc.. and update all our log entries, etc. In my head, I can see how it works.. and it works perfect..

What else tonight.. Oh yea.. we have all of our particles being drawn along with all our cannonballs.. the framerate dips during combat, but at the same time, there’s no player input or anything during this period, and I have a ton of stuff being drawn.. A big part is my moving water and the way I had to do that.. it might help if i just ‘suspend’ the water during the actual combat.. that will improve framerates a lot.. I think…

Cannon sounds.. yep, the cannons now actually sound off when they’re fired..

Also in preparation for boarding, dumping cargo, etc.. I added in a bit on the HUD to show your CCC stats.. your cannons, crew and cargo.. that will help you to make your decision about which ship might be boarding another, which is better to attack, etc.. 


Now, on to the stuff to do… this is just my short term list:

 

 

handle dumping cargo overboard… and then build in some code to see if any enemy ships are intrigued by the cargo your dumping and are too busy trying to pick it up to fight back.. 

handle the boarding routine, targeting which ship to board, preventing other ships from having boarding selected, etc.. only 1 ship can attempt to board another per combat.. once set to board, that ship is too busy preparing to do anything else during this encounter.. 

Something I really need to do is to figure out what to do if a player decides to hit the back button mid combat… I dont know how I want to handle that. This isn’t a game where if you dont like your move you just made, you can hit back and try again.. there are consequences.. So i need to figure out how to handle all of that.. 

Next up on the agenda, we modify our orders screens so that only ships that are alive and havent fled can be ordered.. Right now, even sunk ships and ships that have fled (since im not deleting them) think they can be ordered about.. Which leads to another issue.. if you dont flee, combat works fine and ends with one or the other sides is sunk.. But if you have ships that flee, well, combat doesnt end.. those ships are still ‘alive’ in the background.. and I have to rework that..

Finally in the near future, I need to add in some kind of random fleet generation.. The enemy fleets aren’t static.. Their size, capabilities, etc all need to be based on what the player has in his or her fleet.. this way the fights are relatively equally matched.. Theres a lot of factors to take into account here, and as I type this, it gives me some ideas.. First choosing a basis for the fleet.. big ships.. med.. lots of small.. and then flesh it out from there.. See? the blog even helps me figure out how to do things.. 

Anyways, thats enough rambling for tonight.. its 2:15am, time to add in the screenshots, and call it a day.. 

 

New HUD and Order Entry System

New HUD and Order Entry System..

Still a work in progress…

 

Just a combat shot...

Just a shot.. Mid Combat.. :)

Need to work on the drawing of the cannonballs.. I dont like em..