Lisp Game Jam devlog: Polydraw
The Autumn Lisp Game Jam has just concluded, and Spritely's contribution, Polydraw, is a peer-to-peer party game that is simple to learn and play with friends. In Polydraw, players take turns being the artist who draws an image based on a prompt, using only triangles for 60 seconds. The other players, the guessers, attempt to correctly guess the prompt. The team is pleased with the outcome of the game.
Polydraw was developed over the course of a week, following a daily devlog. The process began with creating a Git repository on Codeberg and copying the Hoot game jam template. Dave implemented an interface for drawing triangles on a canvas, which initially lacked a color picker. The weekend was dedicated to preparing for the busy week ahead.
The game engine was established with a basic scene system to manage different game states like the title screen, lobby, and main game. A color palette and additional UI mockups were added to the canvas. The team then focused on the game protocol using Goblins, which models interactions as actors. Dave proposed the following actors: Player, Lobby, Game, and Controller.
A test script was written to simulate creating a game, joining the lobby, and playing a round. The project initially ran in a single process, and Goblins allowed for later distribution of actors to multiple machines. Jessica set up an end-to-end encrypted relay netlayer using OCapN as the default relay, ensuring the game would "just work" when uploaded to itch.io.
Dave connected the game UI to the actors and confirmed that a three-player game works. Three players are the minimum required to trigger OCapN's third-party handoff feature.
However, the team encountered an issue with "crossed hellos" when two peers connect to each other concurrently. This problem stems from OCapN's mandate that only one connection may be open between any two peers. The bug caused an empty lobby player list, although it did not prevent the rest of the game from functioning. The team did not attempt to fix this issue at the time.
Dave discovered that he had fallen victim to the "identity footgun" in the object capability system. He created a wrapper around eq? called geq? to detect this issue at runtime. He then resolved the problem by ensuring all necessary promises were fulfilled before conducting identity comparisons. Christine joined the project towards the end and contributed to creating a splash screen animation using Blender's Stop Motion add-on. However, the animation was not yet integrated into the game engine.
Rewritten by urgent.news; may contain errors — check the original.
Source: spritely.institute