What’s Next

Your sprite game toolkit is getting pretty full. You have only a few types of sprites, but you can make as many of each kind as you need. You can detect and handle key presses and collisions. Next, you’ll finish your game by adding multiple scenes, so that you can give the player some instructions at the beginning and a score at the end. You’ll also add background music and sound effects to add depth to your game.

Footnotes

[7]

You can see all the methods of the Array class by looking in the Ruby documentation at http://ruby-doc.org//core-2.0.0/Array.html.

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.