July 26 — Where I’m At

Well, here we are so far. A lot of work has been completed since the last progress report.

  • Voice recording and mastering is all done. That’s right. Every single line has been edited and made to sound like it’s coming over radio, so it’s all campaign-ready. I really enjoyed working with the individuals who were nice enough to offer their voice acting talents. (Finding enough actors was something I was initially concerned about, but many people were very willing to spend a half hour or so working with me to bring my characters to life. I’m very grateful for that.) There were a lot of bloopers filled with jokes and curse words. It made the editing process (which took hours upon hours) very entertaining.
  • The first 3 campaign missions have been built. These are shorter missions intended to gradually introduce features and familiarize the player with the controls, and are thus fairly simple. The remaining missions will be longer, but will probably be built quicker as I develop momentum (and gain familiarity with my own game engine…funny how that works). I have to say, it is incredibly exciting to see the action and hear my characters come to life in the way I imagined.
  • Various game play improvements. The targeting system has been improved, the computer players are smarter, bugs are being squashed…the list goes on.

Currently, my priority is getting the campaign finished. Building the missions not only advances the game towards completion, but also reveals bugs in the engine and helps identify game play issues.

Here is a screenshot from the third mission, Incursion, where a simple assault goes awry and the player’s forces are ambushed by the Coalition.

The player provides support during a mission to destroy a series of enemy network satellites.

The player provides support during a mission to destroy a series of enemy satellites.

Until next time.



July 5 — Where I’m At

It’s only been a week since my last update, but there’s been a lot of good progress. I’ll keep this quick since there’s a few other things I’d like to tackle this evening. So, here we go:

  • Voice recording is nearly, nearly done. Unfortunately, I didn’t reach my goal of having all of the recording done by the end of the weekend. A lot was done this week, but I’m still looking for an actor for the last part (Admiral Banks). All of the other parts have been recorded, though, which means that I can go ahead and build the first eight missions.
  • Improved the cockpit. I decided that even my meager art skills couldn’t excuse the poor quality of the existing design. I spent a few days building and texturing a new cockpit model, which is shown below.


  • Improved the missile system. The new system requires players to be smarter about how they launch their missiles; launches that are made too close to a target or not facing the target enough will only result in wasted ordnance.
  • Addressed a number of outstanding bugs and gameplay issues. All minor things, but there’s nothing like a quick demonstration to a colleague to make you realize there’s a lot that needs fixing. (“oops, that shouldn’t happen”, “still gotta fix that”, “that’s boring so I’ve left it until later”, etc.)


June 28 — Where I’m At

Okay, this is a big update. A lot has been accomplished over the last while!

The campaign script has received the final go-ahead from my editor/military consultant. His feedback has resulted in cleaner dialogue with a militaristic feel, which is definitely what I’m going for. Voice recording is proceeding, although much slower than I would like due to the time this takes. I’ve begun mastering the parts that have been recorded. All of the dialogue takes place over radio and is filtered to sound like it.

In addition to the campaign, I wanted Gateway to offer options for customizing and playing your own space battles. This “instant action” game mode is now entirely complete, and marks a major milestone in Gateway‘s progress. Certain parameters are randomized to give a slightly different feel to each battle, but the most meaningful per-fleet parameters (size of fleet, types of spacecraft and gates present, pilot skill level, technology, etc.) are fully configurable. Up to five different fleets of any size can be present, meaning that space battles can be as epic or as personal as you’d like. (They’re also very useful for quickly testing various aspects of game play.)

Featured below are some screenshots from scenarios generated by the instant action engine.

An enemy fighter tries to make a desperate escape.

An enemy fighter tries to make a desperate escape.

Exploding wingmates rock your fighter as two fleets collide.

Explosions rock your fighter as two fleets collide.

Alien cruisers unleash a storm of high-powered ordnance.

Marauder cruisers unleash a storm of high-powered ordnance.

Friendly fighters rush to assist in the defense of New Earth.

Friendly fighters rush to assist in the defense of New Earth.

Currently, my to-do list mostly consists of things like “fix cruiser UV issue”, “fix laggy menu widgets”, “finish new marauder fighter gate”, etc. There are also a few minor game features here and there that need to be implemented. Of course, there’s still the campaign to finish, but I don’t want to proceed until I have all of the voices ready to go. I hope to have them all recorded by the end of next weekend.

There’s still lots to do, but it’s as fun as it always is! And that’s the point.


Tech Report — Efficient Laser Bolt Collision Checks

I’m going to depart from my usual style of blog post and exercise my right to describe some technical stuff. This week’s topic is going to be about collision detection. It’s a massive topic, but for the purposes of today’s post, I’m going to focus on a very specific portion of Gateway’s collision detection system: how it handles laser bolts colliding with other objects.

Collision detection is potentially very costly, and the amount of collision checks between objects doesn’t scale linearly. The real trick is to discard potential collisions with as many objects as quickly as possible. In my attempts to reduce how often these checks had to take place in Gateway, I focused my efforts upon the most prevalent collision-enabled objects in the game world: the laser bolts.

In my game, lasers move very fast. We can’t rely on simple distance checks to determine if a bolt hits a fighter; the ordnance may very well simply ‘jump’ over the fighter and miss it entirely.

Simple distance checks will not suffice because the bolt moves so fast that it may skip over a potential victim

Simple distance checks will not suffice because the bolt moves so fast that it may skip over a potential victim, missing it

So, instead, we cast a ray between the old and new positions of the laser bolt.

As the laser bolt moves forward, our collision system performs a ray cast between its old position and its new one to see if it hit anything in between

As the laser bolt moves forward, our collision system performs a ray cast between its old position and its new one to see if it hit anything in between

This works fine, but we’re unnecessarily testing the ray cast against objects that fall behind the bolt. So, we discard any objects from the ray cast test that aren’t in its path. This can be done with a fast vector dot-product calculation and discards half of the objects we have to test against, on average.

Ray casting is expensive, so we should only test the objects that fall in front of the laser bolt's path

Ray casting is expensive, so we should only test the objects that fall in front of the laser bolt’s path

But, we can still do better than this.

Now, we’re performing these collision checks every frame. Even though we’re discarding a good chunk of the objects in our scene fairly quickly, that can still be costly in terms of pure iteration. These checks for discarding objects also consume resources.

Let’s think about this: laser bolts move really fast. Over the life of a single bolt (about one second or two), no ship is likely to change it’s position much. In other words, the set of potential colliders for any single laser bolt is fairly static throughout its entire life. So, why not just pre-compute a list of potential colliders at the beginning of the bolt’s life? This is likely to be a very short (or empty) list, and we can re-use it for every frame of the bolt’s life until it dies. In other words, we’re only computing the list of possible collision candidates once.

This page has some great code for a fast check to see if a point lies within a cylinder in 3D space. By specifying a radius wide enough to account for the fact that certain ships may cross the path of the laser bolt, we can use this to build a list of potential colliders that will remain valid until the laser dies. This list might only ever contain just a handful of ships out of hundreds, and will save our collision engine from tons of unnecessary iteration.

When a laser bolt is first spawned, compute a small list of candidates which we may collide against, and re-use it continually throughout the laser's life

When a laser bolt is first spawned, compute a small list of candidates which we may collide against, and re-use it continually throughout the laser’s life

In the image above, we can see that only two ships are within this cylinder. For that particular laser bolt, those are the only objects we have to check for collisions against. Pretty neat.

Of course, we’ve made a number of assumptions. We assume that the laser bolt is fairly short-lived and travels very fast. Slower or long-lived ordnance would necessitate the use of a wider cylinder, if we could still use this technique at all. Additionally, weapons that don’t move in a straight line (such as heat-seeking missiles) would present a problem. But for standard laser bolts, this works just fine.


May 18 — Where I’m At

Voice recording has begun! This is a very exciting step, as the voices for the characters I’ve imagined can finally come alive.

Now, the script is still awaiting some final editing from another source, so there may be the possibility of having to do re-takes to accommodate the changes. The reason I’m starting voice recording already is because I’m getting eager to move this game along!

Since the story is now more or less finished (barring some final editing), a lot of final decisions regarding Gateway‘s gameplay have been made. The campaign itself spans 11 complete missions, and there will also be the option of playing customized instant action games. During these missions, the player will face off against several types of one-manned fighters, a few varieties of cruisers, and even newly-added space mines.

There have also been a number of performance optimizations. Space battles can now be larger, and I feel that this is important when it comes to making the player feel immersed.

Don’t let all this talk bore you! Here are some screenshots to show you what to expect after a few more months of development.


Three outmaneuvered alien vessels face destruction from opposing sides.


The volcanic planet Grappley is visible behind the chaos.

The next while will be spent fine-tuning the game mechanics, eliminating obvious bugs, and integrating voices into the missions.


Some Case Studies

Game programming is something I’ve been interested in since I was about 11 years old. I started by making simple programs and games in Visual Basic. Shortly afterwards, I made my bumbling way into the world of 3D game development, and I completed many projects using DarkBASIC. All of my games were very simple, but this is the reason I finished them: they were small and built on well-established mechanics such as jumping, collecting treasure, shooting, or racing against time.

Featured below are a few of my favourite completed game projects from way back when. They were all made for my own amusement, and are all from a time when I could barely program to save my life. Or make game art. Or anything.

Goblin Stoppers


Jump from platform to platform as you try to escape the lava-filled cave. Home to baby dragons hungry for their first taste of goblin flesh, the cave is also rumoured to hold treasure that renders the finder completely invulnerable…

I consider this to be my very first fully-playable computer game. Its simple mechanics, combined with a small map size, made this project a reasonable first.

Space Havoc 1, 2, and 3


Fight for your life in open space against skilled pilots determined to prove their worth.

The first version of this space-based combat game was incredibly simple, and started to grow in complexity as the project matured. It spawned a total of three titles. There were a few attempts to make a much more complex fourth title, but these designs eventually became part of Gateway.

Cavin’ In


Fight against time to collect all the treasure in a maze from which no one has ever returned. Lava flows around every corner, while fire goblins lie in wait for their next meal.

The idea here was to navigate through a dark cave in search of treasure, avoiding lava and catching glimpses of scary fire goblins while a lightning storm raged outdoors. Again, this was a very simple game with a simple goal: run through a large maze collecting items as you go, before time runs out and the cave collapses.

Space Fire


Use an assortment of weapons in a deep-space duel to the death. Only one of you will survive.

This was a two-player game, where each player had an assortment of weapons (laser bolts, laser charges, and missiles) with which to kill each other. Players could also take cover behind the asteroids (which could be destroyed, too). Unfortunately, no one ever played it with me more than once, because I was too good at it.



A twist on a classic sport, Shufflespace puts a 23rd-century spin on a well-known game.

The goal of this game was to aim and shoot a laser from the far end of a shuffleboard, and take down all of the miniature aliens at the other end. The alien formations could be customized, and the game even supported something called “live mode”, where the aliens would walk around at random, making them more difficult to hit.



Lost in a frozen maze, you find yourself attacked by vicious monsters that have made the cavern their home. Armed with only your wits and an ice-spewing gun that freezes everything it hits, only tenacity will ensure your survival.

This game didn’t have any time limits, but there was one important constraint: your gun had limited energy and depleted quickly as you fired. Energy crystals found within the cave would help to replenish its reserves, but most of them were guarded by the locals.

Water World


While not technically a game, this partially-submerged cavern was a good way to test various environmental effects and AI behaviours. Rumour has it that deep within the depths of the stone fort inside, mysterious life advice lies scrawled upon the ruins.


Mar. 29 – Where I’m At

This will be a quick update*, but an exciting one — the story for almost all of the 11 in-game missions has been written! All that’s remaining before final script editing and voice recording is just to finish up the dialogue for the last few. I expect I’ll have the last missions fully scripted by next week.

I have to admit, I’m incredibly excited about moving forwards to the recording stage. Several folks I know have generously offered their acting abilities, and I think that they’ll all fit their roles well. Here are some short descriptions of the main characters in the game, who will often be flying and fighting alongside the player.

Col. Warren Matthews
An uncomplicated, straightforward commander. A serious man with very little sense of humour. His people come first, and the mission comes second.

Lt. Andrew “Rig” Nash
Usually second-in-command during missions. Younger and more energetic than Matthews. Primary concern is for his wingmates and subordinates. Terse and forward, one gets the impression that he’s suffered a few scars, both literally and figuratively, over the course of his career.

Ensign Kesha Orr
Fresh out of the training program, Orr’s level of experience is similar to the player’s. Usually the first one to point out new things or ask questions.

Ensign Adam “Belt” Brennan
Second in experience only to Nash. Likes to tell jokes and stories from his past. His ill-timed bantering often attracts negative attention from his superiors.

These descriptions might change slightly throughout the editing process. A lot has changed from the original story already, but I wouldn’t want to spoil anything yet…you’ll get to play it yourself when I’m finished.


* Sorry, no screenshots this time. I’ve recently suffered a hard drive failure and have yet to re-install the libraries needed to run Gateway on my (now fixed) machine to take some new screen grabs. Fortunately, I didn’t lose anything. Cloud storage is your friend.