A little voxel-demo

The Oric video chip is not an easy beast to master, so any trick or method that allows to achieve nice visual results is welcome. Don't hesitate to comment (nicely) other people tricks and pictures :)
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

A little voxel-demo

Post by Nox »

Haven't found one here, so I had to do it...

Image

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
  ...
  
jumping to the appropriate start-location and pokeing a jmp to the appropriate end-location in advance.
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...
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Using the stack, smart :)
User avatar
Chema
Game master
Posts: 3013
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

This is really amazing Nox... Incredible what you achieved in so little time!

Congratulations!
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

ok, Nox.. can we now have Outcast on the Oric? :P
Man that demo is incredible.. Wow!
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

Outcast, hm... probably not this year ;)
Dbug wrote:Using the stack, smart :)
Yes, and sometimes you get some really interesting graphics on the screen when
making mistakes (I had expected the emulator to just freeze when poping/pushing
a differing amount of bytes, but sometimes the result was still playable many seconds)
User avatar
kamelito
Flying Officer
Posts: 182
Joined: Sun Jan 08, 2006 6:34 pm
Location: Nantes, France

Post by kamelito »

Nice demo, if you can't do Outcast this year you can maybe do Rescue on Fractalus ;) (how about Captain Blood)

kml

Nox wrote:Outcast, hm... probably not this year ;)
Dbug wrote:Using the stack, smart :)
Yes, and sometimes you get some really interesting graphics on the screen when
making mistakes (I had expected the emulator to just freeze when poping/pushing
a differing amount of bytes, but sometimes the result was still playable many seconds)
/kml
skype pseudo : kamelitoloveless
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: A little voxel-demo

Post by Dbug »

It's been a while, I was wondering if you could release the source code :)
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: A little voxel-demo

Post by ThomH »

The original file link is now broken. Did anybody preserve this demo?
User avatar
coco.oric
Squad Leader
Posts: 720
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: A little voxel-demo

Post by coco.oric »

I got it, three times in some backup directories ... now i've saved 70 ko on my hd
Attachments
Voxel (2010-03-03)(vox)(PD).tap
Normally, it's the original voxel tap from Nox
(34.26 KiB) Downloaded 475 times
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: A little voxel-demo

Post by ThomH »

coco.oric wrote:I got it, three times in some backup directories ... now i've saved 70 ko on my hd
Thanks! It's a pretty cool demo.
Post Reply