Divine Voxel Engine - Voxel Engine Made With Babylon.js - Alpha 1.0 Out Now

So, I am almost done with Alpha 1.2 after that I am moving onto 1.3 which will be a server update so it can run headless on a node.js server.

I finished adding all the stair states:




Added an awesome player/physics system and made a sweet demo:

I got the water mesh looking really good:

And finally added dual voxels/underwater voxels:

Also the game I am working on looks so good now with the improved lighting:

4 Likes

GORGEOUS stuff as always! :star_struck: I can’t wait to see more of your game! What genre is going to be? :open_mouth:

1 Like

@carolhmj
So, the game is called Empyrean Crystalline Ecstasy and it is an infinite psychedelic runner platformer adventure game.

2 Likes

THIS is better and better, keep the updates flowing !!!

1 Like

Can’t agree more!

1 Like

So, been up to a lot of new stuff lately.
Thanks to whoever invented the material plugin system.
I am reworking the materials to allow for dynamic lighting as you can see here:


I also made a system to convert a 2d texture to a model for the engine:

Also added a way to create a mesh from voxel data that you can do anything with:

I also worked on something that you can’t directly see.
I converted all voxel object data to raw binary data that is synced between all the threads that need it.
It is accessed using the DataView object.
So, it brought down the memory usage for 14 voxels from 2kb per thread too 100 bytes for all threads.
I will be working on more optimizations like this in the future

12 Likes

Your updates always make me smile :slight_smile:

2 Likes

cc @Evgeni_Popov for the compliment about Material Plugins :wink:

1 Like

Thanks, that was a conjoint effort with @brunobg !

1 Like

You understand most of us would know the sh*t about how you can push it to this level of optimization, yes? :grin: Just don’t let anyone say that BJS cannot be optimized to the outmost performance. For anyone who dares saying this to me, I shall from now on simply forward the link to your demo :stuck_out_tongue_winking_eye:

3 Likes

YESSSSSS dynamic lightning looks so beautiful :heart_eyes: and the model creation is suuuuper nice!

1 Like

Well it is honestly awesome and basically unlocked so many things.
Thank you! I think it will really take BJS to the next level.
With it I even got normal maps working now:


For the light sources I tricked the shader into thinking there is a light coming from the camera and it it’s direction is also the camera’s direction.

Going to work on a water material with reflections next.

3 Likes

Well I would appreciate that lol.
I am making this project because I believe in the power of JS and its’ future.
~~I also have a background in computer science so that helps a bit with a lot of this stuff.
I am very much a computer nerd at heart.

3 Likes

Just wanted to share something I did for fun.
I replaced the skybox with a ray marching shader that you can actually fly around in.


I realize I’ve been working on the engine at the break neck speed and need to slow down a bit but I will keep pressing on.

9 Likes

Star butterfly hypnotized(gif) by Osvaldito001 on DeviantArt

I’m totally hypnotized! AND I LOVE IT!
Indeed you’ve been making progress at an insane speed, but never forget to take care of yourself too! We’ll always be here to marvel on your updates :heart_eyes:

2 Likes

I released alpha 1.2 last week:

And now I am starting on Alpha 1.3 which will allow the engine headless on a server and officially add water flowing/removing.

Here is the first working example of that:
bjsdss

I also finally figured out how to get the engine working on a normal webpage:
https://divine-star-software.github.io/DVE-Examples/

Though be mindful you will need a decent PC with a good GPU because of all the shader effects.
Which I will make a way soon to turn all of that off as I’ve seen it cause some issues for people.

7 Likes

This thread keeps delivering :slight_smile: GG @lucas-divinestar

1 Like

Really impressive… actually runs solid 60fps on 2020 macbook pro and thats saying something

1 Like

I took a bit of a break from the engine so I could move to my new apartment.
But in the spirit of Halloween made some cool new stuff:



I got a lot of plans for the engine and some tools that I want to build for it. So, I will everyone posted on that when they come out.

7 Likes

I am releasing Alpha 1.2.2 this week. I made some huge changes to the engine.
I actually was able to make the engine faster and reduce the complexity by a lot.
I wrote a whole new library called ThreadComm to handle all the multi threading and data syncing for the engine.

For the engine’s API it uses something called tools now.

The first one being a brush. So, to generate a simple world all you have to do is this:

import { DVEW } from "../../../../out/World/DivineVoxelEngineWorld.js";
const brush = DVEW.getBrush();
export const WorldGen = {
 generateChunk(chunkX: number, chunkZ: number) {
  brush.start().setId("dve:dreamstone");
  for (let x = chunkX; x < 16 + chunkX; x++) {
   for (let z = chunkZ; z < 16 + chunkZ; z++) {
    for (let y = 0; y < 18; y++) {
     if (y < 5) {
      brush.setXYZ(x, y, z).paint();
     }
    }
   }
  }
  brush.stop();
 },
};

The other tools are:

  • Builder Tool - Used for building chunks.
  • Data Tool - Used for reading and updating voxel data.
  • Tasks Tool - Used for queuing up and running tasks like RGB light updates.

Included in the update is different dimensions. So, you have potentially infinite dimensions for your voxel game.

Also for the update I removed all the old player code and now every example uses the best player example and the current physics engine.

There a lot more changes but would take me hours to explain. Let’s just say I rewrote basically 70% of the engine and soon I will re-work the other 30% to start to get ready for WebGPU integration.

Updated water meshing a bit more:


Some more pictures of the “dread spaces”:



8 Likes