It turns out that what I have been calling “Fuel” to this point was really intended to be the “Capacitor.” But I decided that I wanted the ship to have fuel as well as a capacitor. So I changed everything in the code that had been fuel to the capacitor and then added the real fuel. 🙂
So why both? Good question! The original idea was that ships would have a finite amount of fuel. The fuel would be consumed by a power plant and converted into energy that would charge a capacitor. Then, all the ships components that require energy would draw it from the capacitor.
Once the ships fuel is consumed, the capacitor, and eventually shield, will completely drain and the ship will be totally helpless.
Up until now I had just implemented the capacitor and assumed that the ships had infinite fuel. Mainly because there was no way for the to get more fuel.
I was talking it through with my brother and what I think I am going to do is have destroyed ships “drop” fuel. When another ship collides with the fuel, they will be able to refill their fuel stores.
I really like that for a couple of reasons. First, it kind of closes the loop on the in game economy which is based on fuel and fuel consumption. Second, it helps motivate more aggressive game play. After all, we really don’t want players to just sit back and do nothing!
The other thing I may add is a “Life Support” component. The reason being that it will always consume a very small amount of energy. That way, if a player is just sitting somewhere they will still burn through at least a little bit of fuel.
We’ll see, maybe I will add that later. Right now Lasers are next on the feature list!