From dc5d6ff593be533b4ad90b99e4a58f342340019e Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 14 Apr 2024 21:01:58 -0500 Subject: [PATCH] Project concept in README --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e4ce59..87e678f 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This is an experimental repository while testing a Rust + SDL2 project built wit - [X] Reproducible SDL2 Emscripten Builds - This ensures that the project can iterate safely and be inspected in a safe environment, free from errors. Helps ensure errors are isolated to the machine or build script. - [ ] SDL2 Extensions - - [ ] Image + - [X] Image - [ ] Mixer - [ ] TTF - [ ] GFX @@ -22,6 +22,20 @@ This is an experimental repository while testing a Rust + SDL2 project built wit - [ ] Windows, MacOS, Linux Builds - Simple ability to provide multi-platform builds in addition to the WASM build. +### Concept + +- A decent codebase without extras or warnings. Straightforward build process for Windows, Linux, and WASM. + - Note: Cross-compiling for Windows is a bit of a pain, but it's possible. That said, GitHub Actions can handle Windows builds natively. + - While SDL2 has annoying as fuck lifetimes, Emscripten callback loop imbibes even worse static lifetimes that are damn near impossible to satisfy. +- A simple example of a game loop, input handling, and rendering. + - Pausing functionality, native-only quit. + - FPS counter toggle (TTF example). +- Sprites with Atlas +- Resizable Canvas +- Javascript Interop + - LocalStorage + - Fetch + ### Resources - [KyleMiles/Rust-SDL-Emscripten-Template/](https://github.com/KyleMiles/Rust-SDL-Emscripten-Template/) @@ -34,4 +48,8 @@ This is an experimental repository while testing a Rust + SDL2 project built wit - Image usage, decent code example - Has more advanced javascript config and examples to look at. - [deckarep/flappy-rust](https://github.com/deckarep/flappy-rust/) - - Image + Mixer Usage, possibly GFX & TTF \ No newline at end of file + - Image + Mixer Usage, possibly GFX & TTF +- [aelred/tetris](https://github.com/aelred/tetris) + - No idea how well it works overall, but it has a lot more advanced Emscripten bindings. + - Contains multiple sub-projects, including a web server. Uses SDL2 TTF & Mixer. + - See the [REST functions](https://github.com/aelred/tetris/blob/master/tetris/src/rest.rs#L99) for Emscripten. \ No newline at end of file