Dot

I’ve had this idea in my head for a while, and it fit perfectly with the Collection theme. It’s inspired by Pivvot, Brick Roll, and Mr. Ninja. It also works well, because my idea can be implemented using basic shapes and no fancy graphics.

I wasn’t sure I could get it done, but I did and I’m really happy with the result. :slight_smile:

(final screenshot)

Basic idea is rotating planets with a dot that can jump between them to collect coins.

0:00-1:00 – Planet and coin setup
Took the first hour to get the planets and coins setup.  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 planets center.

Thanks to stack overflow for saving me some time on the rotation math.
http://stackoverflow.com/questions/2259476/rotating-a-point-about-another-point-2d

Implementation Note: I decided to just keep the dot in its own worldspace instead of putting it in the planet’s display group. I wasted some time trying to get the appropriate planet rotation so I could move between world and planet space.  Keeping the dot in worldspace was way easier, and it worked out fine.

2:00-2:30 – Proper collision distances
One thing that was bothering me was when the dot got attached to the planet, sometimes it was a little too close due to the velocity being too high and the frame refresh.  The dot’s position would update to be inside the planet.  To fix that, I just offset the dot back to just outside the planets radius. Calculated at collision time.

2:30-3:00 – Graphical juice
I tried to think of what I could do to make this juicy, and there were only a few things.

  1. Dot trail - If the dot was moving through space, I just inserted a circle at the dot’s old location and scaled it down and faded it out over 1/4 second. I also added a second circle interpolated between the old position and current position to make the trail more solid. You could see the individual dots it if was moving too fast.
  2. Planet hit – Added a sphere at the point of collision. Scales up and fades out.
  3. Coin hit – Scaled the coin in the Y and faded it out.
     
    3:00-3:45 – Sounds, cleanup, init and play
    I used CFXR to create the sounds. It’s pretty sweet.

http://thirdcog.eu/apps/cfxr

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. :slight_smile:
 

Overall I’m really really happy with the game.  I’m considering putting some more time into this and releasing it on the app store. Maybe???

Thanks for reading. Here’s a video of the game in action!

https://vine.co/v/heOKPrWiUwT

Cheers.

-Kyle

This looks really fun, definitely continue with this!

Very Cool!

How did you get the cool tail effects and the cool “attach effects”?  I’m sure I could look at the code, but the “high level” design would work too.

Impressive!

For the tail I just create circles along previous position points then fade them out and scale them down with transition.to

The hits are just another circle at the point of impact. :slight_smile:

Here’s a slightly longer gameplay video.

http://moby.to/cuhfkf

I figured it was some type of “particle effect”.

Sweet new game play video!

I’ve decided not to make the source available to the public because we’re planning on releasing this on the appstore.

But… if you want to play the game and check out what I did, hit me up. I’ll email you the source. Just please use it for academic purposes only, or else baaad karma! :slight_smile:

Kyle at mochibits dot com.

Looks like a fun game…
You should definitely continue on the idea…

Best Of Luck…

I’d like to know more about what you did in garage band. Seems simple enough to make a few cool music pieces. I have been using famitracker to make chiptunes, and it’s rather difficult.

Honestly, I just chose the Arcade Synth and played some single notes. The instrument did all the work. I was under the gun and needed to get it done in like 10 minutes. :stuck_out_tongue:

I don’t have garage band, so is that free when you buy it? I’m not sure if gb has iaps or not… Thanks!

Thanks! I’m already scheming on all the cool stuff I can add. Just need to finish up our current project. :slight_smile:

I think it was $4.99 on the appstore (ipad version).  The synth is one of the provided instruments. Didn’t see any iaps in there. But I really have only messed around with it for like 30 minutes.

It comes pre-installed on OSX though. Not sure if it has the same instruments, but I’m guessing yes.  I mainly got the ipad version so I could record myself attempting to play guitar.

Cool, it may be easier to have it on the device too. Then I can use it other places as well :-). Plus you get multi touch capabilities on the device vs on a mac

This looks really fun, definitely continue with this!

Very Cool!

How did you get the cool tail effects and the cool “attach effects”?  I’m sure I could look at the code, but the “high level” design would work too.

Impressive!

For the tail I just create circles along previous position points then fade them out and scale them down with transition.to

The hits are just another circle at the point of impact. :slight_smile:

Here’s a slightly longer gameplay video.

http://moby.to/cuhfkf

I figured it was some type of “particle effect”.

Sweet new game play video!

I’ve decided not to make the source available to the public because we’re planning on releasing this on the appstore.

But… if you want to play the game and check out what I did, hit me up. I’ll email you the source. Just please use it for academic purposes only, or else baaad karma! :slight_smile:

Kyle at mochibits dot com.

Looks like a fun game…
You should definitely continue on the idea…

Best Of Luck…