Allegro.cc
Projects
Action252
Adventure22
Arcade216
Board Games30
Demos24
Emulators10
Other68
Puzzle139
Role Playing40
Sports25
Strategy58
Utilities46
Resource Directory
Code Gallery3
Compilers12
Help & Documents13
Libraries63
Media2
Tools8
IOTD: UOVLR (UnOptimised Voxel Landscape Renderer )
UOVLR (UnOptimised Voxel Landscape Renderer )
UOVLR (UnOptimised Voxel Landscape Renderer ), by Niunio

Finally, I did it!

I tried to create a Landscape Renderer since I meet Allegro. First, I tried to do it with polygons, but it doesn't work: I had some odd exceptions at memory access that I never found :P.

But this Friday I had The Idea: a Ray-Cast/Voxel Landscape. Well, aybabtu started some ray-cast threads, but I didn't used them to create my renderer. I used a tutorial I found at flipcode, some of my lovely math and a lot of common sense, et voilá.

As the title says, it is unoptimized, because as Ohannessian said: "early optimization is evil". This way I can optimise it when I'll code the game and get advantages from the game characteristics. As example, the code I've included uses a bitmap as heighmap, and other more as texture but may be I'll use one or two tilemaps instead, and that's a lot different, doesn't it?

The top images are the same, but left uses float-point and right uses Allegro's fixed-point, that is much faster but less accurate (note: It is an unoptimised code running in a PentiumII/333Mhz,320x200x32bpp, so the frame rate is low) The bottom ones are also the same float-point image, but left is 32bpp and right is 8bpp with standard palette. The renderizer doesn't includes filter images, the soften is provided by David Capello's ASE (¡Gracias, chico!:))

If you want the sources, keep online: I can't upload it now, but I'll try to do it this week.


The Gallery | Add your own image!
Poll
Is grammer and spelling important?
View Results