Thursday, February 5, 2015

Year 15 - Day 36

I've been away from the game for quite a while. There's various reasons for that, but I'm slowly getting back into it again. My current job has me programming again on a daily basis with Java, so my coding habits have gotten better recently. As a result, I see that my code base for the game is a horrendous mess. I should have made an effort to use objects, but I didn't and at this point I'm not going to try to go back and fix that. I am, however, in the process of doing a lot of tedious code remediation that will make my life a lot easier in the future.

In the process of this, I'm finding a lot of bugs I didn't know about. I'm also avoiding the Combat code for a bit, although I have been looking at it again. The next step I need to do for combat is to decide how and win a ship surrenders.

The easiest example to consider here is a starting ship vs. any armed ship. So I'm thinking it will go something like this:

1. Armed Ship(AS) begins combat against unarmed Newbie Ship(NS).
2. Friend vs. Foe lists are checked.
3. If no ships come to the aid of the NS, a Morale Check will immediately happen. If it fails, NS Surrenders.
4. If it passes the MC, the NS will Flee since it is Unarmed.
5. After one round of combat, the NS will know how fast the AS is.
6. If the NS is faster, it will continue to flee.
7. If the NS is slower, it will Surrender. This will also apply if the NS gets damaged and becomes slower than the AS in later rounds.

No comments:

Post a Comment