Skip to content

Current best practices starting point for a Rust game project

License

Notifications You must be signed in to change notification settings

rsaarelm/rust-game-template

Repository files navigation

Rust game template

Starter project with build tooling and current architecture best practices to be used as base for Rust game projects.

Contents based on the TCOD Roguelike Tutorial.

The WASM build should be playable in browser at https://rsaarelm.github.io/rust-game-template/.

Instructions

Install the Rust compiler toolchain and call rustup install nightly to install the nightly version of the compiler.

Build and run the desktop GUI version:

cargo +nightly --release run

Build and run the TTY terminal version:

cargo +nightly --release --no-default-features --features=tty run

If you're using NixOS, you can run nix develop in the project directory to enter a development shell and then call just run or just run-tty.

Features

  • Uses navni to allow compiling for either into a GUI application or a terminal textmode application.

  • Uses miniquad for GUI and WASM builds.

  • A WASM build is automatically built and deployed using Github actions.

  • Uses hecs as entity-component-system for storing runtime entities.

  • Uses IDM for data files.

  • Automatically detects Colemak and Dvorak keyboard layouts and reconfigures movement keys accordingly.

About

Current best practices starting point for a Rust game project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages