New version of Hack24 submitted!

I May of just solved a programming issue that’s been bugging me for many months. The only way I thought I could get round it was a complete rewrite of the 3D engine for Hack24. However it seems you can get around the massive performance with Hack24 by having multiple threads. Yes seems obvious however this is OpenGL world and that is completely different, the items have to created in the main context!

The fix worked, so a new version of Hack24 has been submitted (with other bug fixes!)

New version of Virtual Worlds Submitted for Android

Just a small update, the following features, bugs have been fixed.

  • Added feature to turn VR mode off
  • Added feature so you no longer need a game controller
  • Fixed issue with be able to place objects in other peoples worlds
  • Fixed a few crashes!

Please check out

Virtual Worlds

SHDR : Online OpenGL Shader Editor

I had to post about this amazing tool I found, now when I am writing my 3D games, I basically pray every time I play with a shader in case I brake it.

I know the basics but using either xCode or Android Studio (now has a tool), there is no syntax highlighting or easy way to see errors!

SHDR allows you to paste in your fragment and vertex shader and tells indicates any issues, and renders the results if it can!



Virtual Worlds update 0.1

So, Virtual Worlds, hmm I had planned to release that by the end of the month however a few things have come up!  Man Flu has not helped me code, the snot just goes everywhere!

I have also had a few other things on!

Excuses over, where are we?

  • Started getting a better set of textures together thanks to Gary
  • Made a very rough simple player model which maybe be replaced by a OBJ file
  • Fixed lots of bugs
  • Created a control screen showing controls etc
  • Improved the navigation throughout the app
  • Implemented some speaking help notifications
  • Got Google Cloud Messaging working however not sure why I need it now.
  • Moved to Live server!

Left to do by 1st December

  • Improve player object
  • Finish texture pack off
  • Make scalable zone object
  • Fix any controller issues
  • Allow user interaction maybe using GCM
  • Allow players to fly in zones if they own them to help build them
  • TEST

Wish me luck!

Android OpenGL ES 2.0 : VBO’s for the win

I am currently working on an Android Virtual Reality framework, project, well not sure what it is.  I have been trying to get different types of objects to render, use different types of devices for control / movement and I did manage to release one game that uses it (I made this in a 12 hour GameJam).

Can’t Get Out

I have been looking at ways to improve performance, before any changes I could only render 1000 cubes at 1 FPS! Ar BALLS

I followed this post on StackOverFlow and that got me to about 5 FPS!

I then read about using Vertex Buffer Objects (VBO’s) and followed this tutorial!

People, this is the way to go, I did not use Stride but I still got 64,000 cubes at 30fps!  Now that’s an improvement!

The sad thing is, this tutorial is from a book I own that I have still not read 🙁  Next missing, read the flipping book!

OpenGL ES 2 for Android: A Quick-Start Guide



New Android Project : VR 3D framework

So Virtual Reality has been one of my favourite subjects since I saw Lawnmover man as a kid.  I have made some very strange things in the past to try and make my own hardware / software for VR.  Oh boy where the Amiga days good fun!

So a few months ago, I made a simple split-screen 3D demo for iOS that used the Duo gamer controller, this can be found here:

I will be updating that soon to support normal iOS7 controllers so that Apple will accept it.  The Duo was added as a hack and never had a SDK 🙁

However,  due to the awesome news of Google Cardboard (VR via Cardboard!) and Oculus Rift working with Samsung to create a VR headset (uses your Note 4).  I thought it would be a good idea to start making my own one, similar to the iOS one but uses Android.

It can be found here:

I have just added support for the Moga game controller.

On a side note, this is worth a read

Getting VR to Run on Android Is “Hell,” Oculus’ Carmack Says




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 🙂






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;