r/gamedev • • 9h ago

Discussion Doku2D Python Game Engine

Doku2D is an open-source engine for making 2D games in Python. It uses SFML through PySFML for graphics, windowing, input, and audio, and Pymunk for physics. OpenAI Codex wrote the engine code. I decided which features to build and how they should work, then playtested the sample games and guided development based on what I found.

Doku2D loads Tiled maps and supports animated tiles, collisions, and NPC pathfinding and route following. The UI supports themes and localization. You can write branching conversations in .dialogue files, with typewriter text, character portraits, player choices, and the ability to save and resume a conversation.

The doku2d build command uses Nuitka to compile your game into a standalone desktop application for Windows or Linux. You can also build a test APK or a signed Android App Bundle. The repository includes English and Turkish documentation, step-by-step tutorials, and sample games.

If you’re making 2D games in Python, I’d like to hear where you get stuck, whether it’s during setup, while reading the docs, or when using the API.

Explore Doku2D on GitHub

0 Upvotes

1 comment sorted by

1

u/gobagames 8h ago

Nice, the .dialogue files with save/resume look really handy. Curious how you kept the codebase consistent with Codex writing most of it. Did you set up an architecture doc up front, or refactor as you went? I recently built a character controller with a lot of AI help, and the hardest part for me wasn't writing the code, it was keeping the Unity, Godot and three.js versions behaving the same.