[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Doom GS (Re: About 1WSW's recent PR attempts...)



In article <2oek42$5ut@charm.magnus.acs.ohio-state.edu> mspaeth@magnus.acs.ohio-state.edu (Wayne Gretzky) writes:
>Doom GS would be a good start ;)

Oy vey. :-)

You *might* be able to pull off a Wolfenstein 3D clone for the IIgs.  I
don't mean another Mazer II, I mean a non-fill-mode version.  You'd have
to scale the screen down a bit though, and it'd be a lot of work.

My understanding is they used a technique called "ray casting", where for
every vertical line on the screen, you send out a ray and see what it hits.
You then draw ceiling from top of window to top of wall segment, draw the
wall segment, then draw floor from wall segment to bottom of window.

You already know the distance from the viewer because you were tracing
the ray.  You also know where on the wall segment you hit, so you get
a limited form of texture mapping almost for free (you do have to scale
the map vertically of course).

If you don't mind lower resolution, you can do two vertical "scan lines"
at a time, so you can write whole bytes.

Drawing moving figures requires more bookkeeping; you need to know which
part of the figure is obscured by walls.  Then, you just don't draw those
parts.

Someone on rec.games.programmer thought that DOOM was written this way;
apparently it was not, but it can be implemented by a more sophisticated
version of this algorithm.  Source code exists.

(Was on ftp.funet.fi in /pub/msdos/games/programming as acksrc.zip.)

Incidentally, DOOM is far more complicated than Wolf3D.  The IIgs just
doesn't have the horsepower.

-- 
fadden@amdahl.com (Andy McFadden)  [These are my opinions, not Amdahl policies]

	You get what you pay for, if you know what you are doing.
		Otherwise, you get what you deserve.