Month: July 2014

Catch the Coding Wave

When we first came up with the concept for Viking Escape, we drew up a sketch that included a little boat, some rocks, and water. The boat and the rocks would be simple enough to program, but the water was going to be tricky because it had to be interesting visually and had to use little memory, you know, to keep cell phones from exploding. That last part was an exaggeration. Anyway, what we drew looked something like this:


The grand scheme we concocted included a rising water level to simulate a flooding cave that was supposed to look like it was going back and forth. I drew a water asset that took up the whole screen, thinking that Joseph could program it so that it would start below the screen, slowly rise and eventually consume the screen as the player reached the top. This worked, but it proved to take up too much memory which is bad when you want a game to run smoothly on a smaller device such as a cell phone or tablet. Having learned from experience on a previous game, we learned that it was easier to optimize everything as we went along instead of doing it after the fact.

To save memory we decided to crop all art assets as tightly as possible, because every pixel counts. So for the water asset, I chopped it down to this:


Joseph then programmed the game to take the color from the bottom of the water asset (the blue), and use it to fill the rest of the bottom of the screen. This proved to take up much less memory and made no difference visually. He then programmed the asset to move back and forth, and thus we had moving water. We celebrated by doing the Binary Cocoa victory yell and dance, which no one will ever see or should have to.

To make it look less stale, we decided to code the game so that it would duplicate the water asset three times, stacking them all one level above each other, and staggering the rates at which they moved back and forth. This created a neat sense of depth in the game that really brought the environment to life. You can see it in action here in this short video:

(or you could just see what it looks like here in this screen shot)

Screen Shot 2014-07-22 at 12.45.14 AM

The water is just one of the many moving parts within the game, but it just comes to show how putting in a lot of small details can really enhance the game play experience. A couple months ago, Joseph and I watched a video game conference video where two programmers showed everyone how to spice up their games. They took a simplified version of Breakout (that looked painfully boring at first) and put flashing lights in, several bright colors, a techno soundtrack and fun sound effects that all of the sudden made the game look like something anybody would buy. I would post the video here, but it has copious amounts of toilet humor and I think I would just be doing everyone a disservice.

What I’m trying to say is that even the lamest game can catch people’s attention if it is flashy enough. At least for a while anyway. We do all of our stuff in Lua, which has been great because they have libraries upon libraries of game code that they just give to you for free. It’s so much easier to borrow a physics engine instead of banging your head against the wall trying to build one from the ground up. Check out some of the cool things they have to offer here:

I suppose it’s time to conclude.

Our goal with Viking Escape is to give players a game that is fun to play as well as aesthetically pleasing. It can be somewhat challenging to accomplish for phones that have little memory, but we’re finding new methods to accommodate better graphics all the time. It’s all really exciting actually. Every time we make a new discovery, it’s like finding your favorite bucket of Oregon black cherry ice cream in the back of the icebox that isn’t freezer burned, or having a load of socks go through the wash and having all the pairs come back intact.

Compare it to what you will. I’m going to eat ice cream.