A Solitaire game for the browser written in Scheme with Guile Hoot
Go to file
David Wilson 0942f6fe7f
ci/woodpecker/push/woodpecker Pipeline was successful Details
Implement available move checks, polish game mechanics
2023-10-29 16:39:22 +02:00
assets Add new jack, queen, and king face images 2023-10-27 16:26:34 +03:00
scripts Add new jack, queen, and king face images 2023-10-27 16:26:34 +03:00
.gitignore Initial commit 2023-10-21 11:04:16 +00:00
.woodpecker.yml Remove the big svg the right way 2023-10-27 16:17:03 +03:00
LICENSE Initial commit 2023-10-21 11:04:16 +00:00
README.org Add TODO list 2023-10-27 16:10:07 +03:00
index.html Refresh visuals, make canvas somewhat resizable 2023-10-25 14:43:32 +03:00
main.js Implement available move checks, polish game mechanics 2023-10-29 16:39:22 +02:00
main.scm Implement available move checks, polish game mechanics 2023-10-29 16:39:22 +02:00
manifest.scm Initial commit 2023-10-21 11:04:16 +00:00
site.css Refresh visuals, make canvas somewhat resizable 2023-10-25 14:43:32 +03:00

README.org

CyberSol

Check out the game here: https://fluxharmonic.codeberg.page/algj2023-cybersol/

NOTE: This game requires a Chrome Unstable (Dev) build because it uses pre-release WebAssembly features!

Goals

  • Create a simple Solitaire game in the browser with Scheme via Guile Hoot!

Plan

  • Get basic HTML canvas rendering working on the JavaScript side to draw cards
  • Implement basic game state and logic in the Scheme side to represent the stacks of cards
  • On the JS side, call into the Scheme side to get the game state to be rendered
  • On the Scheme side, expose functions to perform actions against the game state
  • Implement new game mechanics to introduce the cyberpunk theme

Design

This game will be implemented in both JavaScript and Scheme. The JavaScript side will handle both rendering of the game and input, but none of the real game logic. The Scheme side will handle all of the game logic by exposing functions that the JavaScript code can call.

The challenge will be to come up with a reasonable protocol for communicating game state between the two languages because we can't really send whole Scheme objects across to be processed.

Notes

To run Google Chrome Unstable in Wayland move, try this command:

  guix shell google-chrome-unstable -- google-chrome-unstable --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WebRTCPipeWireCapturer

Tasks

TODO Implement undo

TODO Add key binding hints on screen

TODO Add title screen

TODO Implement available move scanning (also ensure new game has a possible move)

TODO Add game win/lose states with screens

TODO Add shuffle action when you lose?

TODO Add auto-complete to move all cards to relevant foundations (Enter?)