Search This Blog

Sunday, July 6, 2014

Captain Zero Development: Destroyed all my fighter1 code

I had fighters that were able to dogfight the player the same way they did in the old version, but as soon as I tried to put on an efighter2 code I realized I had violated the most basic rules of object oriented programming... encapsulation and inheritance!  I might want to make 10 types of fighters and there's no reason to make separate dogfighting behaviors for each rather make one really good and configurable dog fighting set of logic and tweak it for each type.  Things like "boldness" and "aggressiveness" can be quantified by how near they got before they start dodging or running away...

Whenever I've scrapped or lost something and had to re-do it completely, it's turned out better.  Whether the dog or computer ate my homework... I had to start over and the final result turned out to be much cooler.  So here I go.

No comments:

Post a Comment