{"id":13612584,"url":"https://github.com/georgik/esp32-spooky-maze-game","last_synced_at":"2025-03-16T12:32:47.407Z","repository":{"id":53147112,"uuid":"517875787","full_name":"georgik/esp32-spooky-maze-game","owner":"georgik","description":"Rust Bare Metal implementation of maze game for ESP32","archived":false,"fork":false,"pushed_at":"2024-12-20T14:50:20.000Z","size":977,"stargazers_count":33,"open_issues_count":4,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-27T09:13:03.299Z","etag":null,"topics":["bare-metal","desktop","embedded-graphics","esp32","rust","sdl2","wasm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/georgik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/ci/build-esp32-firmware.sh","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-26T01:41:03.000Z","updated_at":"2025-01-21T14:41:10.000Z","dependencies_parsed_at":"2023-12-22T13:29:36.191Z","dependency_job_id":"ea3b5377-9ed9-4751-8f15-6d6a62036355","html_url":"https://github.com/georgik/esp32-spooky-maze-game","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Fesp32-spooky-maze-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Fesp32-spooky-maze-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Fesp32-spooky-maze-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Fesp32-spooky-maze-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/georgik","download_url":"https://codeload.github.com/georgik/esp32-spooky-maze-game/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814873,"owners_count":20352053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bare-metal","desktop","embedded-graphics","esp32","rust","sdl2","wasm"],"created_at":"2024-08-01T20:00:31.967Z","updated_at":"2025-03-16T12:32:47.402Z","avatar_url":"https://github.com/georgik.png","language":"Rust","funding_links":[],"categories":["Projects"],"sub_categories":["`no_std`"],"readme":"# esp32-spooky-maze-game\n\n[![Wokwi](https://img.shields.io/endpoint?url=https%3A%2F%2Fwokwi.com%2Fbadge%2Fclick-to-simulate.json)](https://wokwi.com/projects/380658681618693121)\n\nSpooky Maze is simple game where ghost is located in the maze. The goal is to collect 100 coins.\nThe ghost can find artifact \"Walker\" which allows him to pass throght the wall for limited period of time.\nThe ghost can use dynamite to clear wall in the vicinity. The ghost can use also Teleport spell to move to random place in the maze.\nThe Teleport spell requires some time to recharge. There are some not friendly spirits running around the maze, when collision occurs the ghost is teleported and loses five coins which are then send randomly back to the maze.\n\n![Spooky on ESP32-S2-Kaluga](assets/screenshot/esp32-spooky-s2-kaluga.jpg)\n\n## Flashing binary from Releases\n\nBinaries are available in [GitHub Releases](https://github.com/georgik/esp32-spooky-maze-game/releases).\n\nBinaries can be flashed by:\n  - CLI [espflash](https://github.com/esp-rs/espflash) `espflash write-bin 0x0 spooky-maze-esp-wrover-kit.bin`\n\n## IDE support\n\n### Rust Rover\n\nRecommendation: Open whole project and attach to particular Cargo.toml for specific target.\n\n## Build and flash\n\nInstall `espflash` which is required to flash and monitor the app on Embedded Device:\n\n```\ncargo install espflash\n```\n\nEnter the directory with project and build it:\n\n```\ncd esp32-s3\ncargo build --release --features esp32-s3-box-3\n```\n\n## Wokwi simulation in VS Code\n\nOpen subdirectory with target in VS Code with installed Wokwi Extension. Select `Wokwi: Start Simulator`.\n\n### Build WASM version\n\n```\ncd wasm\nnpm install\nnpm run serve\n```\n\nOpen in web browser: https://localhost:8443.\n\nNote: https is required for access to accelerometer data - https://w3c.github.io/deviceorientation/#security-and-privacy . It's possible to run the app without accelerometer on http.\n\n## Implemented technologies\n\nEach directory contains implementation specific for the HW.\n\nOverview:\n\n| Name                 | Chip     | Display  | Controls                              | PMU     | GPIO Expander |\n|----------------------|----------|----------|---------------------------------------|---------|---------------|\n| esp-wrover-kit       | esp32    | ili9341  | 6 push-button controls, separate PINs |         |               |\n| esp32-c3-devkit-rust | esp32-c3 | st7789   | icm42670 accelerometer                |         |               |\n| esp32-c3-lcdkit      | esp32-c3 | gc9a01   | rotary encoder                        |         |               |\n| esp32-c6-devkit      | esp32-c6 | ili9341  | resistor ladder with push buttons     |         |               |\n| esp32-s2-kaluga      | esp32-s2 | ili9341  | resistor ladder with push buttons     |         |               |\n| esp32-s3-box         | esp32-s3 | ili9342c | icm42670 accelerometer                |         |               |\n| esp32-s3-box-lite    | esp32-s3 | st7789   | no controls                           |         |               |\n| esp32-s3-usb-otg     | esp32-s3 | st7789   | 5 push-buttons on the board           |         |               |\n| m5stack-core2        | esp32    | ili9341  | mpu6886 accelerometer                 | axp192  |               |\n| m5stack-cores32      | esp32-s3 | ili9342c | bmi279 accelerometer                  | axp2101 | aw9523        |\n| m5stack-fire         | esp32    | ili9342c | mpu9250 accelerometer                 |         |               |\n| waveshare-c6-lcd-1-47| esp32c6  | ili9341  |                                       |         |               |\n\n\n### Build for ESP32-S3-BOX-3 with ILI9486\n\n\nControl: IMU\n- tilt the board to move the character\n- move quickly up to teleport\n- move quickly down to place dynamite and destroy walls around\n\n```\ncd esp32-s3\ncargo run --release --features esp32-s3-box-3\n```\n\n### Build for ESP32-C3-DeviKit-RUST with ILI9341\n\nControl: IMU\n- tilt board to move character\n\n```\ncd esp32-c3\ncargo run --release --features esp32-c3-devkit-rust\n```\n\n#### Features\n\n- Embedded Graphics\n- Framebuffer\n- Random maze generator\n- IMU Accelerometer control\n\n### Build for ESP32-C3-LcdKit\n\nControl: rotary encoder\n- rotate encoder to move the character\n- press the encoder to switch the direction\n\n```\ncd esp32-c3\ncargo run --release --features esp32-c3-lcdkit\n```\n\n### Build for desktop\n\nControl: keyboard\n- press arrows or W,A,S,D to move the character\n- press Enter to teleport\n\n- macOS prerequisites:\n```\nbrew install SDL2\nexport LIBRARY_PATH=\"$LIBRARY_PATH:$(brew --prefix)/lib\"\n```\n\n- OpenSUSE Linux prerequisites:\n```\nsudo zypper install SDL2-devel\n```\n\n- run:\n```\ncd desktop\ncargo run\n```\n\n### Build for ESP32-S3-USB-OTG with ST7789\n\n![Spooky on ESP32-S3-USB-OTG](assets/screenshot/esp32-spooky-s3-usb-otg.jpg)\n\nControl: buttons\n- press button to move the character\n- press up \u0026 down to teleport\n- press ok \u0026 menu to place dynamite\n\n```\ncd esp32-s3\ncargo run --release --features esp32-s3-usb-otg\n```\n\n### Build for M5Stack-FIRE with ESP32 and ILI9341\n\nHW: https://docs.makerfactory.io/m5stack/core/fire/\n\nControl: MPU-9250, buttons\n- tilt the board to move the character\n- move quickly up or press button C to teleport\n- move quickly down or press button B to place dynamite and destroy walls around\n\n```\ncd esp32\ncargo run --release --features m5stack-fire\n```\n\n- Wokwi project: https://wokwi.com/projects/350825213595746900\n\n\n### Build for M5Stack-Core2 with ESP32 and ILI9342C\n\nHW: https://shop.m5stack.com/products/m5stack-core2-esp32-iot-development-kit?variant=35960244109476\n\nControl: MPU6886\n- tilt the board to move the character\n- move quickly up or press button C to teleport\n- move quickly down or press button B to place dynamite and destroy walls around\n\n```\ncd esp32\ncargo run --release --features m5stack-core2\n```\n\n### Build for ESP32-S2-Kaluga v1.3\n\nHW: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-wrover-kit.html\n\nControl: buttons (partialy implemented based on of https://github.com/espressif/esp-bsp/blob/master/esp32_s2_kaluga_kit/esp32_s2_kaluga_kit.c#L59)\n- more details https://github.com/espressif/esp-bsp/blob/master/esp32_s2_kaluga_kit/include/bsp/esp32_s2_kaluga_kit.h#L299\n- K3-K6 to move the character\n- (not supported) press K5 button to teleport\n- (not supported) press K6 button to place dynamite\n\n```\ncd esp32-s2\ncargo run --release --features esp32-s2-kaluga\n```\n\nNote for older version 1.2 - GPIO6 is used to control backlight.\n\n### Build for ESP32-C6-DevKitM-1\n\nHW: https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html\n\nControls: not implemented\n\n```\ncd esp32-c6\ncargo run --release --features esp32-c6-devkitc-1\n```\n\n### Build for Waveshare C6 LCD 1.47inch\n\nHW: https://www.waveshare.com/esp32-c6-lcd-1.47.htm\n\nControls: not implemented\n\n```\ncd esp32-c6\ncargo run --release --features waveshare-esp32-c6-lcd-1-47\n```\n\n### Build for ESP Wrover Kit\n\nHW: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-wrover-kit.html\n\nControl: 6 push buttons\n- it's not possible to move the character\n- press button Boot to teleport\n\n```\ncd esp32\ncargo run --release --features esp32-wrover-kit\n```\n\n## Board Support Package (BSP)\n\nThe project is using [ESP-BSP-RS](https://crates.io/crates/esp-bsp) which provides macros with preconfigured\nGPIOs for a specific board.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgik%2Fesp32-spooky-maze-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeorgik%2Fesp32-spooky-maze-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgik%2Fesp32-spooky-maze-game/lists"}