All Projects → ericclack → racket-examples

ericclack / racket-examples

Licence: GPL-3.0 license
Example Racket games and demos using the 'How to Design Programs' framework with sprites, worlds, animation and game logic.

Programming Languages

racket
414 projects

racket-examples

A set of example Racket games and demos that I created on my journey learning Racket. They use the How to Design Programs framework and demonstrate sprites, worlds, animation and game logic.

My starting place for learning Racket was the books: Realm of Racket http://www.realmofracket.com/, The Little Schemer and The Seasoned Schemer https://mitpress.mit.edu/books/little-schemer-fourth-edition

After that I created a set of games / demos (which you'll find in this repo), to help me prove I understood the principles and explore the language further. The games are pretty basic, but hopefully interesting to explore.

If you find these examples useful feel free to leave suggestions on the issues page, or email me comments.

Some thoughts on Racket:

  • I found each game pretty hard to write (my background is Python and other procedural languages) but once complete, surprising low in defects.
  • After getting over the lack of objects I found the functional approach produced a simpler design.
  • When making a game do objects and mutable state better model what's going on?

Contents:

  • asteroids -- a simple arcade game.

asteroids screen shot

  • boids -- bird like objects that flock together.

  • boulder -- a take on Boulder Dash.

boulder screen shot

stars screen shot

  • thrust -- a take on the game Thrust from 1986.

Many of the app filenames have numbers, these indicate major changes -- so it's easy to look back at previous, simpler versions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].