Join us on Discord!
You can help CodeWalrus stay online by donating here.

[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
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Awesome! I was worried this was dead. It looked quite cool back a few months ago but it looks even cooler now. :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

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


Dream of 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.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of 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.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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).
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Oh I see, but what about x64 or whatever 64-bits is?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of 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. :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal