Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Voxel Techniques in DBP?

Author
Message
Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 11th Sep 2013 21:41
Hey everybody,

I've made a thread about dynamic terrain, but this will be specifically about voxel terrains. My sister and I are building a space exploration game with all kinds of planets to explore.

Nowadays is the hot trend to have fully editable voxel terrains (either blocks, or smooth). Now I wish to experiment with this technique but have absolutely no idea on where to start with in DBP.

The idea is to make a spherical planet shape with (smooth) voxels. Any ideas or suggestions on how to approach this?

Thanks!

Regards Sph!nx
www.mental-image.net
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 11th Sep 2013 21:50
It's pretty advanced stuff. You'll basically have to write your own renderer. You'll keep a 3D array to contain various points (like pixels, but with a depth value as well). Then you figure out, from a given point of view, what pixels are visible, where on the screen they will show up, etc. and draw individual pixels to represent these. For a decent engine you'll want transparancy and lots of funky things, but the basis is rendering that 3D array of points. Each element in it simplest will only have a colour. Start with that and see if you can get anything going


"Why do programmers get Halloween and Christmas mixed up?"
Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 11th Sep 2013 21:56 Edited at: 11th Sep 2013 21:58
Sounds complicated indeed...

This looks like a mesh that's manipulated, but I do believe its a voxel rendering.
http://www.indiedb.com/games/masterspace/videos/trailer#imagebox

Can't something like this be done with meshes (with culling to remove unseen stuff)?

Regards Sph!nx
www.mental-image.net
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 11th Sep 2013 22:21 Edited at: 11th Sep 2013 22:22
Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 11th Sep 2013 22:26
Al right, thanks Chris. I'll hop into that thread and this one can be considered as closed.

Regards Sph!nx
www.mental-image.net

Login to post a reply

Server time is: 2026-07-07 00:50:29
Your offset time is: 2026-07-07 00:50:29