maajor / crowded-plaza

An experimental game with bevy

Home Page:crowded-plaza.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crowded Plaza

Inspired by Crowded City
An experimental io game with bevy 0.7.0

Play online at crowded-plaza.vercel.app

My blog on this Crowded Plaza, A Game With Bevy/Rust| 拥挤广场:使用 Bevy/Rust 开发小游戏

Screenshot: screenshot

Development Run

just

cargo run

Build Wasm

# build to wasm
cargo build --profile release-wasm --target wasm32-unknown-unknown
# bind to js
wasm-bindgen --out-name game --out-dir release --no-typescript --target web target/wasm32-unknown-unknown/release-wasm/crowded-plaza.wasm
# compress to gzip
gzip -9 release/game_bg.wasm

Size is around

  • 7.7 MB Uncompressed
  • 2.0 MB gzip Compressed

Start Game in Browser

After build wasm, run

python -m http.server

then visit http://localhost:8000

Profiling and Benchmark

Conclusion

  • Bevy is around 10x slower than Unity ECS on x86_64 build (bevy vulkan vs unity dx11)
  • Size of Bevy minimal wasm build is similar to Unity one
  • Size of Bevy ecs wasm build is 3x smaller than Unity ecs

For more details, see Benchmark and my blog

About

An experimental game with bevy

crowded-plaza.vercel.app

License:MIT License


Languages

Language:Rust 88.8%Language:C# 8.2%Language:HTML 3.0%