Skip to content

2D adventure game engine in Rust and Lua

Notifications You must be signed in to change notification settings

rurunosep/maplewood

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maplewood

The humble beginnings of a 2D adventure game engine built from the ground up with 🦀 Rust and incorporating scripting with 🌙 Lua. This is intended to be the foundation of a long-term personal hobby game project.

Video Demo

Basic Features

  • ⚙️ A simple Entity-Component-System architecture.
    Entities are containers of optional Components, which are containers of related data. Unlike in a full ECS, there is no first-class System abstraction or multi-threading; Components are queried and operated on in sequential, inline code.

  • 📝 Concurrent event scripting with Lua.
    Scripts have various triggers (such as entity collision, interaction, or automatic given a condition). Scripts provide the functions for scripting much of the story and game content (such as displaying messages, animating entities, playing sound effects and music, setting and branching on story variables, etc).

  • 🗺️ Simple 2D graphics and a tile-based map.
    (The next focus of development is the game world/map.)

Notable Libraries Used

SDL2 (via Rust bindings from Rust-SDL2) provides cross-platform, low-level access to input, audio, and graphics hardware.

rlua provides a high-level, Rust-y interface to the Lua C API.

Building and Running

Install Rust using rustup. Select the nightly toolchain. For Windows, install the Visual Studio build tools if prompted. The minimal requirements are:

  • MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
  • Windows 11 SDK (10.0.22621.0)

Build and run with cargo run in the project root directory.

Requires SDL Development Libraries

SDL2 | SLD2_mixer

For Windows, download SDL2-devel-2.x.x-VC.zip from the latest releases and copy all .lib and .dll files to the project root directory.

For Ubuntu, run sudo apt-get install libsdl2-dev libsdl2-mixer-dev.