Repository navigation
Home
Dagon is a 3D game engine for D language based on OpenGL 4.3 and SDL2. It features deferred HDR renderer, PBR materials, an event manager, scene manager, asset manager, and entity-component model.
- Providing a modern, easy to use, extendable 3D game engine for D language. We believe that D is an excellent language for game development and it deserves a wider adoption in this domain.
- Creating a use case for dlib for educational purposes.
Dagon is named after a god from H. P. Lovecraft's Cthulhu Mythos pantheon. This name was choosen in accordance with the community tradition of naming D projects using words beginning with 'd'.
The recommended system requirements (for Full HD rendering at 60 fps):
- CPU: Intel Core i3-10100 / AMD Ryzen 3 3100
- RAM: application-dependent, usually 8 Gb minimum
- GPU: GeForce RTX 30 / Radeon RX 6000 series
- VRAM: 8 Gb
- OS: 64-bit Windows 10 or higher / Linux.
Dagon is a hierarchical component-based framework. At the root of the hierarchy there is an Application object. It can store one or multiple Scene objects. Each scene has its own assets, logics, event listeners, etc. Scene stores Entity objects which are basic building blocks of the game world. Entity can be transformed, animated and rendered.
Read more here.
Dagon heavily relies on dlib. It is used everywhere in the engine, from memory management and vector math to file I/O and image decoding. Actually, as stated earlier, Dagon's secondary goal is to promote dlib and demonstrate its features.
Dagon mostly avoids using the garbage collector and manages all of its data manually with New and Delete functions. You are also expected to do so. You still can use garbage collected data in Dagon, but this may result in weird bugs, so you are strongly recommended to do things our way. Most part of the engine is built around dlib's ownership model–every object belongs to some other object (owner), and deleting the owner will delete all of its owned objects. This allows semi-automatic memory management–you have to manually delete only root owner, which usually is an Application object. When creating objects, it is recommended to make scene's assetManager their owner.
Dagon is a framework-style engine, meaning that it is controlled programmatically and doesn't provide you with an editor (the editor is currently in development). How you will build your scenes is up to you. You can build them manually by loading models one by one in your code, create your own scene format, or export glTF scenes from a 3D editor of your choise. We recommend Blender as an external editor.
Dagon is written with extendability in mind, so you can easily add your own drawable objects, entity components, shaders and asset loaders. Drawable can be anything you want—you can manually create meshes and animate them. With components you can dynamically attach custom data and functionality to game entities. Materials can use custom GLSL shaders and parameters, and your asset loaders help Dagon understand files that you want to load from disk—these can be 3D models, levels, save files, etc.