A delightfully simple 2D game engine for the D programming language. Parin is designed to make game development fast and fun — it's easy to set up, hackable, and comes with the essentials built in.
Worms Within
A bite-sized escape room game.
A Short Metamorphosis
A cute visual novel about looking at an egg.
A list of projects made with Parin is available in the projects page.
- Focused on games. It is opinionated in ways that make common game-development tasks easier than in general-purpose engines.
- Code-driven design. There's no imposed architecture, allowing freedom on how a game is structured.
- A guided workflow. Parin assumes a few common patterns to smooth out the development experience.
Parin sits somewhere between a small engine like raylib or LĂ–VE and a big engine like Godot or Unity. It offers more direction than small ones, but far less overhead and "magic" than big ones.
Note
The project is still early in development. If something is missing, it will probably be added when someone (usually the main developer) needs it.
- Focused 2D engine — not an everything engine
- Pixel-perfect physics engine
- Flexible dialogue system
- Atlas-based animation library
- Efficient tile map structures
- Intuitive immediate-mode UI
- Mixed memory model: manual control, GC, or both
- Built-in memory allocators: tracking, frame, and arena
- Includes extras like microui
- Cross-platform: Windows, Linux, Web, macOS
import parin;
void ready() {
lockResolution(320, 180);
}
bool update(float dt) {
drawText("Hello world!", Vec2(8));
return false;
}
void finish() {}
mixin runGame!(ready, update, finish);import parin;
import parin.addons.microui;
Game game;
struct Game {
int width = 50;
int height = 50;
IVec2 point = IVec2(70, 50);
}
void ready() {
readyUi(2);
}
bool update(float dt) {
drawRect(Rect(game.point.x, game.point.y, game.width, game.height));
beginUi();
if (beginWindow("Edit", UiRect(500, 80, 350, 370))) {
headerAndMembers(game, 125);
endWindow();
}
endUi();
return false;
}
mixin runGame!(ready, update, null);This guide shows how to install Parin using DUB. Create a new folder and run inside the following commands:
dub init -t parin
dub runIf everything is set up correctly, a window will appear showing the message "Hello world!". For instructions on building without DUB, check the "How can I build without DUB?" section.
Some libraries for sound, graphics, and input handling are required before using Parin on Linux. Below are installation commands for some Linux distributions.
sudo apt install libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev libwayland-dev libxkbcommon-devsudo dnf install alsa-lib-devel mesa-libGL-devel libX11-devel libXrandr-devel libXi-devel libXcursor-devel libXinerama-devel libatomicsudo pacman -S alsa-lib mesa libx11 libxrandr libxi libxcursor libxineramasudo xbps-install make alsa-lib-devel libglvnd-devel libX11-devel libXrandr-devel libXi-devel libXcursor-devel libXinerama-devel mesa MesaLib-develStart with the examples folder or the cheatsheet for a quick overview.
For more details, see the tour page.
The parin.types and parin.engine modules are easy to read and show what's available.
If you notice anything missing or want to contribute, feel free to open an issue! You can also share things in the GitHub discussions. Most ideas are welcome, except ECS.
- Latest: October 2025
- More: dev.to/kapendev
- Archive: parin/devlogs
Create a new folder and run inside the following commands:
git clone --depth 1 https://github.com/Kapendev/parin parin_package
./parin_package/scripts/prepare
# Or: .\parin_package\scripts\prepare.bat./parin_package/scripts/run
# Or: .\parin_package\scripts\run.bat
# Or: ./parin_package/scripts/run ldc2 macos
# Or: ./parin_package/scripts/run opendParin includes a build script for the web in the packages folder.
Building for the web requires Emscripten (the latest version is recommended).
By default, Parin's web builds use the betterC flag, meaning only projects compatible with it can be compiled.
dub run parin:web./parin_package/scripts/web
# Or: .\parin_package\scripts\web.batProjects requiring the full D runtime can be built using the gc flag provided by the build script.
Note that exceptions are not supported and that currently some DUB related limitations apply like having to include all dependencies inside the source folder.
Make sure opend install xpack-emscripten has been run at least once before using it.
dub run parin:web -- gc./parin_package/scripts/web gc
# Or: .\parin_package\scripts\web.bat gcTo speed up build times, use the debug flag.
Below are installation commands for Emscripten for some Linux distributions.
Note that some of these may not install the latest version.
sudo apt install emscriptensudo dnf install emscriptenyay -S emscripten
# Or: sudo pacman -S emscriptenAdditionally, raylib-d projects are partially supported through the rl flag.
A small subset of raylib-d is included by Parin to make it possible to compile at least 2D games with minimal changes.
Make sure to add something like this in the dub.json file before using it:
"configurations": [
{
"name": "default",
"targetType": "executable"
},
{
"name": "wasm",
"targetType": "library",
"targetName": "game_wasm",
"dflags": ["-mtriple=wasm32-unknown-unknown-wasm", "-checkaction=halt", "-i", "--release", "-betterC"]
}
]Using both gc and rl should provide the best compatibility for most raylib-d projects.
-
Open the web folder.
-
Select these files and add them to a ZIP file:
favicon.ico index.data index.html index.js index.wasm -
Go to itch.io and create a new project.
-
Under "Kind of project", choose "HTML."
-
Upload the ZIP file.
-
Enable the option "This file will be played in the browser."
-
Save the changes.
The web build script provides the itch flag to automate the first two steps.
It currently only works on Linux and macOS.
Contributions to add Windows support are welcome.
Vec2 is a type provided by the Joka library, which Parin depends on.
An example using this type can be found in Joka.
Call setIsUsingAssetsPath(false) to disable the default behavior.
Or setAssetsPath(assetsPath.pathDirName) to load from the executable's folder.
Asset hot reloading is not supported out of the box. The arsd libraries may help.
Yes. Be sure to check the associated README for any licensing notes.
No. Raylib is the current backend. A custom backend may be added in the future, but it's not a priority.
The goal is a smooth experience, similar to Godot or Unity.