Jump to content

Voxel demo screen 1.0.1

   (4 reviews)

1 Screenshot

About This File

This is a simple voxel demo written in 65c02 assembly. It has been tested in the r38 emulator.

Press W A S D to move around.

Press SPACE to quit.

 


What's New in Version 1.0.1   See changelog

Released

New version, about 10% faster.


try_it

Yes

try_it_start_prg

VOXEL.PRG
  • Like 12
 Share


User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest

Ed Minchau

   3 of 3 members found this review helpful 3 / 3 members

This is AWESOME.  I can totally see a game like Comanche based on this.

  • Like 1
Link to review
Jeffrey

   3 of 3 members found this review helpful 3 / 3 members

Wow! Very cool demo! 🙂

How did you do this?

Response from the author:

Thank you!

The algorithm used is much much simpler than the raycasting engine you wrote. I have not yet wrapped my head around raycasting, with the DDA and stuff.

Basically there are 20 slices drawn from front to back. The perspective projection for each slice is precomputed. This gives 20 vertical positions (an arrray of 20 8bits number). Because of this you can't move up and down. Maybe with some more precomputation it could be worked around.

For each column of a slice,  a texture lookup is done. The texture lookup start and increment are also precomputed per slice (2 arrays of 20 16bits numbers). The height is read and a zoom factor is looked up. The are 32 heights possible. So with 20 slices it gives an array of 640 8bits numbers.

Each column is drawn using VERA increment mode, which is very convenient for this kind of rendering.

I think I will post the source code of the demo and the generator in the forum thread.

 

  • Like 1
Link to review
×
×
  • Create New...

Important Information

Please review our Terms of Use