🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #439

Re: Perspective Mapper and Scaler Code...

#439
From: sl8nl
Date: Thu, 06 Aug 1992 00:02
33 lines
2120 bytes
> Actually, Borland C++ version 3.1 does global optimizing, but I don't think
> it does it well enough to do what you are talking about.  I've been working

No, it doesn't :)   It probably would if Borland had been in the globally
optimizing business from the beginning.

> on some perspective mapping stuff as well.  Assuming that the screen is
> half filled with mapped images at any given moment, I started off with only
> 4 frames per second using nothing but pure C with all optimizations.  After

Try writing a Wolf3d with that :)

> a little inline assembly, it's now up to 23 frames per second and still
> rising.  I guess I'm somewhere between the extremes of those that don't
> want to see the assembly code produced by the compiler and those that find
> it a sin to not write everything in assembly, even if part of the code
> doesn't even show up on a profile at all.

So is part of your perspective mapper still in C...or not.  Hint:  in under
20k (at least with the way mine is written), you can store all of the scaling
structures for a 100x100 object to scale it from 0x0 to 200x200.  That way,
you eliminate Bresenham altogether.  Of course, your object would have to be
fixed, but that is the breaks.  I believe this is how Wolf3d did it.  You'll
notice that when you resize the display, it recalculates something.  I'm
guessing that it is recalculating similar tables.

Besides, as you could see by my source, I'm not an assembly language extremist.  
I did the bulk of the work in Pascal!!!  Hooray for high-level languages...
hey, even demos from Europe are no longer sheer assembly.  For instance,
Ultra Force's vector graphics demo...Pascal.

Take care,
Josh
Technical Details
Message-ID: <1992Aug5.180224.57891@cc.usu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!hellgate.utah.edu!cc.usu.edu!sl8nl
References: <mykes.0b6t@amiga0.SF-Bay.ORG> <1992Aug1.122114.57757@cc.usu.edu> <36686@uflorida.cis.ufl.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!hellgate.utah.edu!cc.usu.edu!sl8nl
From: sl8nl@cc.usu.edu
Newsgroups: rec.games.programmer
Subject: Re: Perspective Mapper and Scaler Code...
Message-ID: <1992Aug5.180224.57891@cc.usu.edu>
Date: 5 Aug 92 18:02:23 MDT
References: <mykes.0b6t@amiga0.SF-Bay.ORG> <1992Aug1.122114.57757@cc.usu.edu> <36686@uflorida.cis.ufl.edu>
Organization: Utah State University
Lines: 35