Hasty Briefsbeta

Bilingual

I Stopped Fighting My Tools and Built a Game Engine in D

a day ago
  • #D Programming
  • #Game Development
  • #Memory Management
  • The author switched from Godot Engine to building their own game engine, Parin, in the D language due to friction with Godot's editor-driven design.
  • D provides fast compile times (<1 second), a single language for game logic and scripting, and control over memory management without garbage collector interference.
  • Memory management uses arena allocators (fixed-size Arena and dynamic GrowingArena) and static data structures for performance, with optional manual or garbage-collected allocation.
  • Metaprogramming in D enables entity systems using tagged unions and compile-time introspection for debug tools and joint allocations.
  • Compile times are optimized, with benchmarks showing 0.6 seconds for games using DMD and even faster with -betterC flag, supporting a streamlined workflow.
  • The engine supports a code-driven approach, allowing scripts and tools to be written in D, enhancing developer productivity and project consistency.