SimpleVoxelEngine and IrrSimpleVoxelEngine

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Post Reply
Harch
Posts: 77
Joined: Wed Oct 08, 2014 9:01 pm

SimpleVoxelEngine and IrrSimpleVoxelEngine

Post by Harch »

Hello everyone!

In 2016, I wrote this engine designed to display and process cubic worlds (for example, minecraft or minetest).
It consists of two modules SimpleVoxelEngine and IrrSimpleVoxelEngine. The first module is not tied to irrlicht and is an independent engine that processes cubes and their logic, and this happens in one thread. The second module is already a binding to irrlicht and deals with the processing and creation of meshes, as well as the processing of multi-threaded logic. Full documentation (doxygen) and lessons are ready for the first module. There is documentation for the second module, but no lessons, there are only a couple of examples in TestProject. I vouch for the work with the current version only TestProject3. The second module itself is not fully completed, there are a lot of things I want to finish. For example, embed a system for ordering the mesh "from the camera" so that transparent nodes look normal, embed the Greedy Meshing algorithm for greater optimization. Also fix multi-threaded generation and update of chunks, at the moment it is disabled, since the engine periodically crashed during its operation, and then I did not find the reason.
The plans are to add the ability for the cube to be a chunk itself, that is, "in depth" any number of partitions. Initially, this was built into the modules, but at the moment it does not work. And also add multi-threaded logic to the first module.
I'm not sure that I will soon return to this project and finish it, but someday it will definitely happen.
At the moment, all the documentation is in Russian, but you can translate it into English on the go.
Link to github: https://github.com/Harchvertelol/SimpleVoxelEngine
Link to IrrSimpleVoxelEngine example (without many extra code): https://github.com/Harchvertelol/Simple ... n/main.cpp
Link to docs (doxygen): https://github.com/Harchvertelol/Simple ... umentation
I am also attaching some screenshots (below). FPS on screenshots sometimes incorrect due to taking screenshots (the game would lose focus and stop working). On the first screenshot, about 80 FPS, on the second and third 300-400 FPS. On the rest I did it through a print screen, so the FPS is correct.
I decided to show, you never know, someone wants to use it or is interested. The purpose of all this was to give the user the opportunity to have maximum control over the display and manage the picture, without thinking about algorithms for processing cubes. To some extent, this, I hope, worked out (see file main.cpp below).

P. S. Sorry for Google Translate :(

Image
Image
Image
Image
Image
Image
Harch
Posts: 77
Joined: Wed Oct 08, 2014 9:01 pm

Re: SimpleVoxelEngine and IrrSimpleVoxelEngine

Post by Harch »

Good afternoon, everyone!

Using AI, I’ve fixed all the bugs in the engine and added a few things I hadn’t previously gotten around to (I plan to upload it to the repository in the near future). Given that I’m not entirely clear on the current state of Irrlicht, I’m going to hold off on further developing the wrapper for it. I might end up refactoring it so that the wrapper-needed to connect to any engine-remains lightweight, while the core mesh logic is handled within IrrSimpleVoxelEngine itself (this will serve as an intermediary layer for any engine).

If anyone could shed some light on what’s currently happening with Irrlicht - whether it’s still being actively developed or if it’s been abandoned (and whether it’s a suitable choice for a large-scale voxel game, which is what I’ve long planned to build and why I wrote this engine in the first place) - I’d be very grateful.

P.S. I’ve heard mention of something called "IrrlichtMT" - could anyone tell me what that is? Thank you!
CuteAlien
Admin
Posts: 10064
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: SimpleVoxelEngine and IrrSimpleVoxelEngine

Post by CuteAlien »

Irrlicht is still maintained (https://sourceforge.net/p/irrlicht/activity), but it's been going slow over last years. It's a bit outdated when it comes to tech, thought it got also a lot more stable. Irrlicht 1.9 is still not ready for release, but for most cases the development version improved compared to Irrlicht 1.8.

IrrlichtMT was a fork for Minetest (called Luanti these days). You have to ask them about it for details, but I guess they decided to make it more game specific. Which may work for you given that it's also a Voxel game. I have no idea about their support for other people using their engine.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Harch
Posts: 77
Joined: Wed Oct 08, 2014 9:01 pm

Re: SimpleVoxelEngine and IrrSimpleVoxelEngine

Post by Harch »

What about using AI for fast release for irrlicht 1.9? Where I can download latest version of 1.9? Is version 1.9 better to use than 1.8.5? Is it better to write code for that version?

Regarding my game: I specifically need a robust and convenient way to handle lighting, shaders, and threading, so that the game’s visuals aren’t off-putting. Irrlicht is certainly capable of delivering such visuals—provided there aren’t any major internal bugs or performance issues when rendering high-quality graphics. Since Luanti itself looks decent enough, it’s clear that Irrlicht is up to the task; the real question is the level of support available. And whether allows for rapid development of the visuals, so I can focus on the game’s actual logic.
CuteAlien
Admin
Posts: 10064
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: SimpleVoxelEngine and IrrSimpleVoxelEngine

Post by CuteAlien »

Not going to let AI write the engine. If you want that make your own branch.
Latest version is in svn: https://sourceforge.net/p/irrlicht/code/HEAD/tree/
svn trunk (what will hopefully be 1.9 some year) is in general a lot better than 1.8
Irrlicht can be tricky when it comes to advanced lighting and shaders. So depends a bit on how deep you want to go with shaders. The basic problem is that it's build around several decade old tech like fixed function pipelines. And then a bit shader support got glued on top. svn trunk improved it a bit, but that's it. There is basially no support for threading, if you really need that I'd rather look for an engine using Vulkan.

Irrlicht is nice for simple projects. For large projects you will be better off with a larger engine.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply