Config
This is a WIP project - Expect breaking changes to occur.
Overview
Since the engine is data-driven, the configuration is stored in a YAML file, named config.yaml.
This contains keys for each of the engine’s customisable systems.
API NOTE:
There are two keys in the config file that should NOT be changed.
The voxel_engine_version and voxel_config_version keys are used by the engine to ensure compatibility with the config file.
If you change these, the engine may not be able to load the config file, or may encounter errors when trying to use the settings.
Game Settings
game:
title: "VoxelEngine Demo"
width: 1280
height: 720These usually managed by the engine itself, but you can override for example the title of the window, or the resolution.
Typically, the only reason you would need to manually override is if you encounter a bug with the in-engine method.
Window Settings
window:
backgroundColor:
red: 1.0
green: 1.0
blue: 1.0This is an example of a more specific setting, in this case the background color of the window.
The engine will use this color to clear the screen each frame, so it is important to set this to a color that works well with your game.
Graphics Settings
graphics:
render_dist: 16
fov: 70.0
chunk_size: 16
vsync: trueThese are some of the graphics settings that you can configure.\
- The
render_distis the distance in chunks that the engine will render.\ - The
fovis the field of view, which determines how much of the world is visible on the screen at once.\ - The
chunk_sizeis the size of each chunk in blocks.\ - The
vsyncsetting determines whether the engine will synchronize the frame rate with the monitor’s refresh rate, which can help prevent screen tearing.
Debug Settings
debug:
# Log level (OFF, ERROR, WARN, INFO, DEBUG, TRACE)
level: "INFO"
# Throw exception on assertion failures
throwOnAssert: falseThese are some of the debug settings that you can configure.\
levelis the log level, which determines the verbosity of the logs.\throwOnAssertdetermines whether the engine will throw an exception when an assertion fails, which can be useful for debugging your own mods or any bugs you find.