Handling Edge Cases – Literally

Game #2 is coming along quite well and as it is getting farther along I am running into certain design decisions. One of these is what to do when a player’s little drone gets to the edge of the map.

Why have a limited map size at all?

If you take a look at 10 things every game needs, you will notice that #3 on that list is the need for Interaction. Limiting the map size keeps a player from just flying away from their opponent for forever and no interaction happening.

What are the options?

After taking another look at Steambirds, they used 2 different approaches between their web version and their iPad version.

In the web version, if you get close to the edge, there are stationary turrets that destroy your little airplane as it flies off the edge. So option 1 is to destroy anybody who flies off the edge.

In the iPad version, the game prevents you from flying off the edge and makes your airplane sort of slow down and turn sharper so that you cannot fly off the edge. So option 2 is bend the movement rules near the edge of the map so that players can’t fly off.

Option 3 that I came up with, and the one I went with, is to allow the player to move outside of the map, but sort of do a 180 degree flip and bring them back at the edge of the map. I borrowed this idea from Star Fox which I spent many hours playing on my old N64.

Why choose that option?

First of all, it is a really easy option to implement. Just check if the next control waypoint is outside of the map and set it to just inside the edge that you crossed.

Second, I don’t like the idea of destroying the player if they go past the edge on a small map like I am using.

Third, I think it will allow for a little extra Strategy (number 7 in our list of 10 things games need) for players to flip around on the edge of the map.


When you are thinking about how to handle edge cases in a game, consider all of your options then ask yourself which one will make the game better and why.

Keep being awesome and making games.

I Want to Be a Better Developer