Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ccouzens/maze-playground


https://github.com/ccouzens/maze-playground

Last synced: 17 days ago
JSON representation

Awesome Lists containing this project

README

        

# Maze Game

A web based maze game. Play online
[here](https://storage.googleapis.com/maze-playground/game.html).

![Screenshot of the game from a desktop browser in light mode and portrait orientation. It is a 10x10 and unsolved.](Screenshot%202024-04-23%20at%2007-26-30%20Maze.png)

## User guide

Navigate from the lower left to the upper right. Once you reach the upper right
you win! 🎉

Navigate using either the arrow keys, clicking in straight lines or tracing the
route with your finger.

Use `Options` in the nav bar to change the size, or swap to a different maze
generation algorithm.

## Technology

It is a client side application and can be served from the majority of static
web servers.

For drawing it uses SVG for the maze. HTML is used for the page and CSS is used
to style both.

[Rust](./computer/) compiled to web assembly is used to generate the mazes,
generate the SVG paths and handle the user's route.

Typescript compiled to Javascript is used to handle the user's interactions and
draw back the mazes generated by Rust.

3 canvas alternative renderers can be found in the
[rendering playground](https://storage.googleapis.com/maze-playground/rendering-playground.html).
They are a bitmap renderer where Rust generates a bitmap, a WebGL2 renderer and
a WebGPU renderer.

## Run in Docker

```bash
# podman
podman container run --rm -p 8080:80 "$(podman image build . --quiet | tail -n 1)"
# docker
docker container run --rm -p 8080:80 "$(docker image build . --quiet | tail -n 1)"
```