{"id":20457328,"url":"https://github.com/connorbp/wasm_battle_arena","last_synced_at":"2026-03-10T15:04:50.172Z","repository":{"id":218109317,"uuid":"712054785","full_name":"ConnorBP/wasm_battle_arena","owner":"ConnorBP","description":"A simple networked two player webasm game","archived":false,"fork":false,"pushed_at":"2024-09-06T15:59:13.000Z","size":48672,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T08:35:20.810Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://segfault.site","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ConnorBP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-10-30T17:44:41.000Z","updated_at":"2024-09-06T15:59:17.000Z","dependencies_parsed_at":"2024-01-19T19:43:15.425Z","dependency_job_id":"eede15a2-ff10-47e4-ac97-912595ea2685","html_url":"https://github.com/ConnorBP/wasm_battle_arena","commit_stats":null,"previous_names":["connorbp/wasm_battle_arena"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorBP%2Fwasm_battle_arena","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorBP%2Fwasm_battle_arena/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorBP%2Fwasm_battle_arena/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorBP%2Fwasm_battle_arena/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ConnorBP","download_url":"https://codeload.github.com/ConnorBP/wasm_battle_arena/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253158128,"owners_count":21863238,"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":[],"created_at":"2024-11-15T12:06:37.430Z","updated_at":"2026-03-10T15:04:50.123Z","avatar_url":"https://github.com/ConnorBP.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![ghost](assets/textures/character/ghost.png \"Sleepy\") GHOST BATTLE ![ghost](assets/textures/character/ghost.png \"Wheepy\")\n\nA one versus one ghost battling game to the (extra?)death.\n\nDesigned in Bevy game engine initially based on the following game design tutorial series: https://johanhelsing.studio/posts/extreme-bevy\nProject for me to learn the basics of the bevy ecs system as well as: peer2peer deterministic synchronized game states utilizing ggrs rollback, wave function map generation, deterministic random generation, and other novel game design concepts.\n\n[LIVE DEMO](https://segfault.site/ghost)\n\n![example gameplay](ghosties.gif)\n\n## Features\n\n- peer to peer networking\n- non authoritative deterministic net code and game logic\n- desktop, mobile, and web (wasm) support\n- two player versus mode\n- deterministic pseudo-random map generation (WIP)\n- game music\n- retro sound effects\n- fun competitive gameplay\n\n\n## Building\n### Setup\n- first install cargo and rust using [rustup](https://rustup.rs/)\n- then add wasm target: `rustup target add wasm32-unknown-unknown`\n- install wasm server runner `cargo install wasm-server-runner`\n- install cargo watch `cargo install cargo-watch`\n- install matchbox server `cargo install matchbox_server`\n- run matchbox server in another window for dev testing: `matchbox_server`\n\n### Build and run\n\n- build with `cargo build --release --target wasm32-unknown-unknown`\n- run with `cargo run --target wasm32-unknown-unknown`\n- auto compile and test for development with `cargo watch -cx \"run --release --target wasm32-unknown-unknown\"`\n\n## Deploying\n\n- Requires wasm-bindgen-cli `cargo install wasm-bindgen-cli`\n- optional wasm-opt: `cargo install wasm-opt --locked`\n- then run the commands from deploy.bat\n\n\n## Matchbox Server config\n\nuse the following service definition after installing matchbox_server for user matchbox on ubuntu 20+\n\n`/etc/systemd/system/matchbox.your-domain.tld.service`\n\n```\n[Unit]\nDescription=matchbox_server service\n[Service]\nUser=matchbox\nGroup=matchbox\nWorkingDirectory=/home/matchbox/\nEnvironment=\"HOST=0.0.0.0:3536\"\nExecStart=/home/matchbox/.cargo/bin/matchbox_server\n[Install]\nWantedBy=multi-user.target\n```\nThen run: `sudo systemctl start matchbox.your-domain.tld.service`\n\n\n```\ncargo build --release --target wasm32-unknown-unknown\nwasm-bindgen --out-dir ./out/ --target web ./target/wasm32-unknown-unknown/release/wasm_battle_arena.wasm\n```\n\n### TODO\n\n- [ ] apply more aggressive size reduction techniques to bevy\n    - [x] wasm-opt on deploy\n    - [x] LTO and opt-level in cargo\n    - [x] prune some bevy features\n    - [x] apply aggressive wasm-opt profile\n        - [ ] add more optimize options\n    - [ ] profile un used big functions and hit them with the `wasm-snip` tool\n    - [x] tried wee_alloc and it ends up adding to file size funny enough\n    - [ ] serve compressed with brotli or gzip\n\n- [x] add a main menu and settings gui\n    - [x] default matchmaking mode button \n    - [ ] manual ip connect mode\n    - [ ] sync test option on dev build\n    - [x] player settings such as:\n        - [ ] name\n        - [ ] color\n        - [ ] cosmetics\n        - [x] sfx and music volume control\n- [ ] auto generate the map with wave collapse or perlin noise\n- [ ] add more map tile types\n    - [ ] create a pretty asset for the basic wall type and all of it's corners\n    - [ ] make a pretty ground texture\n    - [ ] some kind of out of bounds area texture to make it less boring. Or just make it black.\n    - [ ] special block types such as: traps, or items pickups as tile types\n- [ ] polish sound effects and music.\n    - [ ] add more sfx\n    - [ ] add more music (battle theme)\n    - [ ] tweak death sound effect\n- [x] fix literal corner case on collision detection which freezes movement on corners\n    - [ ] it is possible to further improve this logic if i'm feeling bored\n- [X] add touch screen / mobile controls and functionality\n    - [ ] controls need some polishing. Make fire work while not moving.\n- [x] polish and bug fix network issues and determinsm\n    - `Key issues are fixed, for now, but stll keep an eye out for bugs!`\n    - [ ] Improve Rollback Audio system robustness\n- [ ] optimize performance\n\n### Complete\n\n- [x] add sound effects and subtle music\n- [x] Add a block based map to the grid\n- [x] Add collision detection to map using a simple calculation (coordinates / MAP_SIZE).floor() as index into array of blocktype at position\n- [x] update player spawn function with random locaion with no overlap\n- [X] check player spawn location generation with collision to not spawn in wall\n\n### Additional Fun Features\n- [ ] Cosmetics\n- [ ] \n- [ ] \n- [ ] \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorbp%2Fwasm_battle_arena","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnorbp%2Fwasm_battle_arena","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorbp%2Fwasm_battle_arena/lists"}