Holy crap I almost wrote Defense. -slaps self-
Sorry for missing the past couple days, I’ve been pretty busy. The unnamed tower defence is about halfway complete, so we’re basically on schedule. I thought I’d do a bit of a dev diary for the game while I have the time.
Today I’m going to write a bit about map creation and turrets. These two things, along with enemies, make up the foundation of Tower Defence games. Are you excited? Are you ready? Let’s go:
The map in a tower defense is incredibly important. It dictates what path the enemy follows, where you can and cant place your turrets, and how the player strategizes. Often, the map design will be the single factor that makes or breaks a tower defence. Some games combat this by providing a large number of maps. Others keep it short and provide a handful of well designed, diverse maps. We’re going for the second option, with the intent of making a fun minigame in less than two weeks.
For this game, I’ve set the enemies to execute a script upon creation. This script runs a switch function that checks what room the enemy is in, and sets a path depending on that. The code is pretty simple, it looks like this:
Hey, that was easy!
I’ve set the turret placement (almost typed tourette) to a 32×32 grid. This means that each tower fits into one of many ‘slots’ alongside the path. This keeps turret placement clean and allows the player to strategize easier. Sometimes giving the player too many options stifles their creativity. Keep it simple stupid.
In a game type called “Tower Defense”, you’d think towers are pretty important. In this game, we’re calling the towers ‘turrets’, because… they are. You’ll understand better when we show a screenshot or two. Anyways, the game features 8 different turrets. 4 are ice, 4 are fire. Ice turrets deal normal damage to fire enemies, and very little to ice enemies. The same goes for fire turrets, but reversed. Each wave is either normal, fire or ice. Normal enemies are weak to both fire and ice, the poor fools.
This polarity system introduces a new type of strategizing that forces you to place both fire AND ice towers in equal amounts, while at the same time using the individual status effects of the various towers to their fullest potential. For example, you can place a slow tower (ice) next to your fire turrets, and even if the next wave is ice and your slow tower won’t deal much damage, it will still provide support by slowing down the enemies while your fire turrets pick them off. TEAMWORK! RUN ON SENTENCES!
Each element has 4 tiers of turrets. Obviously, tier 4 is stronger than tier 1, but don’t count tier 1 out just yet. Each tier has its strengths and weaknesses. Maybe a single enemy is about to run smack-dab into your base and you have only a little bit of money left. Place a tier 1 turret and BAM, that enemy is gone. If you try to win with only tier 4 turrets, you’ll probably lose pretty quickly.
As the waves progress, you’ll notice that some enemies drop upgrades. These upgrades can be dragged on top of your turrets to give them permanent upgrades, like “more money per kill” and “more damage”. Be careful, though. These upgrades are scarce and can’t be removed. Choose carefully.
That’s all for tonight, everyone! It’s nearly midnight and I need to get some sleep so I can greet the day with a smile on my face. Or something. I’ll detail enemies and some other things when I get the opportunity. Look forward to future updates!