Sunday, February 15, 2015

Year 15 - Day 46

Progressing nicely on adding Mineral Deposits and Prospecting to the game. A ship can currently scan a planet square from orbit and get a report of what it found. Next up will be a ship landing on the planet square and Prospecting the deposit as long as there is a crew member with the Mining skill.

Thursday, February 12, 2015

Year 15 - Day 43

I've been pushing at least some code every day for the past week or so. In the last day or so I've mostly been working on Admin functionality. I added the ability to randomly create asteroid fields based on the density given when I create them. This leads me to needing to be able to also randomly generate mineral deposits at the same time, so that functionality is coming next.

I've also been doing a lot of pondering on the current Combat code. I'm going to go ahead and integrate the current combat into the game after I figure out how to make ships surrender. I'll still have to tweak weapon accuracy and damage to shorten things up a bit, but it's getting close to being ready.

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.