source/popka | ||
web | ||
.gitignore | ||
dub.json | ||
LICENSE | ||
README.md | ||
TODO.md |
Popka
Popka is a lightweight and beginner-friendly 2D game engine for the D programming language. It focuses on providing a simple foundation for building 2D games.
import popka;
void main() {
openWindow(640, 360);
lockResolution(320, 180);
while (isWindowOpen) {
draw("Hello world!");
}
}
Warning
Popka is alpha software. Use it only if you are very cool.
Supported Platforms
- Windows
- Linux
- MacOS
- Web
Games Made With Popka
Dependencies
To use Popka, you'll need the raylib library (version 5.0) installed on your system. The official raylib instructions will guide you through the process.
Installation
This guide outlines the steps to install Popka and raylib using Dub.
-
Install Popka and raylib
Navigate to the folder containing your dub.json file and run the following command:
dub add popka raylib-d && dub run raylib-d:install
-
Compile example
Once the installation is complete, you should be able to compile the provided hello-world example by running:
dub run
Documentation
For an initial understanding, the examples folder and the engine.d file can be a good starting point.
Project Layout
- core: A standard library designed specifically for game development.
- vendor: A collection of third-party libraries.
- game: A set of tools for creating 2D games.
- examples: A collection of example projects.
Attributes and BetterC Support
This project offers support for some attributes (@safe
, @nogc
, nothrow
) and aims for good compatibility with BetterC.
Web Support
For exporting to web, your project needs to be compatible with BetterC. The web folder contains helper scripts to assist with the web export process on Linux.
Note
I add things to Popka when I need them.
License
The project is released under the terms of the MIT License. Please refer to the LICENSE file.