parin ~main
A delightfully simple 2D game engine.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
This package provides sub packages which can be used individually:
parin:rin - A script interpreter for Rin.
parin:setup - A helper script that automates the project setup.
parin:web - A helper script to assist with the web export process.
<div align="center">
<h1>🦆 Parin</h1>
<p>A delightfully simple 2D game engine for the <a href="https://dlang.org/">D programming language</a>. Parin is designed to make game development fun — it's easy to set up and lets you jump right into making things.</p>
<p><strong>Worms Within</strong>
A bite-sized escape room game.</p>
<a href="https://kapendev.itch.io/worms-within"><img alt="Game 1" width="420px" src="https://img.itch.zone/aW1hZ2UvMzU4OTk2OC8yMTM5MTYyMC5wbmc=/original/fWBA1L.png"></a>
<p>A list of projects made with Parin is available in the <a href="https://kapendev.github.io/parin-website/pages/projects.html">projects page</a>.</p>
</div>
Major Features
- Efficient tile map structures
- Flexible dialogue system
- Intuitive immediate mode UI
- Atlas-based animation library
- Pixel-perfect physics engine
- Cross-language support
- Cross-platform (Windows, Linux, macOS, Web)
Hello World Example
import parin;
// Called once when the game starts.
void ready() {
lockResolution(320, 180);
}
// Called every frame while the game is running.
// If true is returned, then the game will stop running.
bool update(float dt) {
drawDebugText("Hello world!", Vec2(8));
return false;
}
// Called once when the game ends.
void finish() {}
// Creates a main function that calls the given functions.
mixin runGame!(ready, update, finish);
Quick Start
This guide shows how to install Parin and its dependencies using DUB. Create a new folder and run inside the following commands:
dub init -n
dub run parin:setup -- -y
dub run
If everything is set up correctly, a window will appear showing the message "Hello world!".
Required Libraries on Linux
Some libraries for sound, graphics, and input handling are required before using Parin on Linux. Below are installation commands for some Linux distributions.
Ubuntu:
sudo apt install libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev libwayland-dev libxkbcommon-dev
Fedora:
sudo dnf install alsa-lib-devel mesa-libGL-devel libX11-devel libXrandr-devel libXi-devel libXcursor-devel libXinerama-devel libatomic
Arch:
sudo pacman -S alsa-lib mesa libx11 libxrandr libxi libxcursor libxinerama
Documentation
Start with the examples folder or the cheatsheet for a quick overview. For more details, check the tour page.
Ideas
If you notice anything missing or would like to contribute, feel free to create an issue! Most ideas are welcome, except ECS.
- ~main released a day ago
- Kapendev/parin
- MIT
- Copyright © 2024, Alexandros F. G. Kapretsos
- Authors:
- Sub packages:
- parin:rin, parin:setup, parin:web
- Dependencies:
- joka
- Versions:
-
0.0.45 2025-May-30 0.0.44 2025-May-20 0.0.43 2025-Apr-30 0.0.42 2025-Apr-16 0.0.41 2025-Mar-17 - Download Stats:
-
-
1 downloads today
-
6 downloads this week
-
24 downloads this month
-
176 downloads total
-
- Score:
- 1.8
- Short URL:
- parin.dub.pm