Yes, in one corner I built a little "city"
That could look better of course with some fine-tuning (and a mapeditor...)
so here's the file
voxel.tap
- Uses a hires display with virtual 40 x 100 pixel.
- Mapsize is 128 x 128 (byte), using 5 bit for height and 3 bit for color
(in fact, it uses the whole 8 bit to determine the color, so one could use more bits for height).
- 8 altitude-levels for the player, view-distance is 16.
- The voxel part could be optimized, but the drawing itself is quite fast I think.
I draw a whole column on the stack (up to 100 byte!), and then copy it to the screen with just a long list of
Code: Select all
pla:sta $A000,x
pla:sta $A050,x
pla:sta $A0A0,x
...
So 12 cycles per "pixel" (just for drawing), and in the main loop I have X and Y free for other things and don't have to worry about screen-positions.
- It's fast enough that the from-left-to-right-screen-update doesn't look to bad, and at 2/4 mhz you really have a feeling of "flying"
ps:
- "rotate map" will in fact not rotate the map, but move the player in a circle around the map, always looking to the center.
It draws 128 frames, so have some patience or get some coffee...