Towerfall Ascension


Goal

Recreating a level of a 2D arcade game of my choice as closely as possible in a provided framework as an exam assignment. The only restriction is that all of the following components are present: Moving camera, Sprite animations, Gameobject interactions, enough mechanics from the game to implement, A hud and UI and lastly, Sound.

Starting point

  • The base of the project is a custom SDL-based framework meant for 2D games given by the teachers. All the game functionality had to be added by me.

Introduction

Before I landed on Towerfall Ascension as a game to make, I had some trouble making a choice, as I don't usually play 2D games like the assignment required. I did not want to settle for an easy game because of this, but I also had to make sure that I could find the sprites I would need for the game. After doing some digging, I eventually went with this game. It has most of the required components, except the moving camera, as it is a static level. I would need to implement that myself in some way.

There is also the possibility to add some more optional components, such as an additional level and a particle system, but those should only be implemented after the required parts.

Title Screen

The Game

After gathering the necessary sprites, I built the level and got the level collisions in order. Camera was up next, and since the level I was going to make only has a static camera, I decided to add a zoom, which would mimic the effect of a moving one.

Later on, I realised the level selector map was too big to fit on the screen properly, so I also added the moving camera there, centered on the selector arrow.

Up next was the player character. Due to the amount of different player states present, I had to rewrite and refactor the controller a few times to get it as clean as possible. The arrows the player fires are removed from the quiver and have to be picked up again to be used again.

Map Screen

Once I got that working, I started on the enemies. Initially, I wanted to create a more advanced AI for both the ghost and the slime, but that turned out to be out of scope for this project, so I went with a more rudimentary version.

The slime always moves forwards, when it hits a wall, it turns around and then goes back to moving in the direction it's looking. The forward motion temporarily stops when it falls of a ledge. When the player gets near however, the slime will start chasing them until it loses sight.

For the ghost, I set up a few random points over the whole map, and connected them together in a graph system. The ghost moves randomly between those points until it sees the player, at which point it will start chasing them, like the slime. The ghost has one additional perk; it can dodge an incoming arrow of the player if it can see it. After that the ghost becomes confused and cannot dodge for a while.

The game also provides a chest with powerups at the end of each level. The powerups I added were extra arrows and a shield, which can block one hit.

Once the other key features of the game were pretty much done, I created the UI, which includes a main menu, an options menu to change the sound volume and the level selector map, which I mentioned earlier. Afterwards, the only thing left to do was to add the music and sounds to the various game objects and menus.

As extras, I added in a particle system to have a fire effect on the torches, and the ability to load a level from a file, including how many and which enemies are in each wave.

Conclusion

So far, this assignment is one of my favourites. I really enjoyed working on this project, despite not being able to do everything I wanted to, such as adding multiple levels, I am really happy with the end result and learned a lot during the development. This project was written before learning about the game programming patterns, so there are a few areas in the code that would need to be rewritten if I were to completely rewrite this project or start a similar project one day.

Sources

Of course, I did not create any of the sprites or the music/sounds, nor do they belong to me, all belongs to Maddy Makes Games Inc.
I found the sprites on Spriters-Resource , and the sounds are extracted from the game itself.