If you play it, it must show

Welcome back. Get yourself a cup of coffee to accompany you through my video journey. I had coffee at every step so it makes sense that you have one too, don’t you think?

I had a bit of trouble with my intro video, my logo and just a general  dislike of being disorganized or feeling like I’ve hacked at something. Apart from the issue where all my graphics are drawn pixel by pixel, I had another problem. I wanted to be able to use graphical overlays and background motion video and so on.

If you will, imagine the clouds moving by in the background while the “Start Game” button is showing.

There is no way to play video in all the lovely ways you would expect in Monogame without running into cross platform issues. I’m not referring to playing a movie and sitting back to watch it, that’s easy. I want picture in picture, I want multiple video’s to overlay each other, speed up and slow down at my command, that sort of thing.

Suffice to say that each mobile platform has some way to play a video and each way comes with pro’s and cons. For iOS for example, it means downloading third party projects and figuring out what they did or integrate their libraries and then hope and pray you don’t have sloppy stitch-together problems when you want to do the same for Android.

I don’t like this idea, it feels awkwardly hacked together and makes me feel like I’m losing my touch. I’m a programmer, not a Lego builder, even though I love Lego. After lots of prodding and pondering I decided to do it myself, in a way that exactly the same thing works on all the platforms I am currently testing on, so Windows, iOS and Android then.

Using some magic, with a few tear drops, a feather from a bird-that-became-cat-prey, a stare from my wife and one bucket load of elbow grease, I made my own video format. I call it “the vid”.  The format is pretty cool yet simple. I spent some time on “tooling” so now I can convert any other video format to “the vid”. So that means I can take an MP4 or an MKV or AVI and I can turn it into a vid that will work on Windows, iOS and Android. I can also re-size the video in the process, making it bigger or smaller and reduce quality if I need to.

It is worth saying that I am only talking video here, I don’t care about audio since I’m not making movies, I make games. My “vid” format allows me to do all the programmer thingies that I want to do, such as triggering an event when something is on screen or me being able to specify exactly where on the screen the video should display, the frame rate and so on. They also support alpha channel transparency so I can overlay them with ease.

The files are nice and small-ish (for video) so I should be able to make it all work within the size constraints that allows users to download over 3G instead of WiFi.

Lastly,  I can buffer my video straight from the disk, so I don’t have to load the entire video into memory in one go. This is important as on the lower-end of the scale devices have less memory. Talking about memory, playing the video doesn’t mess up my memory usage either. I keep it pretty steady with no leakage that, err, I can detect at this point. I’ll investigate further on that.

In all, this was fun. Maybe I explained this well enough that it’s not too technical, I hope you could follow. I could show you a video but that’s not really the point. A video is a video, it’s how I made it that is interesting, right?

Here be dragons

I am a creature of habit. Sometimes I resist change simply because of that and other times I change simply because I know I resist change. On top of that, I’m a purist, so I like getting my hands dirty and being in control. To me, this meant monogame made perfect sense, as I could build my own engine to do whatever I wanted in the way that I wanted. This strategy had served me well in my professional career so I had no reason to think it would fail this time. As I said, I’m a creature of habit.

Sure, my judgement might have been clouded and I didn’t quite spend as much time looking at other frameworks as I did monogame. It also has to be said that at this point I had already converted my ‘Battle City’ to XNA and the idea of just porting that to monogame to run it on a device just made sense. But how?

Xbox Screenshot

My ‘Battle City’ clone in action on the Xbox

Follow the breadcrumbs

Luckily they make it quite clear on the monogame website, you need Xamarin. So I promptly followed the trail of cookies that so far had led me to game development, Xbox gaming and I was on the Xamarin site, downloading their 30 day trial.

This solution, this one thing that meant I could now change my game in such a way that it could work on iOS and Android presented me with a problem. I don’t have an Android  device. This should be ok, because I have an iPad and a few iPhones that are collecting dust from years past. The irritating thing though, I had to pay to be an Apple developer and I’m not even sure I can do this.

Remember when I said I couldn’t go away on holiday because I can’t afford it, well, that’s true for paying to become an Apple developer too. I don’t have money to throw around and if I spend the money I need to be sure I have at least some chance of generating some form of revenue.

Ok, let’s move back a little, I mean, it’s $99 we’re talking about. Living in South Africa is a curse when you have to spend dollars, but it’s a blessing when you get them. That’s because of the Rand/Dollar exchange rate, which as I type is 0.098/1. So, every dollar is worth R9,80. So, $99 is a lot of money in Rands.

So I settled on Android, which I could do for free provided I could find a device to test with. Luckily for me, it just so happened that my mother had a Galaxy Tab which I could borrow for a few days.

Sailing the seven seas

At the time the mere mention of creating a game was a complete stretch for me as I wasn’t sure if I was comfortable telling anyone about it. You might be thinking I’m ashamed, but that wasn’t it. I was motivating myself and having fun but at the same time nobody would think I was doing something that mattered. I’d be ridiculed and told to do other things or spend my time better. Just this morning a colleague asked my why I’m writing a game, wasting the fact that I’m probably the best networking programmer in the country and here I am writing a game that’s not even networked! I pushed on, nonetheless and borrowed the Galaxy Tab. Ping back to Sean right here, you’re a rockstar man.

I felt completely outside of my comfort zone. This was uncharted territory for me. I was expecting to see signs of “here be dragons” all around me. I was borrowing a device, to write software for something I couldn’t afford to buy, so that I could release it on a platform I couldn’t test for.


My ‘control‘, if I could call it that, was to go back to something I knew. I knew, that if I got it working on the Android device, that I couldn’t sell my ‘Battle City’ clone. So I needed to do something different. I substituted the tank with a guy somewhat resembling Robert Trujillo from Metallica. I didn’t plan on this, but my limited graphics skills meant that was the best I could do. It was only by pure luck that I went ‘hey, that looks like Robert!’. My ‘Battle City’ clone went to what can at best be described as Pack-A-Gun. Imagine a pacman type clone where you ran around on the screen wielding a gun, shooting bad guys who are coming at you from all angles and shooting back.

This was incredibly fun on the Xbox and I slowly started drawing graphics, things like tables, chairs and pool tables. Before I knew it, I had something that resembled an office and the game looked a little better. But it lacked purpose. This was good enough to test with though. I mentioned that it was fun on the Xbox but it’s worth mentioning twice because it really was fun. But it was mindless and without purpose of any kind. Would that ever be good enough to sell a game? I didn’t think so…


He resembles Robert a bit, doesn’t he?

Curiosity killed the cat

Getting the game to run on Android was the easy part, getting the sound to work properly was an irritating mission. Eventually I just disabled the sound but the point here is I could get it working on the Android if I spent enough time on it. Don’t get me wrong, getting the audio to play is not that hard, but to control the audio and play certain things at exactly the moment you want, is a headache.

So my curiosity got the better of me. I got ahead of myself, I went to Google and started looking at what I needed to do, what process I needed to start if I wanted to release the game on the Google Play store. I wasn’t prepared for what followed. Remember my story about the Xbox and the hoops I had to jump through to get the game running on it? Remember I mentioned that as a South African I can’t take part in the Microsoft Indie Developer Programme? Guess what, I can’t sell my game on the Google Play store either.

Go to Google and search for disappointment. I’m sure by now they have added my portrait next to the word in the urban dictionaries. If not, insert whatever words of disappointment you’d like here. I could release my game, but Google didn’t have a way of paying me if I wanted to sell it.

So why sell it then? What happened to seeing where the road takes you? It’s simple, I need to buy licenses and software to make this happen. Software I can’t afford to buy as it seems I can’t afford to live these days. What’s more, I spend so much time working that unless I can generate some kind of revenue from it, it would make more sense for me to sit back, relax and just do something else. Also watch series and movies, which believe it or not I don’t do, I work. Insert any funny remark about making games and expecting to make some kind of revenue here. I get it. Odds are against me, let’s move on though.

Be the change you want to see

So this is just frustrating. We keep hearing that the old era is gone and South Africa is this changed beast, yet sometimes it still feels like we live in isolation. We’ve had the iPhone since 2007, we still can’t [legally] download games in South Africa. Jung would call us insane for expecting something different I suppose.

So let me re-iterate:

  • I can’t be a Microsoft Indie Developer because South African’s are not allowed at all
  • I can be a Google Android Indie Developer provided that my game is free
  • I can register on Apple and sell on the iOS App Store but nobody I know can buy it because no games allowed in South Africa

So those were the issues I could do nothing about. iOS was the de facto option. Thank you universe, message received loud and clear. If only that was it, but there was one more problem, I didn’t have a Mac, not even an old one. So here’s how it works, you install Xamarin on your PC (on which I plan on working) and you also install it on your Mac. Whenever you want to compile your code for iOS, the PC sends it to the Mac and the Mac has to do the work. You can’t develop for the iPhone or iPad unless you have a Mac. I didn’t want to work on the mac alone for the same reasons I dropped Objective-C and XCode in 2007, I want to play to my strengths, which happens to be Windows and C#. Sure I can work in C++ or Objective-C, but then it would take me much longer to do what I already know how to do in C#.

Crunching some numbers

So here’s how I saw it playing out financially:

  • Registered Apple Developer costs $99 anually
  • Xamarin for iOS (with Visual Studio supported) costs $999 anually
  • Graphics & Sound $???? for every game I make
  • Mac of some kind $1000+ which is probably a once off every few years

This just felt wrong. All of it. I couldn’t afford a small break away for a weekend and I was moaning at having to pay $99 I didn’t have to register as an iOS developer, yet here a few days later my only option was to spend at least $2000 just to get going! Now that’s a lot of money even before you apply the Rand/Dollar exchange rate. On top of that, I couldn’t afford a graphic artist or sound engineer so I’m going to have to pull a rabbit out of the hat.

On top of this, I can’t test on my iPhone or iPad unless I fork out all of that money.

The restaurant at the edge of my universe

Now I know what you’re thinking, there’s no such thing as a free lunch. But just think about it, if I sell my game for $1 I’m sure there’d be people moaning. Even some people I know would scrutinize me for charging anything, as software should be free and open. But even if I wanted to give it away for free, I’d still end up paying all these license fees annually, so I’m paying lots of money that I don’t have for you to play my games that I make myself, without the help of a sound or graphic artists. What’s more, I can’t really share what I do with my local community because they’re not allowed to buy it!

So why do it at all? I can’t remember how far into my 30 day Xamarin trial I was at this point, but I received a mail from a “Customer Success Engineer” at Xamarin. He was enquiring about my Xamarin trial and asked if I needed any support.

I didn’t want to reply straight away. In fact, I wasn’t sure if I wanted to reply at all. The one thing I couldn’t ignore was that the path had lead me here and there was an open end to it, if I didn’t reply I’d never know what if.

Enter the Zombie

I had a long hard look at what I was doing and after chatting with my brother-in-law and my wife, randomly decided to substitute the “bad guys” with “Zombies”. The point of the game was to have fun shooting and what’s more neutral to shoot at than zombies? I decided that if I could get the game working, with some kind of graphics, with multiple levels, on the Galaxy tab, I would reply to the mail and include screenshots.

I had no idea what that would mean, but I would do it. My leave was almost over too, so I had to do it quickly. I wasn’t sure what I was expecting, but eventually I had a working version and I replied and also included a few screenshots…

The town. The mailbox is the entry point into a building


The view once you enter a house