Hey all! I'm new to Gosu, so please feel free to offer any constructive criticism to anything I've done, but I hope you'll check out and like my little program:
Github source: https://github.com/nicklink483/combat
Windows distribution via Ocra: https://drive.google.com/file/d/0BxnPriYofgPDLXJsOEE5dzQzU2s/edit?usp=sharing
It's a evolution sim that has little teensy tanks that run around and kill each other and have kids whose attributes are slight mutations of their parents.
When a tank has a "child" the child pops up randomly on the screen somewhere.
I haven't put the controls in the game yet, so here they are:
Return (menu) - select menu option
Down (menu) - change menu selection
Up (menu) - change menu seleciton
R - Reset simulation
P - Pause simulation
E - Output data of simulation to console including info on oldest tank, youngest tank, and tank with most kills
Esc - Return to menu
Space - Populate sim with 5 new random tanks
+ (numpad) - (experimental) make tanks larger (up to 5x)
- (numpad) - (experimental) make tanks smaller (down to 1x)
Basically a tank is a set of instructions (turn right, turn left, move forward, fire) and it passes on those instructions to it's children. A 'child' is born randomly and put somewhere on the screen but inherits behaviors with modification and color. So if you see a bunch of green tanks on the screen, those tanks have more well-suited "genes" to survival.
I was messing around with nearest-neighbor bitmap scaling, so you can make all tanks bigger or smaller with the plus and minus keys on your numpad. This has no effect on existing tanks, just new ones spawned after you've pressed + or -.
If you watch for a while you'll begin to notice certain behaviors get selected against, like moving too much. I didn't impose any kind of equilibrium rate of existing tanks or a death rate, those are emergent properties.
Thoughts? Comments? Bugs? Features? Let me know!