Kyle Yamamoto is the co-founder of MochiBits, an independent game studio. While originally working with Cocos2D, the team switch to Corona SDK to take advantage of Corona’s cross-platform capabilities. To date, Kyle and co-founder Howard Go have build and published 11 mobile apps.

Kyle recently participated in CoronaBlitz, a 4 hour coding challenge put on by Corona developer Andrew Potozniak. In today’s piece, Kyle writes on his experience participating in his first-ever game jam. If you’d like to see more from Kyle, you can follow him on Twitter at @_kyleyamamoto. To check out all the CoronaBlitz entries, please visit our forum.

KyleWhen I first heard about the CoronaBlitz, I really wanted to do it. The 4-hour time frame spread over a week was perfect for a game jam newbie.

I’ve had this vague idea for a game inspired by Pivvot, Brick Roll, and the old-school Mr. Ninja. Luckily, the idea fit perfectly with the “Collection” theme. I didn’t need any fancy graphics and the gameplay was also pretty simple.

The basic premise is that you are a dot and you can only do one thing: jump. Your direction is controlled by spinning planets and your only goal is to collect all the coins on the screen. No dying and no time limit.

Here’s an hour-by-hour break down of how I spent my time:

0:00-1:00 — Planet and coin setup
I took the first hour to get the planets and coins set up. I had to iterate over all the planets and coins to make sure they weren’t drawn over each other, and to make sure that they had a minimum safe distance between each other and the edges of the screen.

The planets have a random radius with a random rotation direction and speed. They also have a marker so we can actually see which way they are rotating. I put both the planets and markers in their own display group so I could rotate that instead of each individual object.

1:00-2:00 — Physics and intersections
I considered using real Corona physics briefly, but decided to just plot my own positions and do my own collision detection with MATH!

I used the runtime “enterFrame” event to run every 60FPS. So every frame, I rotate all the planets and also move the dot, if the dot has a velocity.

Once everything is moved, I loop over all the coins and planets to see if the dot collides. The collision is just a simple radius check (since its all spheres). If the dot collides with the planet, I set the velocity to zero and then start rotating the dot around the planet’s center.

Thanks to stack overflow for saving me some time on the CFXR to create the sounds. It’s pretty sweet.

I also cleaned up the code, added a few comments and made it so all the graphics objects got released and set to nil every time you get that last coin and reset the game.

3:45-4:00 — Background music
I used GarageBand on my iPad with a basic arcade synthesizer to create a 15 second loop. No I didn’t do all those notes, I just held one key down and it sounded cool.

In conclusion
Overall I’m really happy with what I was able to do in 4 hours. The game turned out really fun.

It was really easy getting things up and running using Corona SDK. I would definitely do another CoronaBlitz and maybe other game jams too!

We’re planning on taking my prototype and releasing it as a REAL game. Look for it sometime in October 2013. In the meantime, here’s a video of the game in action:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>