Skip to content
David Herberth edited this page Jun 14, 2013 · 9 revisions

Development

Makefile

Use the Makefile only on Linux/MacOSX etc.

Build glfw only:

make glfw

Build BraLa:

make

Cleanup previous builds:

make clean

Cleanup everything (including glfw and other dependencies)

make clean-all

Folder Structure

/
|-- COPYING – copy of GPLv3 license
|-- Makefile – makefile for linux and mac (no windows support)
|-- README.md – readme in markdown format
|-- build_brala.d – build script for brala (mainly to enable an easy compilation on windows: rdmd build_brala.d)
|-- command.make – backend for the Makefile, containing e.g. options for different compilers
|
|-- brala/
|     |-- camera.d – contains OpenGL camera implementation
|     |-- character.d – takes care of player movement and camera
|     |-- config.d – (will change) contains commandline parsing and movement keys
|     |-- engine.d – contains all OpenGL relevant objects, shaders, samplers, textures, matrices etc. and takes care of them
|     |-- exception.d – collections of exceptions BraLa might throw
|     |-- game.d – contains all game logic, like creating a world (reacting to packets), starting a connection or handling player movement
|     |-- main.d – initializes everything, contains main-function
|     |-- resmgr.d – resource manager implementation, used by engine to load Images, Shader and Textures
|     |-- timer.d – contains a simple timer class and a fpscounter
|     |
|     |-- dine/
|     |     |-- chunk.d – contains the chunk class, which takes care of memory allocated for blocks
|     |     |-- util.d – only a few math helper function
|     |     |-- world. – holds every chunk of the current world, generates vertices and renders each chunk
|     |     |-- builder/
|     |           |-- vertices_/ – contains vertex-data for all (implemented) blocks
|     |           |-- biomes.d – contains biome specific code, like humidity/rainfall values and functions to retrieve the actual color
|     |           |-- blocks.d – contains information about blocks, like opacity or relevant information for the tessellator
|     |           |-- builder.d – generates the blocks vertices and writes them into the tessellation buffer
|     |           |-- constants.d – contains general constants, like directions or biomes (might change)
|     |           |-- tessellator.d – handles block-vertex generation (mixes in builder.d)
|     |           |-- vertices.d – module to access vertices_ folder
|     |
|     |-- gfx/
|     |     |-- gl.d – relativly empty, contains OpenGL helpers/abstractions
|     |     |-- palette.d – merges grasscolor.png, leavecolor.png and watercolor.png into one image/texture
|     |     |-- terrain.d – sets up terrain.png as BraLa needs it (Future?: stiches the terrain.png), also contains code to extract terrain.png from minecraft.jar
|     |     |-- text.d – parses chat messages
|     |
|     |-- network/
|     |     |-- connection.d – takes care of the connection (sockets etc.) and encryption
|     |     |-- crypto.d – helpers to implement OpenSSL encryption and lastlogin decryption
|     |     |-- session.d – handles sessions with the minecraft website, also loads minecrafts lastlogin file
|     |     |-- stream.d – contains AESStream implementation and a debugging logger-stream
|     |     |-- util.d – handles every read and write to the stream also contains some needed helpers
|     |     |-- packets/
|     |           |-- client.d – contains all packets a client sends
|     |           |-- server.d – contains all packets a server sends
|     |           |-- types.d – special types, like Chunk or EntityMetadata are handled here
|     |           |-- util.d – mostly packet-generation code
|     |
|     |-- utils/ – contains generally useful and amazing code
|           |-- config.d – a config parser
|           |-- console.d – implements colors for a linux console, provides windows stubs
|           |-- ctfe.d – generally useful templates for CTFE
|           |-- dargs.d – easy and CTFE using commandline parser
|           |-- defaultaa.d – contains a default AA implementation
|           |-- exception.d – every exception thrown by brala.utils is stored here
|           |-- image.d – contains code to load images and manipulate them (uses stbi)
|           |-- memory.d – (c/m)alloc, realloc functions, also contains memory counter (used for vram counter in world)
|           |-- queue.d – contains a threadsafe queue implementation
|           |-- thread.d – contains VerboseThread, a timer and a threadsafe event class
|           |-- openssl/
|                 |-- encrypt.d – abstracts: http://www.openssl.org/docs/crypto/EVP_EncryptInit.html
|                 |-- exception.d – contains openssl specific exception code
|                 |-- hash.d – abstracts all OpenSSL hashes
|
|
|-- lib
|     |-- win(32|64)
|     |     |-- glfw3.dll – glfw built for windows
|     |     |-- glfw3.lib – glfw import library
|     |     |-- libeay32.dll \
|     |     |-- libeay32.lib  \ OpenSSL dynamic libraries
|     |     |-- libssl32.dll  / and import libraries
|     |     |-- libssl32.lib /
|     |
|     |-- linux(32|64)
|     |-- osx(32|64)
|
|
|-- res
|     |-- brala.conf – holds the brala configuration
|     |
|     |-- shader
|     |     |-- terrain.shader – contains the shader which runs for each block vertex
|     |     |-- test_input.shader – an old testing shader
|     |
|     |-- texture
|           |-- grasscolor.png – holds grass-colors based on humidity and rainfall
|           |-- leavecolor.png – holds leave-colors based on humidity and rainfall
|           |-- terrain.png – holds the block-texture-atlas (will probably be reworked with a stitcher)
|           |-- watercolor.png –holds water-colors based on humidity and rainfall
|
|
|-- src/
|     |-- c/
|     |     |-- glfw – contains complete glfw3 code (submdoule)
|     |     |-- stb_image.c – contains stbi: http://nothings.org/
|     |
|     |-- d/
|           |-- derelict3 – contains code to load opengl and glfw dynamically (submodule)
|           |-- gl3n – contains all matrix/vector/quat etc. math (submodule+)
|           |-- glamour – OpenGL abstraction (submodule+)
|           |-- glfw – glfw bindings (submodule+)
|           |-- glwtf – glfw abstraction (submodule+)
|           |-- nbd – NBT file format parser (submodule+)
|           |-- openssl – OpenSSL bindings (submodule+)
|           |-- stb_image.d – stbi bindings
|           |
|           |-- arsd/
|           |     |-- http.d – simple module to make get/post requests
|           |
|           |-- std/ – contains modules from phobos with patches which aren't into phobos yet 
Clone this wiki locally