[gameprogrammer] Re: Fixed Point Library at gameprogrammer.com

  • From: "Alan Wolfe" <alan.wolfe@xxxxxxxxx>
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Fri, 7 Dec 2007 17:04:04 -0800

I just finished writing some pretty intricate code using floating
point and man, i hit so many problems...i was basically doing a "maze
solving algorithm" on a bunch of intersecting line segments and so i
was keeping track of where along a line the code was currently and
looking for intersections beyond that position.

Because of precision problems, it would sometimes find the same
segment as the "next intersection" as it just came down and a couple
other wierd problems.

I tried playing with adding epsilons to the floats to counter act the
precision issues which made other issues (really close intersections
wouldnt get picked up).

Eventually i had to do more heuristic logic instead of straight up
mathematical decisions because no matter what i did mathematically i
couldn't get it to work right.

I've worked a little bit with fixed point, but IMO it seems like it
really wouldnt solve the precision problems would it?

What benefits besides speed do you get from using fixed point vs
floating point? (:

On 12/7/07, Jeremiah Martell <inlovewithgod@xxxxxxxxx> wrote:
> Hello!
>
> Thanks for allowing me to use your fixed point code. It's actually
> very valuable to me! :-)
>
> I plan on using fixed point for my physics code, so that I have a
> little more control of the maths involved so nothing "crazy" happens.
> It's also nice if I ever want to make a "record your game" feature, as
> fixed point will be the same on all machines, whereas I've heard there
> can be differences with floating point operations.
>
> Thanks again!
>
> - Jeremiah Martell
> http://inlovewithGod.com
>
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>
>

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: