Parin, a 2D game engine for D, sits between raylib and Godot

Parin, a 2D game engine for D, sits between raylib and Godot

Parin is a 2D game engine for the D programming language, presented through the README of its GitHub repository (Kapendev/parin) and shared as a Show HN. The README calls it "a delightfully simple 2D game engine" that is easy to set up, hackable, and comes with the essentials built in. Its central positioning: Parin sits somewhere between a small library like raylib and a big engine like Godot, offering more direction than small libraries but far less overhead than big engines.

The README lists four main ideas. Code-driven design means no engine-mandated architecture, so gameplay code can be structured however fits the game. Flexible abstraction means garbage collection is available for convenience, with the option to drop to manual management or avoid it entirely. Modular foundation means most of Parin is built on Joka, a portable utility library that can be used on its own. Batteries included means sensible defaults for common needs such as animation helpers, timers and path finding.

The basic example is short: a function called every frame calls lockResolution(320, 180), draws the text "Helloo!!!" at the mouse position, and a mixin (runDemo) creates a main function that calls it. Listed features are a pixel-perfect physics engine, a flexible dialogue system, an atlas-based animation library, efficient tile map structures and a simple UI library that is marked work in progress. Extras include Box2D, Steamworks, ENet and microui. Supported platforms are Web, Windows, Linux and macOS.

Installation goes through DUB, D's package manager: create a folder, run "dub init -t parin" and then "dub run", and a window with a simple message should appear. Two starting templates are available, basic and entity. There is also a clone-and-script route that uses a prepare script and a run script. On Linux, sound, graphics and input libraries must be installed first, and the README gives package commands for Ubuntu, Fedora, Arch and Void. It points newcomers to the examples folder, the cheatsheet and the tour page, and notes that the DDOX documentation engine can generate an overview.

Web builds need LDC and Emscripten, with Emscripten version 4.0.23 recommended. The LDC emscripten addon archive must be unpacked into the LDC installation folder. The build runs with "dub run parin:web" or a script, accepts flags such as -betterc, -release and -build, and extra libraries can be linked, for example web/libbox2d.a. For itch.io, the README says to zip the index files from the web folder, create a project of kind HTML and enable the option that the file is played in the browser.

The FAQ part of the README covers several practical points. Parin includes bindings for Steamworks and ENet in parin.bindings, but the binaries are not included and must be downloaded or built and linked separately. Raylib is one of Parin's backends; a custom backend is being worked on but is still experimental, and contributions are welcome. Hot reloading is not supported out of the box, because the author, writing as Kapendev, says he does not care about that feature; the arsd libraries may help. The README suggests a toolset of Zed as editor, Tiled for levels, Pixelorama and GIMP for art, Bfxr and Jfxr for sounds and MilkyTracker for music, and lists third-party D libraries that might fill gaps such as scripting or configuration files (wren-port, arsd.script, bindbc-lua, arsd.ini, newsdlang, dex-cf, dtiled, text-mode, Gamut and gameserver).

Contributions are invited: readers can open an issue if something is missing or share ideas in the GitHub discussions. Most ideas are welcome, except hot reloading. Small extras that do not belong in the core can live in the addons folder as single-file D libraries, added through a pull request. The README also names six showcase titles: Twenty Seconds, Twenty Steps; Worms Within; Clean & Haunted; Runani; A Short Metamorphosis; and K, Merge With Me.

Key facts

  • Parin is a 2D game engine for the D language that the README places between a small library like raylib and a big engine like Godot.
  • Garbage collection is optional: use it for convenience, switch to manual management, or avoid it entirely.
  • Features include pixel-perfect physics, a dialogue system, atlas-based animation, tile maps and a simple UI library that is still WIP; targets are Web, Windows, Linux and macOS.
  • Setup is via DUB (dub init -t parin, then dub run); web builds need LDC and Emscripten, with version 4.0.23 recommended.
  • Hot reloading is not supported, and Raylib is one of the backends while a custom backend remains experimental.

Why it matters

Parin aims at the middle ground the README describes: more structure than a small library like raylib, much less overhead than an engine like Godot. Its pitch is code-driven design with no mandated architecture, plus optional garbage collection, so developers can choose how much memory management they want to do. Most of it is built on Joka, a portable utility library that can be used on its own.

Who it affects

D programmers who want to make 2D games, and developers who find raylib too bare but Godot too heavy. Because the README lists Steamworks and ENet bindings and an itch.io upload path, it also speaks to people who plan to ship games to storefronts or add networking. Developers who depend on hot reloading are explicitly not the target.

How to use it

Install DUB, create a new folder, run "dub init -t parin" and then "dub run"; a window with a simple message means the setup works. Templates named basic and entity are available. On Linux, install the sound, graphics and input development packages first. For the web, install LDC with its Emscripten addon and Emscripten (4.0.23 is recommended), then run "dub run parin:web". Start learning from the examples folder, the cheatsheet and the tour page. Small single-file extras can be added to the addons folder through a pull request.

How solid is it

The only source is the project's own README, so every claim here is the author's description rather than independent testing. The README names six showcase titles but gives no details on them. No Parin version number, release date or license is stated. No benchmarks, performance figures, or comparisons with raylib or Godot beyond the positioning statement are given. No user counts, GitHub stars or adoption figures are given.

Risks and caveats

The simple UI library is marked WIP, and the custom backend is still experimental, so Raylib remains the backend in practice. Hot reloading is not supported out of the box, and the author says he does not care about it. Steamworks and ENet binaries are not bundled and must be downloaded or built and linked separately. Web builds depend on a specific toolchain of LDC and Emscripten. No license is stated for Parin itself; the README says only to check the associated README of included extras for licensing notes.

“Parin sits somewhere between a small library like raylib and a big engine like Godot.”

— Parin README