Mail Archives: djgpp/1997/07/28/19:33:49
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 -