Predator of the Pond is a small project I decided to work on, in order to sharpen my skills and try out something new. The game is based off of an old game - the concept isn't new. The game is simple - you're a fish and must eat smaller fish. When you do, you grow. Larger fish will kill you if you collide with them.
I created this game in C# XNA and built and used a library alongside this (Screen Management Library), so I could easily add new screens and controls into the game. I created the background graphics, however I used the fish image from a freely available website.
One of the large parts of the game was how to get a good collision detection. If I just used the bounding areas for detection, transparent sections would overlap and trigger a collision, even if the fish hadn't. I originally tried per pixel collisions, but realised it likely wouldnt be the most efficient because of different scalings of the fish. I decided to make the collision box half the dimensions, and centred in the middle of the fish. In addition this way you'd be killed from colliding with a fin.
On creating the game over screen, I decided it would be comical to dramatise the death of the fish. I added a poem and some sad violin music, which makes a contrast to the default, happy music.
View this on GitHub