Trying the PLT Games collection?

[Solved] Sorry about all this. I just needed to stick with the name of the package actually shown in the list of installed ones (so "games" instead of plt-games), and not add anything beyond (require games), before I run the program. Thanks!

Hi there!

I'm currently going through the EdX video version of the Htdp method (Very very slowly, still not over with the BST language yet), and I wanted to take a look at the games in the PLT collection, to get a better feel of how simple programs are built.

I'm not an experienced programmer, so this would have been my first exploration of the package manager in DrRacket.

I'm using version 8.9 as a Snap, on an Ubuntu based machine.

So after asking a certain famous chat-bot how its done, I checked that the collection is indeed present in the "Installed" section of the package manager, and following the instructions I was given, I added the following lines in a new DrRacket file, hoping this would launch the game in question, once I hit Run:

(require plt-games)
(plt-games/GCalc)

But what I got instead was the following error message:

standard-module-name-resolver: collection not found
  for module path: plt-games
  collection: "plt-games"
  in collection directories:
   /home/my_username/snap/racket/13/.local/share/racket/8.9/collects
   /snap/racket/current/usr/share/racket/collects/
   ... [166 additional linked and package directories]

Right now, its only about trying out games, but the inability to make use of additional packages might become a more serious issue in the future.

Is this due to the fact that my DrRacket is a Snap package? The Flatpack version is extremely slow on my older machine, so I'd like to keep this one if possible.

Any ideas on how to solve this please?

Thank you in advance! :slight_smile:

PS: Also, there's no Snap folder in my Home directory, even if I show the hidden ones. So I wonder where the pre-installed packages are supposed to be! :confused:

Hello and welcome :grin:

It looks like you solved your immédiat problem of identifying the right package.

I was originally confused by multiple package systems.

The whole racket system; DrRacket, compiler/runtime, command line tools, and plt-games are all in the Racket Snap package (or flatpack, or installers from https://download.racket-lang.org/ ).

But racket also has its own package management system, and when you install racket you get a whole set of core packages, but the official package catalog has many more: https://pkgs.racket-lang.org/

(Continued- I accidentally hit ‘send’)

I also like reading code, but my memory is that reading the PLT games code was quite challenging.

If you are interested in games in Racket I recommend 2.4 Worlds and the Universe: "universe.rkt"

You might also like reading GitHub - soegaard/breakout: A small breakout game in Racket

Best wishes

Stephen

1 Like

Hey!

Thanks for the suggestion, I'll be sure to look into those! :slight_smile: