Zylann / godot_voxel

Voxel module for Godot Engine
MIT License
2.71k stars 251 forks source link

Add VoxelEngine as an official Redot module #709

Open xaoseric opened 1 month ago

xaoseric commented 1 month ago

Redot is a new fork of Godot, I would like to see VoxelEngine added as an official module to Redot as Redot is open to adding new features as a way to stand out from Godot and having an official voxel engine built in would be beneficial to the larger community.

https://github.com/Redot-Engine/redot-engine

Zylann commented 1 month ago

You are free to include a copy or Git sub-module of the voxel module to a fork of Godot, as long as the license is included. In fact, maybe you should open an issue on Redot if you want this. I won't do that myself.

If it gets included in Redot, I will still maintain this project from the current repo, so if fixes or improvements are needed, it should preferably be done here and then mirrored into Redot (either via copy like Godot does with thirdparty libs, or Git submodule) so the same repo works for both. If Redot starts to diverge too much from Godot, it might also be necessary to introduce a preprocessor symbol in Redot (to also identify its versions), that can be recognized by the module to switch between APIs, similar to how I currently do to compile both as a module or as an extension (as long as it remains reasonable). The module currently relies on VERSION_* and custom ZN_GODOT_EXTENSION macros to adapt to different versions of Godot and whether or not it is built as an extension. This way the main branch of the module compiles for all of them without having to maintain many Git branches. If the build system itself diverges... well, not sure about that. For GDExtension I had to write a completely different SCons script, with some shared stuff because it's both Python. But if Redot switches to CMake, Meson, Zig or whatnot, yet another build script may be needed. Regarding divergences it will depend on what Redot wants to change and by how much. I'm working on my free time in Godot currently, not Redot, so I dont really have time to follow multiple engines in addition to gdmodule/gdextension. Right now things should be compatible, but in the future you might have to do PRs yourself if major changes occur in Redot.

Side note: I intentionally didnt expect this module to be built-in Godot in the first place. I'm not opposed to that, but Keep in mind this module is much more experimental than official features found in Godot, which would affect the experience of new users of Redot. Some features are not considered "finished", and development is relatively slow compared to Godot. It's also a bit more difficult to use, and focuses on certain aspects of voxel terrain, not all you can do with voxels. While there is a lot of goodies if you want to get voxel terrain quickly, you have to be prepared to tinker with it.