VoxaEngine - C++ SDL2 Voxel Engine

VoxaEngine - C++ SDL2 Voxel Engine

•  •  11 updates •  20h 32m

Voxel based game engine capable of sand falling style simulation, heat and pressure calculations, fire spreading and much more!

By Hat Dealer

Timeline

Hat Dealer
Hat Dealer 1h spent working 70d ago

Added impact and particles to the gun. It has a little bit more action to it but didnt really have time to play around with any sounds or anything so its not totally 100% 😭. Still, its a lot better than the previous version in my humble opinion

Hat Dealer Hat Dealer 2 months ago

Btw the wood is not burning entirely because there is a buildup of carbon dioxide around in. It might seem wierd for someone who isnt used to seeing it like that

Hat Dealer
Hat Dealer 1h spent working 71d ago

Added a gun thats tied with the laser! Only shoots a single voxel in a direction with not much of an effect but the next update will be adding particles to its flight path and to the impact zone !

Hat Dealer
Hat Dealer 1h spent working 72d ago

Added GameObjects that can be spawned anywhere in the world. They are kinda barebones but eventually I could make them interact with the world, roll around and do other stuff. I also remade the player so that it is now a GameObject itself and not a different uninheriting class specific to the player

Hat Dealer
Hat Dealer 4h spent working 72d ago

So many fixes for ghost crashes and bugfixes 😭🙏. I also added Box2D simulation library thats compiled with the project but so far it only starts up but doesnt do anything yet. Next update which I wanna do today is a Player rework where I make it a gameobject and enable creating of another game objects that will play nice with the Box2D when I integrate it. After that I wanna give the player a gun 🥹. Hopefully I can make it today but if not I will work on it tomorrow

Update attachment
Hat Dealer
Hat Dealer 2h spent working 74d ago

Reworked my openGL compute shaders to be actually expandable and good. Not only should the simulation run faster, but it can easily support more shaders than just one for heat and pressure propagation. I am amazed that it worked almost immediately 😭

Update attachment
Hat Dealer Hat Dealer 2 months ago

For the interested my current, very unstable and definately not promised roadmap in no order whatsoever looks something like this:
- Add Box2D physics and objects that you can interact with (barrels you can kick etc.)
- Add dynamic lighting so you could maybe carry a physics lantern around to see anywhere where there isnt light
- Add a gun that the player can use that would kick around and destroy the Box2D objects. Would need reworks for the player and voxels to be possible
- Add actual world generation. The engine is optimized to work in enclosed enviroments so it will be something like infinitely generated caves with biomes and such. This will also make the lighting look very cool as I could make glowing flora and so many cool things

Hat Dealer
Hat Dealer 2h spent working 77d ago

Some more of bugfixing and finding errors. To at least give yall a small feature to look at, the player has been given a laser pointer !! :D. (some might even say it may look like a laser pointer for a gun ?? 👀). AND YES THE NOITA SPRITE IS TEMPORARY 😭😭

Toshit Toshit 3 months ago

The fade out effect at the end and flickering is really cool, I like it

Hat Dealer
Hat Dealer 1h spent working 81d ago

A bit late update I know 😭. Life kinda got in the way but I promise that there will be at least 10 updates total until the end of Journey 🥹. I bring you the laser :O The main thing I added is the particle generator prototype, it can be used to generate any type of particles in any way (picture a laser, a shield barrier or a hologram). the laser is just a specific type of particle generator. As I mentioned before, the particles can actually manipulate and read everything around them and to show that I made the laser stop if it sees an obstacle and dim in liquids. The laser can be easily tweaked by changing its color etc. I just kinda slapped a nice color and made it flicker a little bit but it can be more advanced than that.

I cant promise when will the next update release or how big will it be. School and work piled up a little bit and I have to sort it all out 🥲. There will definitely be a lot more and bigger updates at the start of next month.

Hat Dealer
Hat Dealer 1h spent working 85d ago

Setting up the slightly newer particle system was quicker than I thought lol ! Similar particles (the flying sand) were already in the engine but this is them working in the new particle implementation. Interesting fact: that these particles exist entirely outside the sand falling simulation. I can make them interact with the simulation but not make the simulation interact with them. The next update is probably gonna be some laser or fire particle implementation but that probably wont happen today :D

Hat Dealer Hat Dealer 3 months ago
Good to know! I dont really plan much on making a web version but who knows, maybe one day
Toshit Toshit 3 months ago
sdl2 and opengl are fine unless you're using stuff that isn't compatible with opengl es 3. multithreading is fine too, wasm supports it with some headers
Hat Dealer Hat Dealer 3 months ago
I just realized that you cant really see it from the demo but the worlds are also "infinitely" big and "explorable" (there is basically no terrain generation yet). I just wanted to point that out 💀
Hat Dealer Hat Dealer 3 months ago
I also dont know anything about compiling to wasm but this uses OpenGL, SDL2 libraries, multithreading and more and I am pretty sure that at least some of those things wouldnt be compatable on the browser 😭. This engine is also pretty CPU and memory expensive to the point I can get only around 200FPS on my PC when running the C++ exe file sooo I think that this wouldnt be really runnable in the browser
cwalker cwalker 3 months ago
holy shit this is so satisfying lol what are the odds you can get this to run in browser through emscripten (I know nothing about compiling to wasm, so…)
Hat Dealer
Hat Dealer 52m spent working 85d ago

Just mainly playtesting and finding some problems/bugs to fix. OpenGL computational shaders should run a bit better and the spreading of gasses in a vacuum should be somewhat faster

Update attachment
Hat Dealer Hat Dealer 3 months ago
The particles will take some time to be presentable ! As soon as I get a somewhat working prototype I will post an update with a video ^.^ I think that the first particle added in the new system will be the one that already existed in my janky system that spawned when an explosion happened but with the new system it should be so much easier to add lasers and fire particles and so much more !!
cwalker cwalker 3 months ago
Yo this is so sick. Do you have video-worthy results yet? I am incredibly curious to see this in action
Hat Dealer Hat Dealer 3 months ago
Probably gonna try to add particles next but I dont promise any results ! :O
Hat Dealer
Hat Dealer 40m spent working 86d ago

Fixed and somewhat improved gasses filling in a space filled with vacuum. When the pressure of gasses becomes too low (1*10-7) they become a vacuum.
With larger distances and tighter passages the gas spreads more and more slowly (somewhat intended)

Neya Neya 3 months ago
really like this project so far
Hat Dealer
Hat Dealer 1h spent working 87d ago

Updated voxel registry to better support custom voxel constructors, added vacuum as a voxel type. made fire slightly better

Neya Neya 3 months ago
cool