LibGDX Mobile Game

So for the last few months I have been working on a small mobile game. I had to stop using Marmalade because I was unable to get a student licence and my trial expired. Because of this I have decided to moved back to LibGDX which actually supports iOS now. The process of getting a LibGDX game onto iOS seems a little daunting but I will give it a try anyways when the game is more complete. Anyways, here are some screen shots of what I’m working on:

Inside a cave

Inside a cave

Some spinning obstacles

Some spinning obstacles

A mine field

A mine field

The graphics are being created by Liam Bower. The game is basically a helicopter style game with extra features such as different areas, power ups and a shop. We hope to have it finished pretty soon, although it has already taken much longer than originally anticipated.

One interesting problem I had to work on recently was generating caves with smooth walls like in the first and second screen shot. Before smoothing the wall generation, the walls were generated in square blocks, and actually still are. What I do is convert the top and bottom blocks on the walls into two triangles.One triangle using the center point on the top edge of the block, the center point on the top edge of the next block, and its x and y position to draw a triangle. Then the other triangle just draws to fill in the rest of the block. This picture should help illustrate whats happening:

Debug drawing of triangles

Debug drawing of triangles

The results of this method are good, however it is probably more process intensive than it needs to be, and finding ways to optimize it will be something I will need to look into. One solution could be generating ‘height map’ like structures, and then using the triangles to draw from the edge of the screen to the tip point of the map. This will remove the drawing of all the boxes under the triangles as the triangles would create the entire terrain. Generating the terrain in wider sections will lower the number of triangles being drawn at once too.

The progress of the game is going good, with almost all the main features already programmed into the game, but there is still quite a lot of work to do before we can call it finished and release it…