- Integration of D code with C libraries (WinAPI, X11, Freetype, libjpeg, libpng, OpenAL, OggVorbis)
- Native OpenGL graphics on Windows and Linux
- Minecraft like 3D engine
- Octree based world with multithreaded meshing
- Embedded editor for creating maps
Install:
Open the Visual Studio solution dreams.sln
and compile all projects
Install the required dependencies (Debian\Ubuntu):
sudo apt install libfreetype6-dev
sudo apt install libgl1-mesa-dev libx11-dev
sudo apt install libjpeg-dev
sudo apt install libogg-dev libvorbis-dev
sudo apt install libopenal-dev
sudo apt install libpng-dev
# Digital Mars D Compiler
curl -fsS https://dlang.org/install.sh | bash -s dmd
Compile the project with make
To enable the editor, execute the application with the -editor
parameter.
The world is an Octree of chunks. A chunk is a 16x16x16 matrix of blocks. A block is the smallest unit indexable in the three-dimensional space (x, y, z). A block is represented graphically as a cube.
Relevant source files:
world.d
: world octree structureworld_mesh.d
: generates the mesh of a chunkworld_renderer.d
: asynchronically generate the meshes for the visible chunks and renders them