Flyover

Created: July 12, 2019

Technologies used

Python isn't the first programming language you think of when it comes to computer game programming, but it's capable of doing it. After working along with a tutorial series creating an RPG game in Unity with the C# language I decided I'd rather work in Python.
There were all kinds of tutorials online, but most of them involved sprites moving on a still image of a background. I wanted to do something a bit different, so I went off on my own and figured out how to make the map move with the camera staying focused on the player.

I had a tonne of fun making sprites in Gimp, recording my own sound effects, and dusting off my trigonometry skills to model all the velocities and angles of things. The people I've shown it to have all had a laugh with it, it's good fun for at least 10 minutes :D

I got to the point where the concept is finished, but there's too much work to do to keep going with it than I want to give it.

I still remember Flyover as the project that was my aha moment with Object orientated programming. Each of the enemy planes was an object, and instance of a class with it's own speed and position. Those planes all inherited from a base Plane class and tweaks were made to the attributes and methods to create the player and different kinds of enemies.
Often the behavior of the different objects flying around was confusing. This project is the first time I really dug into the testing capabilities of Python's Unittest. Being able to create tests that either passed or failed to test the motion of the planes, the different angles involved and tweaking code until the tests passed and I had the specific behavior I was expecting was another aha moment.

Try it

pip3 install flyover-game
flyover

What I learned through this project

  • Object orientated programming fully clicked writing this game
  • Class inheritance
  • My first real use of tests and test driven development
  • How automated testing can give a sense of confidence in developing and refactoring code