RPGX
RPGX is a lightweight, modular, and extensible 2D 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.
Features
- Layered Maps: Compose complex scenes with multiple logical and visual layers.
- Tiles & Effects: Attach visual and interactive effects to grid tiles.
- Selectors & Masks: Flexible targeting and zone definition for tiles.
- Pathfinding: Efficient movement and blocking logic for entities.
- Pawns: Manage entities and their interactions on the map.
- Extensible: Designed for integration with WASM, Dioxus, and more.
Getting Started
Add RPGX to your Rust project:
Glossary
RPGX
Euclidean
Example
use *;
// Library provided by rpgx is a convenient way to manange resources
// outside the rpgx engine, keeping several internal processes on the stack.
let mut library: = new;
library.insert;
library.insert;
library.insert;
library.insert;
library.insert;
// Create a ground layer that fits a dynamic grid currently spanning 15x15
let layer1 = new;
// Apply a specific texture only to even tiles within the 15x15 grid
let layer2 = new;
// Create a circle inset to the 15x15 grid with another texture
let layer3 = new;;
// Apply a rhombus shaped texture with dial 5 within the 15x15 grid
let layer4 = new;
// Put a building at the center of the 15x15 grid
let layer5 = new;
// Arrange layers into the map
let mut map = new;
// Duplicate the built map to its top right point
// transforming the map into a 30x15 grid
map.duplicate_to_the;
// Duplicate the 30x15 grid to its bottom left point
// transforming the map into a 30x30 grid
map.duplicate_to_the;
// Put a building at the center of the new 30x30 grid
let external_layer = new;
map.load_layer;
// Duplicate the built 30x30 map to its top right point on more time,
// producing a final map with 60x30 grid.
map.duplicate_to_the;
Produces the following output:
Contributing
License
RPGX is licensed under the MIT License.