#multi-platform #2d-graphics #framework #2d-game #real #input #audio

teenygame

A real simple multiplatform game framework for Rust

5 releases (3 breaking)

new 0.5.0 Dec 1, 2024
0.3.0 Nov 3, 2024
0.2.0 Oct 19, 2024
0.1.1 Oct 2, 2024
0.1.0 Oct 2, 2024

#294 in Images

Download history 218/week @ 2024-09-27 64/week @ 2024-10-04 4/week @ 2024-10-11 179/week @ 2024-10-18 6/week @ 2024-10-25 102/week @ 2024-11-01 8/week @ 2024-11-08 3/week @ 2024-11-15 154/week @ 2024-11-29

171 downloads per month

LGPL-3.0-or-later

41KB
902 lines

teenygame

teenygame is a real simple multiplatform game framework for Rust.

It's designed for 2D games with a focus on providing a way to draw graphics, play audio, and handle input. That's it!

Features

  • 2D graphics!
  • Touch events!
  • Audio!

Supported platforms

  • 🟢 Linux
  • 🟢 macOS
  • 🟢 Windows
  • 🟢 Web
  • ⚠️ iOS: Gets stuck after rendering first frame. No support for app lifecycle (e.g. suspend).
  • Android: Untested.

Web

You can run games in your browser using wasm-server-runner:

First install it:

cargo install wasm-server-runner

Then set in up in your .cargo/config.toml in either your project or home folder:

[target.wasm32-unknown-unknown]
runner = "wasm-server-runner"

You can now run your game like any other Rust binary target:

cargo run --target wasm32-unknown-unknown

Examples

Dependencies

~26–64MB
~1M SLoC