Skip to content

LorenzoRottigni/rpgx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

207 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

RPGX

RPGX Logo

RPGX is a lightweight, modular, and extensible RPG game engine written in Rust, designed for flexibility and ease of use. It provides a rich grid-based architecture with layered maps, tile effects, pathfinding, and entity movement logic.

Built with modern Rust paradigms, RPGX is distributed both as a native Rust crate and as a WebAssembly (WASM) module via wasm-bindgen, making it seamlessly integrable into Node.js environments and browser applications.

RPGX is fully compatible with Dioxus, a powerful Rust-based UI framework, enabling smooth rendering and interactive frontend experiences for games built on top of the engine.

This combination of Rustโ€™s performance, WASMโ€™s portability, and Dioxusโ€™s reactive UI system provides a robust foundation for developing cross-platform RPG games that can run natively, on the web, or in hybrid contexts.

๐Ÿš€ Getting Started


๐Ÿฆ€ Rust (Native)

Install the core engine crate:

cargo add rpgx

Or add it manually in your Cargo.toml:

[dependencies]
rpgx = { git = "https://github.com/LorenzoRottigni/rpgx", package = "rpgx" }

Docs: https://crates.io/crates/rpgx

๐ŸŒ Node.js / WebAssembly

Install the WebAssembly driver for use in JS/TS:

npm install @rpgx/js
# or
yarn add @rpgx/js
# or
pnpm install @rpgx/js

Docs: https://www.npmjs.com/package/@rpgx/js

๐Ÿงฑ C++ (WASM interop)

๐Ÿšง Planned: A C++-friendly wrapper using wasm-bindgen-cxx or cxx, to allow integration with C++ game engines and UIs like Qt or Unreal.

Glossary

RPGX

Euclidean

Contributing

๐Ÿ›  Development Setup

Requirements:

Clone the repo and initialize your environment using the provided Makefile.


๐Ÿš€ Common Development Workflows

Run RPGX in Vue Playground

make dev-vue
  • Builds the rpgx-wasm driver bundle.
  • Generates JS bindings using wasm-bindgen.
  • Launches the Vue.js playground.

Run RPGX in Node.js Playground

make dev-node
  • Builds and binds the WASM module.
  • Starts the Node.js script using TypeScript.

Run RPGX in Dioxus (Web/Desktop)

make dev-dioxus-web     # For web browser rendering
make dev-dioxus-desktop # For native desktop app

๐Ÿงช Testing

Run all unit tests for the Rust core and WASM crates:

make test-core     # Tests for core engine (rpgx)
make test-wasm     # Tests for WASM driver (rpgx-wasm)

๐Ÿงน Clean Up Build Artifacts

make clean

This removes compiled files, WASM output, and node_modules from playgrounds.


๐Ÿ“ฆ Production Builds

Core Engine (Native)

make build-core

WASM Package

make build-wasm

Vue Production Build

make build-vue

Dioxus Builds

make build-dioxus-web
make build-dioxus-desktop

License

RPGX is licensed under the MIT License. You are free to use, modify, and distribute it under the terms of this license.

About

Rust-based RPG game engine

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors