We also just published a write-up about making WASM Wireworld, featuring a much improved version than was submitted during the jam that you can play with right in the blog post! https://spritely.institute/news/hoot-wireworld-live-in-browser.html
David Thompson
Creator of
Recent community posts
We wrote about what went into making Fantasary here: https://spritely.institute/news/lisp-game-jam---fantasary---prototyping-an-objec...
That 1KB cartridge file is not a Guile program, but a Guile program built the cartridge. What's happening here is that Guile is being used to generate GWAT (the Guile dialect of WAT) that is passed to the Hoot assembler to produce a WASM binary. It's not actually compiling a Scheme program to WASM, which as you mention would require the GC extension which WASM-4 doesn't use. Check out https://gitlab.com/spritely/wasm4-wireworld/-/blob/main/miniworld.scm to get an idea of what's going on.
I tried building from source but got this error:
$ raco req -d file-exists?: contract violation expected: path-string? given: #f context...: /home/dave/.local/share/racket/8.8-guix/pkgs/req-lib/req/cmdline.rkt:87:25 .../racket/cmdline.rkt:191:51 body of "/home/dave/.local/share/racket/8.8-guix/pkgs/req-lib/req/raco-req.rkt" /gnu/store/2mhw66fpdlf5i6iamyc1zc4kvnj7k9lf-racket-vm-cs-8.8/opt/racket-vm/collects/raco/raco.rkt:41:0 body of "/gnu/store/2mhw66fpdlf5i6iamyc1zc4kvnj7k9lf-racket-vm-cs-8.8/opt/racket-vm/collects/raco/raco.rkt" body of "/gnu/store/2mhw66fpdlf5i6iamyc1zc4kvnj7k9lf-racket-vm-cs-8.8/opt/racket-vm/collects/raco/main.rkt"
I modified launch-game to use /bin/sh instead of /bin/bash so it would launch, then got this error:
error("[XELB] Connection failed: %s" "Authorization required, but no authorization proto...") xcb:-connection-setup-filter(#<process XELB> "\0@\13\0\0\0\20\0Authorization required, but no authorizati...") accept-process-output(#<process XELB> 1 nil 1) #f(compiled-function (obj) "Connect to X server." #<bytecode 0x1e662ff612a0c7c4>)(#<xcb:connection xcb:connection-b119ca>) apply(#f(compiled-function (obj) "Connect to X server." #<bytecode 0x1e662ff612a0c7c4>) #<xcb:connection xcb:connection-b119ca> nil) xcb:-connect(#<xcb:connection xcb:connection-b119ca>) xcb:connect-to-socket("/tmp/.X11-unix/X1") xcb:connect(":1") xcb-boomshine-x-setup() xcb-boomshine-new-game() funcall-interactively(xcb-boomshine-new-game) command-execute(xcb-boomshine-new-game) command-line-1(("-L" "./vendor/xelb-0.18" "-L" "." "-l" "xcb-boomshine" "-f" "xcb-boomshine-new-game")) command-line() normal-top-level()I use Guix so I'm used to having to fiddle with pre-built stuff but I'm not sure what to do here.
Aww, bummer! What distro and version are you using? The shared libraries like libpng are bundled in the lib directory but perhaps there is a glibc incompatibility or something that's causing problems. If it's something I can fix I'll add it to my to-do list for next time. Thanks for trying to run it anyhow!
I wrote a little wrap-up blog post about how the jam went for me: https://dthompson.us/spring-lisp-game-jam-2023-summary.html
Links to our entries:
Wireworld: https://itch.io/jam/spring-lisp-game-jam-2023/rate/2103611
Fantasary: https://itch.io/jam/spring-lisp-game-jam-2023/rate/2103526
Blog posts about both forthcoming!
We're big supporters of making games (and just applications in general) that run on WASM platforms (web browsers mainly.) The Guile Hoot project is broken into several phases. For this first phase we're targeting the r7rs-small Scheme standard because it's rather minimal. In a future phase we will add support for as much of Guile as possible in a web context (no POSIX API, for example) and will figure out how to interact with the DOM to render web pages. Our goal is to ship applications built with Guile and Goblins so that anyone with a web browser can use them. The gamer in me is hoping we'll eventually be able to hook into WebGL/WebGPU someday. :)
And yes, Scheme implementations use a garbage collector. For Guile Hoot we are using the WASM GC extension. Native Guile also uses the boehm collector but it's going to be replaced in the coming years with a better one called Whippet. I should also note that Guile Hoot is not using emcsripten. It's using a purpose-built assembler, disassembler, and compiler that outputs WASM binaries.
I'm pleased to say that I work for a very cool place called the Spritely Institute and we will be dedicating some time over the next week to participate in the game jam! Our team will be split up on 2 projects:
- A text-based, networked game using our Goblins distributed programming platform. (Christine and Dave)
- A demo using the in-development Guile Hoot WASM assembler. (Robin)
This jam provides an excellent opportunity for us to spend some time eating our own dog food. To that end we've spent a bit of time prepping some scaffolding to support project #1, which can be found here: https://gitlab.com/spritely/fantasary
This means that I most likely won't have time to use my Chickadee library this time around for a personal entry, but if anyone else does feel free to reach out on IRC if you need help. :)
Hey everyone,
If anyone is interested in making a game with Guile Scheme using Chickadee, I have created a minimal template repository to hopefully make it easier to get started: https://git.dthompson.us/chickadee-game-template.git
You can clone the repo like this:
git clone https://git.dthompson.us/chickadee-game-template.git
The README is here: https://git.dthompson.us/chickadee-game-template.git/tree/README.md?h=main
Happy jamming!