www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/28/19:33:49

To: os-dev AT effect DOT net DOT au
Cc: djgpp AT delorie DOT com
Subject: Re: PLEASE! Help optimize my floorcaster....
Message-ID: <19970728.193359.7127.0.fwec@juno.com>
References: <33DB24DC DOT 156 AT effect DOT net DOT au>
From: fwec AT juno DOT com (Mark T Logan)
Date: Mon, 28 Jul 1997 19:33:16 EDT

On Sun, 27 Jul 1997 21:37:16 +1100 Josh McDonald <os-dev AT effect DOT net DOT au>
writes:
>Hi,
>	I have a floorcaster going, with bump-mapping implemented by
>tiles. It runs at a measley 21fps on my p-133 without bump-mapping,
>and at 2fps with the bump-mapping implemented...
>
>	I desperately need this faster, and without assembler :(
>
>Does anybody have any ideas, could anybody out there help? I'm not
>going to use lookup tables for the distance, because it fucks up,
>and lookup tables for the maximum height a voxel(ish) pixel could
>be don't speed it up at all......
>
>PLEEEEEEEEEEEEEEEEEEEEEEASE!!!!

Well, there's a lot of little things you could do to speed up your code,
but the one that jumps out at me is all your floating point math.  You
want to use fixed point math.  Pentiums do have good floating point
coprocessors, but I don't know if its fast enough.  Anyone care to
comment?  Anyway, I can't explain fixed point math right now, mostly
because I barely understand it.  You can look at the allegro code for
help, or you can look at almost any game programming book.

Also, you have a _lot_ of nested loops, and a lot of them probably aren't
neccessary if you look closely at what the code needs to do and what
the code doing in addition to that.

good luck

fwec AT juno DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019