Technology choices

Decisions are hard. They’re hard because you can almost never foresee how the result will pan out until you’ve fully implemented them and by then the effort is spent and you’re going to have to start from scratch with hours or days wasted from your schedule.

I’ve restricted my game idea to something I can technologically implement myself, has minimal art requirements (at least with the first release) and I can complete in a matter of months (how many months depends on how smoothly things will go, which they no doubt won’t, but I’m guesstimating around 6). With that in mind, even if the design changes I have a rough idea of the kind of things I’ll need to implement or otherwise acquire.

The list currently stands at:

  • Graphics engine
  • Sound engine
  • GUI
  • Font renderer
  • Level editor
  • XML level importer
  • Touch interface
  • Camera movement and zoom
  • Multi-platform considerations

The big decision here is how many of these do I write myself and how many do I try to find some middleware or libraries for? I’ve not yet decided how much to say about the game, but what I’m trying to do graphically, whilst not particularly complex, requires low level interactions with OpenGL and based on previous implementations of the core mechanic, even writing in Objective-C turned out to have too much overhead (the overhead was the message passing of method parameters, with lots of small functions called many times per frame, switching to C++ doubled the framerate in places. See here for someone else’s comparison). So I’m stuck with C++ and OpenGL, which doesn’t mean I can’t call through to Objective-C (or many other languages if required) but it makes sense to keep going in this vein unless there’s good reason not to, especially as OpenGL and C++ are fairly platform independent (they’ll work for pretty much everything apart from Windows Phones and Microsoft Surface and those might catch up at some point).

Having the graphics engine in OpenGL means any library for the GUI (which would hopefully encapsulate font rendering and multi-language support) would have to play nicely with OpenGL, would most likely be in OpenGL and would need to not cause problems when I’m displaying their GUI in the foreground whilst still running my game in the background (or not cause enough problems if I had to switch between the two). If it was simply displaying some clickable buttons I’d be very tempted to write this myself and reinvent the wheel one more time (which can make sense if you want to really ensure that the wheel fits nicely to your car), but it would certainly be preferable if I could find a free-to-use library that took care of the GUI and would happily display any UTF-16 encoded languages I threw at it. The decision then becomes do I try to find some SDK that can do most of the above list for me or use libraries by part and hope they all play well together, as well as with my current codebase.

In terms of SDKs, the only one I’ve found so far that’s lets you have low-level control of OpenGL and allows you to write in C++ is Marmalade SDK. My main problem here is finding out if their GUI system will play happily with my use of OpenGL i.e. with both displaying during the same frame. No-one has answered this question anywhere in the Marmalade forums (which seem to worryingly have a lot of unanswered questions), but there is a 30-day trial version I can use to answer it myself. The other advantage of Marmalade is that it offers cross-platform support, so will, at least theoretically, allow me to target Android alongside iOS.

There are a few more options for a free-to-use (LGPL or freer) GUI library. Clutter is the main one that springs to mind, but there are others such as kivy and apparently cegui can work on iOS, though it isn’t officially a supported platform. It seems that, after many Google searches, there is sadly no plug and play, well tested, cross-platform, free, OpenGL C++ GUI. It’s almost as if there’s no-one out there willing to do all my work for me.

So tomorrow I’ll start by downloading a free version of Marmalade and see how easy it is to get my game up and running on it, then see what their GUI will do when it’s running over the top displaying Japanese. If that fails I’ll try Clutter. Clutter is free (as opposed to Marmalade’s $149 per year) but if it gives me Android for that price, it’s a price worth paying.

8 thoughts on “Technology choices

    • That was an interesting read. I wonder how to use it though as the number one cost I have to bear is my living expenses but I currently receive zero pay from my company (not that one officially exists yet, I wonder how important that is ahead of release). Certainly something to consider, but probably more significant if I ever get to the point of paying myself a wage (which I might do up to my tax free amount) whilst developing any future game.

      As a one man band it probably makes little difference to me. As a going concern in the future, with a proper team, it no doubt would be very worthwhile.

    • Works in C++, check.
      Plays happily with OpenGL, check.
      Uses MIT license, check.

      With its use of HTML and CSS it should be a doddle to update data and get what I’m looking for and getting it up and running with my project looks really easy. I think I’ll have an extended play with it today. Thanks for the suggestion 🙂

  1. Hi. I’m here via Andrew. I’m an artist currently looking for projects.

    And okay, I do traditional portrait and figure art with old fashioned pencil and paper. But, if you find yourself in need of art for a game, drop me a line.

    – Simon.

    • Really nice art on your deviantart page. I won’t know the art requirements until the game is further along, but it would be great to tak then. I know how much making art that wasn’t used in the final game demoralised the art team at Lionhead (especially on Fable 1, when a *lot* of art went in the vault never to be seen again), so I want to make sure I know what I need before I get anyone else involved.

  2. Here via Andrew, I don’t have anything to add, I just wanted to say, good luck, and I’m really interested to see how the process works out.

    • Thanks 🙂 I think I’ll learn a lot along the way and I hope this doesn’t just end in a very public failure. Success will be defined by selling enough games to pay for my living costs. I think I’ll make a blog post about that soon.

Leave a reply to Simon Field Cancel reply