Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 1.87 KB

README.md

File metadata and controls

48 lines (39 loc) · 1.87 KB

We are Made of Dreams

OpenGL demo written in D, with music by Links

Screenshots

Features

  • 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

Compilation

Windows

Install:

  1. Digital Mars D Compiler
  2. Visual Studio
  3. Visual D
  4. OpenAL

Open the Visual Studio solution dreams.sln and compile all projects

Linux

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

Editor

To enable the editor, execute the application with the -editor parameter.

Editor screenshot

World structure

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: