Alternatively, join us on Discord.

[LibGDX][OpenCL] Non-euclidean voxel engine

Started by Snektron, July 01, 2016, 12:21:12 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Snektron

That's right, i'm at it again. This time the engine works in full 3D instead of only in the horizontal plane like my
last non-euclidean project
.

I've recorded a video here: http://webmshare.com/play/gB7RL (about 2.5 MB)

It works by making every voxel an object, with pointers/references to it's neighbors on each face.
(You can imagine it as a 3D linked list).  The rendering algoritm uses the DDA algorithm used in early ray casters (and my last project),
optimized to branchless code for GPU's. The algorithm uses the pointers to walk the structure until a non-empty voxel is hit.
This way, creating a portal is as easy as changing a voxel's neighbor pointer to somewhere else. (So in fact, everything is a portal.) This creates a lot of potential for really bizarre levels.

A small problem is, this engine can never support absolute coordinates, so level designing will be extremely complex. I will try to make a level editor
in the future, which will most likely have arrows drawn between voxels to show where each face leads.

This engine is made in LibGDX and uses OpenCL for the rendering algoritm (which gives a small speed boost over OpenGL shaders). Its still heavily in developement, so no downloads :(. In the future i want to try to make a game with it, which could be one of the first ray traced games :o
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


DJ Omnimaga

Awesome! I was worried this was dead. It looked quite cool back a few months ago but it looks even cooler now. :)

Snektron

Well its actually an entirely new project, and it works in a different (but similar) way too.
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


DJ Omnimaga

Ah I see. I wonder, though, if the old raycaster will be preserved for a calculator port? We don't have a maze game for color ez80 calcs nor any 3D maze for the TI-Nspire IIRC.

Snektron

Well, the source of that project is still on github, and i recently did a big speed improvement. (I removed a sqrt in the ray step function, which was needed for every step of the ray, so now it saves about 640 * 100 sqrt's every frame)
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


DJ Omnimaga

Do you use fixed points? That would be way faster than floating points (on the TI-Nspire CX, someone once used floats and his texture-less raycaster ran at around 5 FPS with a very limited FOV, while Crafti ran at 12-13 FPS with PS2-quality textures.

Snektron

No, and it will probably be slower on x86 based instruction sets since they have hardware float aritmetic instructions (in every of modern model at least).
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


DJ Omnimaga

Oh I see, but what about x64 or whatever 64-bits is?

Snektron

Well thats actually x86-64, a 64 bit version of the same x86 instruction set. It has backward compatibility, so every instruction on a 32 bit x86 processor can also be executed by a 64 bit one.
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


DJ Omnimaga

Ah that's good then. I can't wait to try a demo or something. You should make a video when you got significant progress. :)

Powered by EzPortal