Skip to content

rpgppengine/rpgpp

Repository files navigation

logo

Build RPG++ Build documentations CodeQL Advanced

RPG++ is an experimental 2D RPG game engine and editor written in C++. It is currently in early development, but contributions are welcome!

screenshot of engine

Requirements

To build RPG++, you will need the following tools and packages:

  • For all platforms:
    • xmake (follow the instructions on the website to install XMake on your system)
    • git
  • Specifically for Linux (instructions to install packages are listed below):
    • Packages: gcc, g++, make, ninja, libx11-dev, libxrandr-dev, libxinerama-dev, libxcursor-dev, libxi-dev, libgl1-mesa-dev, and mesa-common-dev
    • Debian:
      sudo apt install build-essential ninja-build libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev mesa-common-dev
    • Fedora:
      sudo dnf install gcc gcc-c++ make ninja-build libX11-devel libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel mesa-libGL-devel
    • Arch Linux:
      sudo pacman -S base-devel ninja libx11 libxrandr libxinerama libxcursor libxi mesa
  • Specifically for Windows:
    • Visual Studio 2019 or later with Desktop development with C++ (community edition will suffice)
  • Specifically for MacOS:
    • Xcode

Optionally, if you like to contribute and build the documentations for RPG++, you will need the following tools and packages. Note that the building of documentations is not required to build the editor, and vice versa:

Building the RPG++ engine/editor

  1. Clone the project using git with
git clone https://github.com/rpgppengine/rpgpp.git
  1. Build all targets by running the following commands (follow the instructions to install packages if there is one)
xmake build --all

If xmake failed to build, try force reinstalling the packages with

xmake clean --all # remove build artifacts
xmake require --clean # remove installed package cache for project
xmake require --force # force install of package

Building the documentations

  1. Create a Python environment if you haven't created one with
python -m venv .venv # you may need to specify a different command like "python3" if you have multiple versions of Python
  1. Activate the environment with one of the following commands
# For Windows
.venv\Scripts\activate.bat # cmd
.venv\Scripts\Activate.ps1 # powershell
# For Linux/MacOS
source .venv/bin/activate # bash/zsh
source .venv/bin/activate.fish # fish
source .venv/bin/activate.csh # csh/tcsh
  1. Install the necessary packages with
pip install -r requirements.txt
  1. Generate and build the docs with
xmake build_doc

or optionally, run each of the commands below if the command above fails:

mkdir -p build/
doxygen doxygen.conf
breathe-apidoc -o docs/Dev -m -f build/doxygen/xml
make html

If you want to build documentation for the Lua API, you can run the following (you need to have LuaLS):

lua-language-server --doc=luasrc/ --doc_out_path=docs/userapi/

You should see the docs output at build/html.

Running the editor

To start the RPG++ editor, run

xmake run editor

Serving the documentation

To serve the documentation, you can use any server hosting software. Make sure that the software is set to host at build/html within the repo.

For example, to serve the documentation with Python's builtin http.server, run the following command within the root of the repo:

python -m http.server --directory build/html

Translation

Translation are located in resources/translations, containing JSON files with their names being the language code.

Each JSON files is structured as either flattened JSON:

{
	"language": "<name_of_language>",
	"translation.key": "<translation_value>"
}

or nested JSON:

{
	"language": "<name_of_language>",
	"translation": {
		"key": "<translation_value>"
	}
}

Both types are supported, though we recommend using nested JSON for better organization.

If you wish to improve an existing language, you can do so by modifying the language file of the language you know. Or if you want to add a new language, create a new JSON file within the folder, specify the language via the language key, and then translate the root translation file (en_us.json). The engine will automatically pick it up.

To check for translation progress, you can do so via

xmake check_translation

License

This software is licensed under the MIT License.

About

Small RPG C++ framework for raylib

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors