Don’t do server updates in your lunch break!

I decided to have a rest today as I have been training for a marathon and a few other things.  I thought this lunch break I would do some important fixes to Hack24 server.

DON’T do this, lunch breaks and servers do not mix.  

I assumed my fix would sort out the issues, it did, but it brought on a whole load of more because I cleared out some corrupted records and forgot the client side would have a cache that now does not match the server side.  Oh boy what a mess.

Backup, nope because I was rushing as it was my lunch break!

Luckily, one of my friends managed to do some database magic.  He will receive a burger on me .

So again, don’t do server upgrades at lunch time, it ruins your day when it goes wrong!

HACK24 : Submitted

2014-07-06 22.27.38


Finally, a month and a week late, the first version of Hack24 has been submitted.  Emotional moment, trying to write even a simple MMO single handedly is a massive task, trying to do it in a month with a family and full time job, is practically impossible.  I did it in 2 months 🙂

I will write more on it soon, enjoying a beer at the moment.

Version 1.0 supports (I wanted to call it 0.1):

Hacking, buying, entering, claiming from buildings

Scanning and Robbing players

Items allow players to teleport, scan, brute force hack, enter buildings, shield, speed up and invisibility.

I will be updating the website, and writing a how to play guide 🙂



Hack24 : Oh boy its coming!

So I had planned to release Hack24 for the end of May and as we are mid June, I failed!  Its pretty hard to make a MMO in a month part time.

Since I lasted blogged about the project  I have done the following.

  • Improved FPS even on older devices by optimising what is rendered
  • Items now spawn and players can collect items
  • Speed, Money, hacking items can now be used
  • Player can now gain XP and level up
  • Added icon

Main items left to do

  • Be able to teleport (new idea)
  • Be able to buy items
  • Quests / missions
  • Player interaction
  • Add help
  • Finish iPhone UI

I hope to at least submit to Apple by the end of the month

Hack24 MMO : We have trees!

I had planned to do more updates but I have been trying to finish the v0.1 of the game for the end of May.  To be honest it is probably not going to happen however I am making good progress 🙂 What can you do so far?

  1. Game has 10 different types of buildings/ world objects
  2. You can see other players in the game
  3. You can buy and hack building to give you XP, Money
  4. Brought buildings you can enter and you can claim money from them
  5. HUD display shows you your buildings, free buildings and other player buildings
  6. Exploring gives you XP
  7. More XP, the higher LVL you are and the better hacker you become

2014-05-28 13.00.09   2014-05-28 12.59.16 Whats next?

  1. Scan and rob players
  2. Spawn random items for people to collect
  3. Be able to buy items
  4. Implement item properties (shield, lives, invisibility etc)
  5. Fix collision
  6. Quests / Missions

Using Obj / Blender objects in iOS

This is a small post about getting Blender objects in to iOS using the Obj file format.

First off, below is a fantastic tutorial on how to do it.

How To Export Blender Models to OpenGL ES: Part 1/3

This tutorial shows you how to export a Obj from Blender and convert it in to header files to use directly in to your iOS source.

The issue comes when you try to make your own object (I picked a cylinder) and convert it using the OSX tool it gets you to create.  Every object I made, crashed the tool.

For it to work you need to apply UV (surface/mesh) co-ordinates.  For someone who knows very little about 3D stuff, this caught me out.

To fix

  1. Select the object and press Tab (so the Mesh menu is available)
  2. Press U
  3. Select Smart UV
  4. Press OK.

I have no idea what it does but it does allow me to export my object and convert it using the Tool created in the link above 🙂






Air Balls for iOS has been released!

Air Balls is my first attempt at making a simple game using the SpriteKit physics engine and boy it was easy.  The graphics for this game took longer than the game!  Its a simple but fun free game where you need to keep the footballs off the ground.  I really think that SpriteKit is a brilliant framework.  It reminds me of making games for the Amiga.


Please check it out


So, on the 2nd of May we had our second Compsoft Game Jam.  I use the term loosely as we don’t follow any format but to have fun.

The first Game Jam we had was based on creating a game with 24 hours based on a randomly picked theme.  This was mega fun and spawned (from me) Disjointed Tunnels (Android) and Stupid Chicken (iOS) which are both released.  Other people made some awesome games on different platforms.  We decided 24 hours was a little hard work straight after work (yes we go to work before these) and decided the next one was 12 hours.

The other changes to this one was that instead of starting new projects (the main point of a Game Jam), most of us would continue on projects that we are passionate about.

There where 8 of us this time (from 5),  listed below are the projects

  • Hack24 (mine) is a 3D MMO game in an endless world where you hack buildings and aim to be top hacker.
  • Augmented Reality draughts (new).
  • Nought & Crosses but in a multiple grid system like Sudoku (new)
  • A full blown network / game engine thats massively scaleable.
  • A flappy birds clone
  • A postman frenzy type game (new)
  • A spaceship shooter game
  • Web based space shooter / resource game

As you can see, some of these projects are quite large which leads me on to my next post about Hack24.

The general feedback was that people really enjoyed it, I think in some ways it lacked the special feeling of creating something completely new based on a random theme however when someone is passionate about a project, they really churn out the code.




GLKIT Object Picking

For anyone who has played with OpenGL ES, its really hard work (iOS or Android). I have spent many hours on OpenGL ES 1.0 and 2.0, making my own frameworks etc.

Apple introduced GLKit in iOS 5 if I remembered correctly and it was designed to make the maths side easier. One of the things I struggle with is object picking, this is touching the screen and turning that in to a 3D position in the OpenGL world. Generally there is 2 ways to do this, Colour picking and Ray Picking.
Colour picking is when the user touches the screen, every object is rendered as a different colour and then you detect what colour that person touched to work out where they touched.

Ray Picking, is where you fire off a ray and work out what the first object is that it hits. This requires quite a bit of maths which people have already done for you but in different programming languages.

However, the point of this article is that I discovered that Apple have added functions to help with Ray Picking namely GLKMathUnproject

Code based from this StackOverFlow post

This works out when you touch the floor (self.plane) and then puts self.cube at that position

- (BOOL)didTouchObject: (CGPoint) tapLoc
tapLoc.x *= [UIScreen mainScreen].scale;
tapLoc.y *= [UIScreen mainScreen].scale;

bool testResult;

GLint viewport[4];
glGetIntegerv(GL_VIEWPORT, viewport);

GLKVector3 nearPt = GLKMathUnproject(GLKVector3Make(tapLoc.x, (tapLoc.y-viewport[3])*-1, 0.0), _baseModelViewMatrix, _projectionMatrix, &viewport[0] , &testResult);
GLKVector3 farPt = GLKMathUnproject(GLKVector3Make(tapLoc.x, (tapLoc.y-viewport[3])*-1, 1.0), _baseModelViewMatrix, _projectionMatrix, &viewport[0] , &testResult);

//farPt = GLKVector3Subtract(farPt, nearPt);

float xDif = (farPt.x – nearPt.x) / 1000;
float yDif = (farPt.y – nearPt.y) / 1000;
float zDif = (farPt.z – nearPt.z) / 1000;

for (int i = 0; i < 100; i ++)
if ((nearPt.x + (xDif * i)) > self.plane.position.x – self.plane.scale.x && (nearPt.x + (xDif * i)) < self.plane.position.x + self.plane.scale.x &&
(nearPt.y + (yDif * i)) > self.plane.position.y – self.plane.scale.y && (nearPt.y + (yDif * i)) < self.plane.position.y + self.plane.scale.y &&
(nearPt.z + (zDif * i)) > self.plane.position.z – self.plane.scale.z && (nearPt.z + (zDif * i)) < self.plane.position.z + self.plane.scale.z)

NSLog(@”Hit cube”);
self.cube.position = GLKVector3Make(nearPt.x + (xDif * i), nearPt.y + (yDif * i), nearPt.z + (zDif * i));
return YES;


return NO;