<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 23 Sep 2002 17:12:38 +0100
From   : Thomas Harte <thomasharte@...>
Subject: Re[1]: rupture technique

--=_NextPart_Caramail_0203091032797552_ID

> >By the way, something which I've always thought would be interesting would 
> >be to use this technique to program a new start address every line (or 
> >every other if timing conditions require) in order to make a Wolfenstein 
> >type display on the side. You'd almost certainly not be able to do the ray 
> >cast once per frame with all that going on, but you'd be in the region of 
> >5-10fps, surely?
> 
> Luckily enough, there is a technique similar to rupture that does exactly 
> that, forcing a reload of the start address every fame.

Is that a small typo - and you mean every line? If not, is it at least
possible to reload the counter every other line or whatever? If that isn't
possible, please everyone politely ignore the remainder of this message.

> As for speed, I reckon that a textureless mode 8 raycaster using the above 
> technique should run reasonably.

I don't see texturing to be a problem, if colour resolution is low.

Suppose we are in a 160 pixel mode, and we select to scale our slithers 
so that the largest is indeed 160 pixels wide. Say that the minimum width
is 2 pixels, and we don't do anything like subpixel accuracy. That gives
only (160-2)/2 possibly sized slithers, which is just 79.

In 40 byte pitch mode, precalculating all the possibilities and putting 
them on screen 'for free' simply by playing with the start addresses per 
line costs only 3160 bytes, and any combination of texturing/depth lighting/1d
mip mapping that makes sense within 4 colours (40 byte pitch) is usable
without additional runtime cost.

Thats if the texture is 1d anyway. But at a severe stretch (or if you 
supported sideways RAM machines only) you could fit 8 such tables into
memory and use a single 8 texel wide texture. Doesn't sound much, but would
be okay for a suitably repetitive texture like brickwork or wooden planks
or something.

Presumably you use the VIAs so that a timing heavy section of code for 
pixel covered parts of the display and a ray caster during the top/bottom 
border and vsync could coexist? In which case I'm aware that the ray casting 
code I've seen for the Atari Lynx can do around 10,000 casts per second 
- which is a 4Mhz 65SC02 with an external unit providing hardware multiply. 
I guess that means around 600-700 cycles per average ray cast on a normal 
6502, or around 560 rays cast per second assuming the normal display area
of 256 lines. So, a shade over 2 fps. Although that rises to a little over
6 fps if you cut the display down to 192 lines, the same height as a ZX
Spectrum.

Now . . . . anyone want to give it a go? :)

-Thomas
______________________________________________________
Check out all the latest outrageous email attachments on the Outrageous
Email Chart! - http://viral.lycos.co.uk	


--=_NextPart_Caramail_0203091032797552_ID--


<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>