Tip o’the Day™ 3: Use Lists to Stay Focused

Tip o’the Day™ 3: Use Lists to Stay Focused

I needed a break after writing the giant two-part series on fog of war so I decided that this week will be a light productivity tip: maintaining focus by using lists.

I don’t mean linked lists or anything else programming-related. I mean an actual, tangible list of things that need to be done. It seems really common sense but I’m still surprised at how effective they are for keeping one’s mind focused.

Read this article…
How To: Implement a Fog of War – Part 2 – Smooth

How To: Implement a Fog of War – Part 2 – Smooth

A standard feature of real-time strategy- and tactical games is what’s called a “fog of war”. The term comes from traditional warfare and it tries to describe the situational awareness experienced by participants in military operations. What that means in game terms is that the fog of war covers everything that’s not within sight range of units or buildings. The entire map is covered in darkness and the units and buildings have a ‘sight circle’ that reveals the map immediately around them. As the units traverse the level they reveal more of the terrain. This feature is probably best known in the WarCraft series of games.

If you have ever wanted to implement such a feature in your game, I’ll show you how. It’s a lot easier than you might think. In this last part of a two-part series, I will describe how to implement a “Smooth” fog of war. (My favorite!)

Read this article…
How To: Implement a Fog of War – Part 1 – Chunky

How To: Implement a Fog of War – Part 1 – Chunky

A standard feature of real-time strategy- and tactical games is what’s called a “fog of war”. The term comes from traditional warfare and it tries to describe the situational awareness experienced by participants in military operations. What that means in game terms is that the fog of war covers everything that’s not within sight range of units or buildings. The entire map is covered in darkness and the units and buildings have a ‘sight circle’ that reveals the map immediately around them. As the units traverse the level they reveal more of the terrain. This feature is probably best known in the WarCraft series of games.

If you have ever wanted to implement such a feature in your game, I’ll show you how. It’s a lot easier than you might think. In this first of a two-part series, I will describe how to implement a “Chunky” fog of war.

Read this article…
Tip o’the Day™ 2: Commit Often

Tip o’the Day™ 2: Commit Often

I will assume that you’re using a revision control system of some kind. If you’re not, you really, really need to. Even if you’re the only person on the project, you need to use something. Whichever system you use, be it Subversion, CVS, Git, etc., there are a few subtle, but significant differences in how you use it that can have a tremendous impact on productivity. I’ll show you a few techniques on how to use your system more effectively.

Read this article…
Don’t Make Me Think

Don’t Make Me Think

When it comes to reading code (mine or someone else’s, it doesn’t matter; reading is reading), I have a really short attention span. I don’t want to spend a lot of time analyzing the code to figure out what it’s doing. I want to treat the code just like the sun: glance to get a sense of it, and then look away.

This is especially true when debugging. Most of the time you spend debugging is trying to find the cause of the problem. Once you have found the cause and collected your data/evidence, the actual task of fixing the problem is pretty trivial. When I debug, I’d like to instantly know what the code is doing. Any extra time I spend figuring out what the code is doing is really annoying, even if it’s just a few seconds.

Here are some things I’ve learned over the years that could help you save time. Some might see this as another “coding style” article, but it really isn’t. It’s merely a list of things you can do when writing code to help you in your debugging efforts.

Read this article…