Make It Your Own

The game isn’t finished, but this is a good time to stop and do a few experiments. Save a copy of your entire game folder before you make any big changes. Then try one or more of the following exercises or make something up yourself.

Change the game constants.

The constants in Player—especially ACCELERATION and FRICTION—control how the player ship moves. Even small changes in these can make a big difference in how maneuvering the ship feels. Try changing FRICTION to 1. Try changing it to 0. What happens? Can you explain why, by looking at the code? Try adjusting those constants to make controlling the ship challenging and fun.

Change the enemy ship movement.

Right now the enemy ship moves straight down. Try having it move at an ...

Get Learn Game Programming with Ruby now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.