TD SS VOX ATT

Posted by Scott_AW on May 28, 2009, 10:36 p.m.

What?

Anyways, after searching the net for various voxel related engines, are there are a handful, I came to the conclusion that any good voxel engine is either going to require more C and math knowledge on my part, or some other thing….

Although I did find that at one point in time, and if you look hard enough, and believe in magic…you'll find a Voxlap dll that you can use with other programing languages. The demo with it was built in Visual Basic. So one can assume it could work for FreeBasic. And further still, may even be usable in GM. Although I won't be attempting to use it with GM, I think that would be killing the engine.

But what I am doing for the moment is attempting to write out a top down/side scroller voxel engine…just for fun. It will be entirely in FreeBasic, and for the moment just be software rendering.

The concept to me is simple, voxels exist in a grid space, as blocks, its simple. So simple it was not too difficult to create a simple program to inefficiently create a voxel cube with random emptyness within.

Its basicly an array with a randomizer setting each point on or off. Then the array info is drawn to the screen as boxes from back to front.

Of course this causes a lot of needless overdraw, which by sheer luck the answer to the problem may lie in my map creation code for The Crawl. It was designed to ignore touching wall faces, so I just need to incorporate that to ignore hiddenfaces.

As of now no screen shots, and also the images created are made of simple boxes and not cubes. But what I've done currently works fairly well, it took some fine tunning to keep the boxes from looking funny, overlapping, expanding out too much as they got closer, funny overlappings….just to name a few bug encounters, but thats over now. Some of it had to do with how I set some variables, I was trying to keep memory usage low.

Why? Well I kind of wanted to play with the idea of a voxel based side scroller. Even if not truely 3d, it doesn't need to be. If anything, keeping it simpler and yet being able to replicate a 3d scene ala Voxels at a fixed camera angle may be less taxing on CPU. Additionally I can test out the OpenGL for FreeBasic to see if that can improve things.

Comments

Juju 15 years, 5 months ago

Quote:
math knowledge
I can help there.