CoronaBlitz
I created a game in 4 (non-contiguous) hours using the Corona SDK because of
CoronaBlitz. I had never even thought to try and make a game in 4 hours before, but since 4 hours isn't that much time to put into something, I thought I'd give it a shot.
Circle Fetch
Design Phase: 5 minutes
After receiving the theme "Collection", I quickly made up a list of as many game design ideas I could think of based on the theme. In 5 minutes I had written down 12 ideas and picked one. I call the game "Circle Fetch". You play a dog that is trying to collect tennis balls but constantly runs in circles. You help the dog out by tapping to make the dog go forward. I based the game on my own dog and the peculiar way he plays fetch; circling and collecting tennis balls instead of bringing them back.
Coding Session #1: 10 minutes
I started with the game template provided with the corona sdk. I then put 4 walls around the screen and set the x and y gravity to 0 to make the game have a top-down perspective.
Coding Session #2: 1 hour 20 minutes
I added a rotational velocity to the dog so it spins on the screen. I also added a ball which the dog will collect. I put in score text in the upper right corner to keep track of the balls collected. I then enable interactivity by having a touch event listener move the dog forward when the screen is touched. Moving the dog forward was tricky because the dog rotates constantly and moves forward in the direction it is facing when the touch begins. This meant converting from polar coordinates to rectangular coordinates. Also the sin and cos functions in the math library take radians, but the rotation for display objects is given in degrees.
Coding Session #3: 1 hour
I added collision detection to find out when the dog gets the ball. I also added an energy meter to keep track of the dog's remaining energy. Moving takes away the dog's energy. I haven't finished working out the energy meter. I want it to decline slowly over time as the dog spins in addition to losing chunks for moving the dog forward. I also need to check the remaining energy and end the game when it runs out.
Art Session: 15 minutes
With less than 2 hours left to complete the game, I made the art assets of the ball and dog to be used in the game. I took pictures of my dog and one of his balls then cut them out of their backgrounds in Photoshop and saved them as .png files in my project folder. I spent minimal time making art assets to maximize time spent coding.
Coding Session #4: 10 minutes
I got back to coding and put the images into the game. The dog doesn't look right as it spins, so I may have to do another art session. I removed the ball when the dog collects it, but there is still only one ball, and there needs to be more since the game is about collecting them. I have the energy bar turn red when there is only 1 energy left as a warning. With the art assets in, it is starting to look like a game. It doesn't have an end condition yet, so you can't win or lose. I also have only 1 hour remaining.
Coding Session #5: 50 minutes
I added in more balls so that the score can go up. I actually just hid the first ball for a second then put it somewhere else on the screen as if it were a new ball. It seemed quicker and I was running out of time. I put an end to the game by returning to the title menu when the energy runs out. As it stands it is confusing and not entirely obvious that the has game ended. I would have liked to change that but I had only 10 minutes left so I went ahead and built for iPhone and tested it on my device.
Last 10 minutes
I didn't feel I could get anything done in code in the last 10 minutes, so I used the time instead to wrap up the entry process for the contest. I commented out my unnecessary print statements that I can't seem to just delete, I pushed my
code up to GitHub. I then took a screen shot of the game and wrote up a
post on the CoronaBlitz forum.
Conclusion
In 4 hours I was able to get the basics of my game idea into a playable form. At this point, I can play around with it and give it to others to play around with to see if there is anything fun about it and expand on that.
No comments:
Post a Comment