An iPhone Game in One Day?
So – it’s Easter Day – and I have nothing planned. I am going to make a video game!
I’ve had an idea for an iPhone game going round and round in my head for a couple of weeks now, and so I thought I would see if I can make it in one day.
I should clarify that before I started I knew I wouldn’t get it in done in a single day – I’m too much of a perfectionist – however I would like to try to get a prototype completed so that I can decide if I want to spend more time finishing it off.
I decided to build the game in Corona by Ansca. Using Corona means that I can write the game using Lua, and then publish it for iPhone, iPad, Android, Nook, and Kindle Fire. Lots of potential gamers right there.
I built the first part of the game last night (using Corona Project Manager) – I wanted to see how hard it would be to get going and so made the introduction. This morning I started the menu, and now I am ready to start writing the actual game.
For the menu I used the Corona ui.lua from Pixel Vision – I’ve already found a few spots that I can improve ui.lua but I will save them for later (once I have completed the prototype).
So the game is going to be an arena shooter. Essentially there will be a big character in the middle of the screen that you have to protect. You will control a smaller character that flies around the outside of this big character. The small character shoots the enemies that are flying in from the edges of the screen. The small character can also act as a shield to protect the larger one.
That’s what I am about to start making!
Had some hiccups with various movement things but now have a little character that moves around the screen. I’m not quite ready to show anything else but hope to have another video ready in the next hour or so.
The maths for 2d movement is harder than I remembered. I guess I’m out of practise 🙂 I have the character moving roughly as I want him now. I want to restrict the movement to within a radius of the circle – and that’s not currently set but it will look a lot better once it’s working. I’m going to take a break from the character movement for now and try to get some bullets going.
So the hero now shoots bullets – and the movement is limited to a radius around the central circle. I need to clean up the bullets, at the moment they live forever. After that I am going to create something for the hero to shoot at.
I spent some time tidying up the bullet code, and then I added some enemies that now come into the screen from random directions. I think the next thing to do is add collision between the bullets and the enemies. After that I would add collision between enemies and the central object that I am trying to protect. Once that’s done there will be a ‘lose condition’ – ie, a way to lose the game. This would set the levels objective.
So – it’s the end of the day. I don’t think I did too bad. In the final sprint I added the ability to kill enemies and a super simple particle system. The particle system was made considerably easier with Corona’s very hand Animation Transitions (which also helped with the intro animation).
Unfortunately I didn’t have time to add in some objectives, or scoring, or currency, or upgrades. I had loads of ideas for making this a more complete game – but I am pleased with what I ended up with. I think my idea is justified and so I am going to continue working on it with a view to one day finishing it off.