Diff EQ Wars title screen

Diff EQ Wars title screen

My final project for the Python summer course was “Diff EQ Wars”, a game/simulation of units on a battlefield using graphics from Advance Wars. It uses ordinary differential equations for the motion and health of the units, with terms based on certain conditions (i.e. is the unit near an enemy? / is the unit near a base? / is the unit in a forest? / etc).

You can find it here, along with the other programs I wrote for that class. It was written in Python 3.1 and requires pygame.

Diff EQ Wars combat simulation screen

Diff EQ Wars combat simulation screen

It can be seen as a simulation or a game, in the sense that if you don’t tell your units (the blue units) to do anything, they’ll go around doing their own thing. You can click+drag to select units and right click to tell them where to go, and this simply adds a term on to their equations for motion. The red and blue circles, which can be turned on and off, indicate a unit’s attack range (or in the case of a medic, heal range). If a unit is within an enemy’s attacking range, it loses health based on how many friendly units are nearby and how many enemy units there are. Units can return to bases to restore health (and in the case of a medic, healing supplies). Units move slower in forests and mountains, but forests offer more defense.

Diff EQ Wars map editor screen

Diff EQ Wars map editor screen

There is also a map editor in which the player can create a custom scenario to run through. Maps are saved and loaded using a text file.

Diff EQ Wars help screen

Diff EQ Wars help screen

A help menu is included with all the documentation regarding the equations used, controls, game mechanics, etc.

Overall, I think it turned out pretty well. I ended up getting an A in that class, so hooray!

Tagged with:
 

Comments are closed.