Tower Defence in a Week

Tower Defence in a Week

2021, Dec 03    

I recently gave myself the challenge to design and create a game within a single week. I know, it sounds like very little time, and I’ll get to that. First, I want to describe the game.

The game itself still has the working title “Modular Tower Defence” as I ran out of time before I came up with a better name. It does the job but it isn’t very glamorous. The game is a relatively standard tower defence game apart from one major gimmick: there is only one pre-made tower. The player must purchase chips that modify capabilities and design their own towers.

I’ll be going through the different mechanics that I implemented, so if you’d like to play it first, please do.

It’s available here

The design process

I came up with the idea for the game days before I started thinking about any kind of challenge. Growing up I played tons and tons of Adobe Flash based tower defence (TD) games since I couldn’t really afford to buy games. Even though it’s not a genre I play a lot nowadays, I still enjoy a Sanctum 2 session once in a while. So there I was, I wanted to make a TD game, but I knew that what I considered the “standard” TD game would not excite me. I started thinking about what could make it more interesting and introduced the idea of scrapping pre-made towers and letting the player design their own.

First design sketch

I understand that reading a sketch without any labels is a futile mission, so I’ll try to describe the session during which it was drawn up. I wrote to a fellow game developer from uni and asked if he could play my rubber ducky for a little bit. After some gentle convincing and an offer to give him 50% of the profits (if any should roll in) he agreed and we got into a Discord call. By a miraculous coincidence (I think) another game dev colleague from uni showed up to say hi. Fast forward two or so hours and we’ve discussed our way to a few key points required for the MVP. I’ll let you figure out where in the sketch the points are pictured.

  • A map where enemies follow a set path from a spawn point to a player owned base
    • enemies should take damage from towers and do damage to the player owned base
  • Modules for the foundation, body, head, and barrel of a tower
    • player purchases these in a shop with money dropped from enemies
    • player applies them to towers by dragging a chip onto a circuit
  • Player should have perfect information to be able to prepare for incoming waves

The gameplay

Main game loop

Pictured in the gif above is the main game loop that I managed to produce. The player checks what enemies are coming, places a tower, waits for the enemies to die, and collects the money. As you can see, the second wave has more and harder enemies which is the pattern that follows throughout the game. I started with this part of the game in my implementation. Placing towers, point of view, and enemy movement felt like challenges that i just had to overcome for this to become a TD game.

Buying and using modules

Which brings us to “the gimmick”. The gif above shows how the player purchases a module and then applies it to a tower. Even if the UI isn’t perfect, I’m really happy with how it turned out. I learned a lot about sharing data between objects and how to make interactable UI in an interesting way. I’m sure that if I gave it to one of my artist friends, it would look good as well.

So what about the challenge?

Right, the challenge.. The reason I wanted to challenge myself to do it in a week was that I never finish projects. I have tons of them going at a time, 9 or so currently, but they never seem to get to the end. Making prototypes that stay unfinished is draining for morale, and so I needed to do something to change that. Being on the other side of the challenge, I would say that I accomplished what I set out to do. I made a working game in a week, and it’s in a state where I can say that I’m proud of it. I do recommend trying something like this.

However..

I don’t recommend setting the limit at a week unless you want a major challenge. For most of my friends, and for most people that will read this, I would at least give it two weeks and allow yourself to work fewer hours per day. I ended up spending 6 hours a day on university studies, after which I got home and spent 6 hours a day on game development. That was too much, at least for me. Be reasonable with yourself even though it’s a challenge, give yourself some breathing room.

If you decide try it I wish you good luck. I would love to see what you end up creating, so if you dare to share, please write to me at kimmakesgames@gmail.com or @ me on twitter.

Thank you for reading! //Kim