You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

[LibGDX][OpenCL] Non-euclidean voxel engine

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

0
b/PC, Mac & Vintage Computers publicado por u/Snektron July 01, 2016, 12:21:12 PM
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
Inicia sesión o crea una cuenta para dejar un comentario
u/Dream of Omnimaga July 01, 2016, 04:27:48 PM
Awesome! I was worried this was dead. It looked quite cool back a few months ago but it looks even cooler now. :)
u/Snektron July 01, 2016, 06:01:42 PM
Well its actually an entirely new project, and it works in a different (but similar) way too.
u/Dream of Omnimaga July 02, 2016, 07:55:56 AM
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.
u/Snektron July 02, 2016, 08:52:16 AM
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)
u/Dream of Omnimaga July 03, 2016, 04:30:29 PM
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.
u/Snektron July 04, 2016, 09:27:23 PM
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).
u/Dream of Omnimaga July 05, 2016, 01:50:48 AM
Oh I see, but what about x64 or whatever 64-bits is?
u/Snektron July 05, 2016, 09:48:19 AM
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.
u/Dream of Omnimaga July 05, 2016, 04:13:46 PM
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. :)
Start a Discussion

b/PC, Mac & Vintage Computers

Computer programming discussion and project showcase

132
Topics
Explore Board
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal