Saturday, August 24, 2013

To the Dark Side.

I've been eschewing Microsoft for a long time now. I'm in and in a UNIX guy, and despise the horrible practices of Microsoft, in what they do to standards. Also I have been totally unimpressed by the quality of their Operating Systems. So why did I buy a copy of Windows 7 today? Well, PC gaming is alive and kicking, so I want to see if I can get my hit game The Little Crane That Could to the Windows platform. Here are my trials and tribulations of installing Windows7 on a 2007 Mac Mini.

When installing 64 bit Windows on a Mac Mini, you get greeted by a cryptic message. "Select CD-ROM boot type". Whatever option you choose, 1 or 2, nothing happens. The machine is just frozen. It turns out you need to burn a new copy of your Windows installation DVD with some special options. More info on

Using iPads and OSX a lot, I can now only use a mouse with "Natural Scrolling." Getting natural scrolling to work involves touching the murkiest and most vile part of the Windows Operating System: the Registry. For expert users only.

After installation, audio is not working. The driver CD that Boot Camp created does not seem to be any help with it. I still have to find a solution for this.

First order of business was to get some development going. After downloading Visual Studio Express, git, cmake and make, I was able to build GLFW3 from sources in the git repo.

UPDATE I had to reinstall windows after buying a new computer. Here are some issues to consider:

  • When building gl3w, you first need to install python2.7
  • When building glfw, you first need to install cmake.
  • To build glfw, make sure you run vcallvars.bat from the Visual Studio program. Then you can run 'cmake .' followed by 'nmake'
  • IE is super slow, and so is chrome. I fixed the slow chrome by unselecting all proxy options in the network settings.

Monday, August 19, 2013

Digging Dirt

Now spawning dirt when voxels are scraped away from the terrain. It adds a lot to the visual appeal.

Saturday, August 17, 2013

Terrain Modification -- TAKE1

It is far from perfect, but at least it is a start. Dynamic terrain modification using a digger in a voxel terrain. For now I use straight voxels, and not the marching cubes surface, as it is easier to debug.

My plan is to spawn cube-lets as the terrain is modified. This single cubes will be merged back into the terrain after inactivity. It will look prettier with an iso-surface.

Friday, August 9, 2013


With the use of PortAudio I was able to get sound working on the linux port of The Little Crane That Could. And GLFW enabled me to support a joystick (currently I only support PS3 controllers.) I did have to change the GLFW source code so that it would not invert uneven numbered axes.

So now it comes to packaging the game for Ubuntu. Man, what a challenge that is. I've wasted a lot of time creating a .deb file. I did manage to find a good resource for making binary packages.

Wednesday, August 7, 2013

OpenGL and Ubuntu

So I am dusting off my old GNU/Linux PC. It's pretty antique, as I had brought it over from the old country when I immigrated into Canada so long ago. It turns out that it is so old (from 2005 or so), that it can't do 64 bit. (It has an Intel Pentium M at 1.6GHz.) I gave it a fresh copy of Ubuntu 13.04 to see if I can port Little Crane to GNU/Linux.

Initially, I thought it would be easy because I already ported it to Raspbian (which is Debian running on the Raspberry Pi.) But the Raspberry Pi makes it easy, since you can get straight access to the GPU via OpenGL-ES2. There is no need to go through Xwindow, courtesy of the videocore libraries (libvcos) that comes with the little computer. On vanilla GNU/Linux, this is not so easy. First, I have yet to figure out: should I go the GLES2 route? Or can I somehow get access to OpenGL3 Core Profile on Ubuntu? So far, I'm not really sure how to do OpenGL3 on Ubuntu. The only reference to gl3.h header file in Ubuntu, is in a GLES package, strangely enough. However, I stumbled onto GLFW which promises a painless access to GL on UNIX. I will evaluate this framework.

To start off: GLFW is best retrieved from GIT, because the version in Ubuntu (2.7.x) is old. Furthermore, it is incompatible with the current version in GIT. Next, to build it, you need to use cmake. Then you can test by running the examples.

When it comes to building your own app on top of GLFW, it looks like you can force the use of GLES2 by doing:

#include <GLFW/glfw3.h>
Also, it turns out you need to force extension prototypes with:
...before including the GLFW header.

Friday, August 2, 2013

Going viral without marketing... it can happen.

There is a common saying in the #indiegames scene that goes like this: Build it and the players will come. This translates to 'A good game will sell itself (without marketing.)' The current crowd wisdom in my circles is that this is utterly false.

It is only a single data point, but allow me to present an argument for 'Build it and they will come.' This is a case study of my game The Little Crane That Could. The game was released end of january 2011 on Apple's app store. Upon launch, the game had zero marketing and zero press. So what happened to this game?

  • On day 1: I made 1 (one!) sale that day.¹
  • On day 2: 10 sales.
  • On day 3: 100 sales.
  • It might have been day 5 or 6, but in the first week it got to 1000 sales per day.

The free downloads trend was even more dramatic, hitting 1M total in a few weeks. If this is not a text book pattern for viral distribution, I do not know what is. Since there was no marketing² behind it, it must have been word of mouth at play³. Here is how it works: Every player that downloads your game convinces N friends to download and try it as well. If N > 1.0 then you have a viral game. Even with N = 1.1 you will have a smash hit on your hands.

So this was in 2011. Does today's App Store still work this way? I think it does, but the bar has been raised. Nowadays to stand out, it needs to be really really good. In the early days, the demand/supply was out of balance. The demand is still there, but the supply has come in like a tsunami. To scare indie game developers: tell them how many game titles are published per month.

¹ So disheartening, I decided to quit game development, and start contracting.
² The only marketing was a single post on touch arcade forums that announced the game.
³ After initial break through, another force takes over: When in Apple's top ranks, visibility jumps up aggressively. Still: the viral phase got me in the ranks, the ranks propelled me further.