mobile tower defense

Well, it’s break time again. After a long day of debugging the crazy networked asynchronousity that is my current project, taking a break to find a solution to a strange jabberd error (xml where whitespace matters is dumb, btw), and then copy-pasting individual frames of an animation into a SWF… my eyes are bleeding. Well, not quite, but I’ve been staring at the screen way too intently today.

So naturally, I don’t close them. I read Sean Howard’s design of the day (#23, the linear roguelike brawler rpg) and get to thinking about something that’s been floating around the back of my brain for a while.

I’ve wanted to write a tower defense style game for a few months now, but couldn’t ever really think up a twist that I liked.

For those who’re tuning in late, Tower Defense is a style of RTS play where you build stationary defensive towers that blast an (often) endless stream of dumb enemies that are trying to capture your base. The specifics vary, sometimes the mobs have AI, sometimes they have special features, etc… but that’s the gist of it.

Warcraft 3 provided what were probably the first true TD scenarios. They’ve since been copied hundreds of different ways. There are lots of good TD games out there now. Lots of good TD games out there written in Flash, even. Some of my favorites:

  • Flash Element TD – The first one that really grabbed my attention. Fairly straightforward, but stable and enjoyable.
  • Onslaught – Very free form. Only 3 types of offensive towers, but they can be upgraded and chained together and create an amazing variety of interesting strategies. Onslaught also has a big leaderboard that not only shows other people’s high scores… but their final tower layout so you can learn from them.
  • Desktop TD – Insanely free form. There is no track for the mobs to follow. They just sort of A* their way across the board. Very well designed and intuitive. I love the art and npc design, I love the UI. It’s also the game I find the most difficult out of the three.

So… if I am to design my own TD game (eventually to possibly maybe even be written in AS3), there are a few absolutely essential features that we need to start with:

  1. A mute button. 😛
  2. SharedObject preferences. I want the game to remember that I don’t like noise. I want it to remember my name for the high score list, I want it to remember any other important UI preferences.
  3. The ability to increase the flow of mobs. Either with a simple “send next wave now” button or with a Lemmings style throttle that simply increases the rate of spawn flow.
  4. The ability to see valuable information. These games really just come down to a lot of numberchasing, so we may as well give the numberchasers a lot to work with. I want to be able to get status reports on any mob on the screen. I want to know more than just the range of my missiles, I want to know their rate of fire and their blast radius, etc…
  5. The ability to pause the game and still see this valuable information. This isn’t Tetris where getting a paused snapshot of the puzzle is cheating.
  6. Intuitive UI design. It should not require a degree in astrophysics or a magnifying glass or a cheat sheet in another browser window to figure out how to do things.
  7. Gentle learning curve. The game should be accessible to the newcomer. You should be able to just sit down and play without having ever seen another game in the genre – or without having paid much attention to the instructions if you read them at all.
  8. Depth. Finally, the game should not become boring easily. Just because it was easy to pick up and learn doesn’t mean it should be juvenile or lacking in options.

mobile world

As one way of addressing the last of these problems (depth), I like the idea of multiple stages where you have to rebuild your base from scratch after each phase – bringing a portion of your resources and your tech tree across with you. Ie, you don’t stare at the same exact layout for 200 consecutive waves… you may only have to (get to) stay on the same board for 10 waves.

Or, taking a page from the design of the day, what if the game was a running battle?

So, in stead of spending 10 waves on one board, you are playing on one continuously enormous board, but can only defend part of it at once. After every wave, your board may shift by one or two tile widths. There are plenty of thematic possibilities for this. Terraforming, plague of toxic spores/zombies/tribbles, etc… the actual theme isn’t terribly important.

When a tower you own moves off of the board, you should get a refund, say for 75% of its total cost. There would be an option to destroy units you do not want before they scroll off, but at a penalty – perhaps you only get 50% of the cost back when you sell them off impatiently. Units should not build immediately, however, and if you cancel a build before it completes, you will get a full refund.

mobile enemies

I would like the battlefield to be open to allow multiple paths for enemies who are trying to get past you. There should not be a single linear/winding/curvey path that they trudge along mindlessly. I’d like them to flow.

It would be nice if enemies were given sufficient AI to make some basic danger assessments in addition to simple shortest-path calculations. I’m thinking that the baseline AI should be standard A* style pathfinding with toggleable risk avoidance behavior for some varieties of mobs.

It would be nice if they weren’t 100% predictable. Predictable? Yes. Highly predictable once you know the rules? Certainly. But not guaranteed. It’s no fun if the mobs are too smart. But there does need to be some small amount of nondeterminism to mob behavior – at least for certain types of mobs. Some mindless drones are required and appreciated – it’s not as fun if the mobs are all smart either.

Mobs should spawn along the entire front, not just at a single predictable point. You should have to protect a broader area than a single tower can cover alone. You should be able to take advantage of choke points and ways of forcing the mobs into places that they might not otherwise willingly flow.

There should be different varieties of enemy. Their most fundamental attributes should be clearly identifiable to the player (intuitive icons would be nice). There should be multiple traits that npc’s may have in combination with each other:

  • Speed – Some mobs are naturally slow, some are naturally faster than others. Making something naturally slow might combine in interesting ways with other special traits.
  • Resistance – Some mobs are naturally resistant (or weak) to one type of damage or another. Demons might calmly walk through your flamethrower batteries without taking any damage, and mummies might go up in smoke at the mere site of them.
  • Offense – Some mobs fight back. Some mobs might have passive offense – maybe those demons have fiery auras around them that burn towers they walk past. Some might be aggressive and care more about battering down your towers than progressing across the map. Most mobs should only fight if cornered, however, and should probably just flow around towers in stead of trying to carve their way through.
  • Aversion – Some mobs do not fight back, they run away. They’re scared of fire. Not necessarily weak to it. Heck, they could be resistant or even immune. But when a fireball hits them, they run away screaming for a while 😉
  • Modes of Transport – Some mobs walk, some fly. Some should be capable of swimming. I want water on my maps. Some mobs might be capable ONLY of swimming. Maybe some mobs ‘blink’ every few steps.

There are probably a few other special attributes to add to the list. “Boss” mobs should be more interesting than just a single creep with 100x normal hp. Give them something that makes them a truly unique challenge to overcome.

mobile “towers”

This kind of take the concept of “tower” defense a bit far… but what if towers weren’t necessarily stationary? Granted, most games in the genre are about building static defenses and living with your mistakes. Allowing you to field mobile infantry starts getting much closer to a traditional RTS after all.

What I would like to see are some (not all, very few in fact) of your units having some sort of mobility themselves. They are still fire-and-forget defenses. You don’t give them orders once deployed. They have their own AI that they follow, just like any other tower, even if it is slightly more involved.

Mobile units would be chained to a central home location and will return to it if otherwise unoccupied. When the mobile unit’s anchor point scrolls off of the map, the unit unspawns just like any other “tower”.

Mobile units would have to sacrifice something in order to become mobile. The most obvious example to me is that perhaps you have a unit that has decent mobility but has terrible range. It does comparable damage to similarly priced immobile towers but has to run in between targets to kill things.

Some other uses for mobile towers might be non-offensive units that attempt to herd mobs for you (gravity guns, fear, or just maybe just physically pushing them around). Perhaps repairbots can be placed in the middle of a group of towers that they will then help maintain. Maybe one mobile unit is a glue monster that paints its entire area of influence with sticky traps that render mobs immobile for a time. Maybe a mobile unit taunts and kites creeps to keep them occupied while other towers can finish them off.

mobile objectives

Every TD game I’ve ever played has the same goal. Whack the foozles before they get to point X. Sometimes you have some time to kill them after they reach point X, but otherwise the goal is the same.

Since our viewport is moving, it doesn’t necessarily make sense that our goal should simply be to kill everything that comes onto the screen – though that’ll probably be a large portion of the game.

I like the idea of occasionally hitting special parts of the map where you have an objective to perform. These objectives may or may not be required, but I think most will be mandatory. That is, if you fail in the objective, the game is over.

The first objective type that I can think of at the moment is the acquisition and protection of some sort of third party object on the map. These might be pieces of technology that will improve your tech tree. They might be large caches of resources that will allow you to field more units. Or, they may be hostages or similar that need to be rescued and led to safety.

Other objectives might be the destruction of a large stationary target, such as an enemy base. The object could also be a dam that would flood the map below you, seriously altering the flow of mobs; or, it could be a wall that is preventing your progress.

And there you have it. My “mobile” tower defense idea in a nutshell. Maybe one day, I might even think about it again, but for now, it’s back to copy-pasting sprites 😉

Leave a Reply

Your email address will not be published. Required fields are marked *