other files

This commit is contained in:
Mitchell Hansen
2025-11-24 22:36:53 -08:00
parent efab67d027
commit 9c0ad6fcba
11 changed files with 689 additions and 0 deletions

49
WEB_BUILD.md Normal file
View File

@@ -0,0 +1,49 @@
# Building Flappy Bird for Web
## Prerequisites
1. Install the WebAssembly target:
```bash
rustup target add wasm32-unknown-unknown
```
2. Install wasm-bindgen-cli (will be done automatically by build script):
```bash
cargo install wasm-bindgen-cli
```
## Building
Run the build script:
```bash
./build-web.sh
```
This will:
- Build the WASM binary
- Generate JavaScript bindings
- Copy assets to the `web/` directory
- Copy the HTML file
## Running Locally
Serve the web directory with any HTTP server:
**Python:**
```bash
python3 -m http.server --directory web 8080
```
**Alternative (if you have basic-http-server):**
```bash
cargo install basic-http-server
basic-http-server web
```
Then open http://localhost:8080 in your browser!
## Notes
- The game uses WebGL2 for rendering
- All assets are included in the build
- Image sampling is set to nearest neighbor for crisp pixel art