Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CPU -- Ultima 8



+--- Mark Wedel:
| At some time, I will probably try and replace all the floating point
| calls with fixed point.

Just converting from floating point to fixed point is likely to be
slower on "hot" boxes. Please consider this (old!) snippet from the
TODO file:

> - Change the speed variables from float to long to save speed in
>   computers that lack floating-point co-processorc.
>   System:  Have a global tick-variable which counts endlessly up (and wraps
>   at MAX_INT).
>   Have two variables in the objects, one int which specifies at which
>   global tick the monster will move next, and one char containing
>   the remainder from the last division.

The advantage of this scheme is that you don't have to write back the
results, a single compare is sufficient except when the object is
updated.


Kjetil T.

PS: The next entry in the TODO file is
> - Maybe add light/darkness and moving light-sources to the game.
>   (if it can be made fast enough)
This idea has been around forever - sometime it will be reality, and
the protocol should allow for it. :-)

PPS: Some of the items in the TODO list have actually been
implemented/fixed. Mark, you shouldn't be afraid to change the list to
your own liking.