https://github.com/e00dan/tower-defense-rust
TD game that works both in-browser (thanks to WASM) and as a desktop version (OpenGL).
https://github.com/e00dan/tower-defense-rust
Last synced: 2 months ago
JSON representation
TD game that works both in-browser (thanks to WASM) and as a desktop version (OpenGL).
- Host: GitHub
- URL: https://github.com/e00dan/tower-defense-rust
- Owner: e00dan
- Created: 2021-05-13T11:11:13.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-15T10:16:22.000Z (almost 4 years ago)
- Last Synced: 2025-01-25T23:45:28.883Z (over 1 year ago)
- Language: Rust
- Size: 5.26 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tower Defense RUST
Works both in-browser (thanks to WASM) and as a desktop version (OpenGL) on Mac, Windows and Linux.
## Web version
Install wasmpack if not installed: https://rustwasm.github.io/wasm-pack/installer/.
```
cd rust
cargo build --workspace --exclude desktop
wasm-pack build wasm
cd wasm
yarn
yarn start
```
## Desktop
### Mac
Install required dependencies:
```
brew install sdl2 sdl2_image sdl2_ttf sdl2_gfx
export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib"
```
Build and start project:
```
cd rust
cargo build
./target/debug/desktop
```
### Linux & Windows
[Desktop version can be also tested on Windows with Windows-Subsystem-For-Linux.](https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps)
#### Start
```
cd rust
cargo build
./target/debug/desktop
```