Monkey - Game coding

By candice

I saw a link on twitter a while ago that talked of this new code facility called ‘Monkey’. I foolishly failed to bookmark the link but I remembered it talked of how easy the code was to produce a simplistic game and that it could output the game to a variety of formats including HTML5, Android and iPhone (with the appropriate SDKs/platforms).

So, having remembered Monkey I managed to locate the website via Google and checked out the games that had been produced. They’re all pretty much simple platform games but strangely addictive as you battle to better your performance.

Monkey offers a free demo version which basically limits your output to HTML5 only. This is ideal for just ‘having a go’. If you want access to the forum, etc though you do need to purchase the full version.

The download contains an editor to write and publish the code in C++. Given that I code in C#.net this isn’t too much of a departure from what I do on a day to day basis – just a couple of little oddities to overcome. The game is written in a Console App environment so very much class based and OO.

I decided to set myself a few goals to get to grips with the basics of producing a game. My first task was to get an object moving around on the screen.

At the end of my 2.5 hours I had worked through 3 variations of moving the object around on the screen:

  1. Using the keyboard cursor keys – 1 press = move 1 place
  2. Using the keyboard cursor keys – press and hold keeps you moving
  3. Using the mouse you can move anywhere fluidly

I basically achieved this looking at the tutorials and example games and simply trying things out for myself. Any images used are kept in an associated directory for the project so as long as you remember to set this up when you decide to do a variation you won’t have a problem.

If you want to read more about Monkey you can see more and download the demo here: http://www.monkeycoder.co.nz/

Related posts