# Asteroid Dodge, late submission

You are trying to place a bouncing Asteroid into a small wormhole. The game mechanics are similar to Dodge it. If I had more time, I would have made the graphics better. I did not have too much time to work on this, as I kept on changing my ideas, and this was the last one I stuck with.

The .ino file for the game can be found here

The controls are straightforward: Control Pad for directions.

2 Likes

There was a misunderstanding on my behalf on the deadline.

Not sure what to do.

Seeding the random number generator using a constant value;
`srand(7/8);`
is going to give you the same sequence of random numbers every time you start the game. You should use
`arduboy.initRandomSeed()`

(Although it looks like no random numbers are used, anyway.)

@FManga you are just too good!

1 Like

@01001110 proposed a logic gate game during our CMPT 220 class last Wednesday, but the idea was scooped by @filmote’s Logix - Game Jam 3 game (which is a fantastic realization of this idea). Alas!

``````      if(bally + ballsize > playery + controlheight) {
bally = bally +0.3;
}
if(ballx + ballsize > playerx +controlwidth) {
ballx = ballx +0.3;
}
``````

Adding 0.3 to an int doesn’t do anything (it gets rounded down to zero).
Glancing at the code, I couldn’t figure out how the scoring is supposed to work.

I have also changed the confusing ‘Avoid’ background.

Thank you Scott. I had planned on the goal location to randomly switch between a set of given locations, but I really ran out of time to work on this.

1 Like

Sorry, the aim is to bounce the smaller ‘asteroid’ into the goal using your square. I didn’t really have time to play test the game, unfortunately. Thank you for pointing out the bally and ballx additions don’t increase! I will work on changing this.

I think this is a really cool concept. Kind of like air hockey but with a “Dodge It” look. Would love to see it completed.