Voxelius rewrite and maybe a video
I began cleaning up the source tree which apparently just ends with a rewrite, although in my terms a “rewrite” isn’t a particular “make from scratch” and more of a “find a better place to put this or that with occasional code styling changes and using better APIs”, so it’s rather a big refactoring rather than a rewrite
Again?! Why???
Simple: my job. During the development of a wee-little full-scaled CAQ suite, I’ve found out that using something other than GLM for mathematics is suddenly a good idea. Enter Eigen, which is particularly cool because it provides a bunch of features I need by default (for instance, hyperplanes and AABBs of TEMPLATED STORAGE TYPE). Another good reason is that the entire source tree has become a big mess considering all the systems are intermingled with each other. So this rewrite-slash-refactoring is aimed at separating them more and utilizing some techniques employed in the master branch currently.
What’s going to change
Source tree hierarchy
I decided to make the entire engine/core of the game structured similar to how a certain game engine is (obviously I am talking about Godot) with a strict separation into namespaces:
- Core library (
vcore.lib
, subdirectory iscore
) contains stuff that is used throughout the entire project, perhaps even by command-line or graphical utilities that are to be shipped alongside game executables and content - Assets and other miscellaneous game content is still placed in
data
and is copied into the game distribution archives verbatim without much fuss - Dependencies are also still placed in the
deps
subdirectory, however now each library brings its own headers inside its owninclude
directory; more than that, thethirdpartylegalnotices.txt
(nowthirdparty.txt
) file is now automatically generated from all the dependency libraries present in the project - Game sources are still placed inside
game
(game/client
,game/server
andgame/shared
), however internally they are split into more subdirectories, just like in the old times of voxelius historic and voxelius early modern - The good old double-compiled
main.cc
returns, now not insidelaunch
but insidemain
subdirectory alongside perhaps a bunch of stuff related to a new way of handling irrecoverable errors - Build scripts reside in the
scripts
subdirectory. New CMD.EXE batch files are provided for Windows alongside Git bash scripts for convenience.
Architecture
- Subsystems are split into different categories:
config
for configuration variable type implementations,debug
for debugging subsystems,io
for input-output (including file access, mouse, keyboard and window handling),math
for math-related functions,utils
for general-purpose functions that might be used somewhere across the project. - Game systems will also be split into categories:
world
for world-related functionality including voxel registry and et cetera,entity
for entity-related subsystems including components and entity factory,gui
for on-screen graphics including Game UI and HUD elements
Rendering
Won’t change much, but I would like to keep most shaders compiled-in, but allow for some launch-time customization for post-processing effects if they would even become a thing.
What’s after that?
You probably want to ask me why even do a rewrite at this point since you already had a bunch of public tests? The answer is quite trivial as well. I want to start expanding the community because I can’t invest as much time into development as I did back in 2022; now I have a job and an apartment I have to take care of, so it’s kind of a hassle to also full-time on a hobby game alone.
Where’s the code?
For now it’s private. When the time comes, will make a one huge fat commit that just syncs up the current repository (untodesu/voxelius
) with the new source code, but as of now the game is in a working state, can be compiled and played (on the public test server) even though versions are different (protocol versions aren’t)