Page 1 of 1

Space Rocks

Posted: Fri May 26, 2017 1:44 am
by OnACoffeeBreak
Space Rocks is a game very similar to the 1979 Atari Asteroids.

Image

Infinite waves of asteroids with asteroid speed and UFO shooting accuracy increasing. Top 10 scores are stored.

Controls are on the title page. A UFO has a chance to spawn every 100 points. An extra life is earned every 1000 points up to 4 extra lives. Background sound is similar to the Asteroids' heartbeat the speeds up as the wave progresses.

This is my first game, my first Lua project, first 2D "art", first sound effects. All content except for the non-default font are made by me and my son. The font is Atmosphere by Jay Vidheecharoen. See assets/font/Atmosphere.txt for more info.

Special thanks to the creators of HardonCollider, SUIT GUI libraries and to everyone on these forums supporting each other new and experienced alike.

I am proud of finishing this, but I also realize that there are deficiencies and game design issues remaining. For example, I attempted to get the UFO accuracy to increase gradually with waves, but it really feels like in wave 5 it just becomes much more accurate than in previous waves. I learned a lot and felt like I needed to move on to the project I really wanted to make.

If anyone has time and inclination, I would appreciate feedback on the game and the code.

The next thing I'm going to tackle is using an entity component system (ECS) in a game. I might just remake this game using an ECS. As it stands, GameObject is responsible for all of the common code among game objects: rotation, speed, wrapping around edges of the window, default rectangular collision box. All other game objects are subclasses of GameObject. Some objects override default behavior. For example, Player overrides the update with acceleration due to applied thrust, and Player and Asteroid override the default rectangular collision shape provided by GameObject with a more complex polygon shape.

Thanks again, everyone!

Re: Space Rocks

Posted: Thu Jun 01, 2017 1:01 am
by MetalMelnic
This is excellent, the collision detection works great and the sprites your son made are great too. I also really like the particle effects when dying. Some things could be tweaked like the ship should rotate faster, greater acceleration and the bullets should only delete themselves when they fly off the screen like in the original asteroids (if you want to). Keep up the great work!

Re: Space Rocks

Posted: Thu Jun 01, 2017 11:51 am
by OnACoffeeBreak
Thank you! Appreciate the feedback!

Agreed, the ship rotation and accel should be tweaked. Rotation step should also be reduced to allow for finer grained control. Many times tapping rotation buttons to get the ship pointed at the asteroid will overshoot. We also considered adding friction like the original asteroids, but decided against it. Lack of friction was my daughter's biggest complaint.

Again, thank you!

Re: Space Rocks

Posted: Tue Jun 13, 2017 8:28 pm
by Luke100000
Looks great!
One thing I found (As long as it's not made on purpose): the particles should despawn not all at once so it looks smoother.