|
0 registered members (),
3,785
guests, and 10
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Engine can not multiply high numbers!
#48214
06/23/05 20:43
06/23/05 20:43
|
Joined: Jan 2003
Posts: 4,305
Damocles
OP
Expert
|
OP
Expert
Joined: Jan 2003
Posts: 4,305
|
Grr: This is the result of my calculation in 3dGS -2618*-2618 = -1534684  the same with pow(-2618,2); !!! How about double float numbers!!! 
|
|
|
Re: Engine can not multiply high numbers!
[Re: Damocles]
#48215
06/24/05 00:08
06/24/05 00:08
|
Joined: Jul 2000
Posts: 8,973 Bay Area
Doug
Senior Expert
|
Senior Expert
Joined: Jul 2000
Posts: 8,973
Bay Area
|
|
|
|
Re: Engine can not multiply high numbers!
[Re: TripleX]
#48219
06/25/05 04:05
06/25/05 04:05
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
With basic math operations for things like score and global variables, you can use 21-bit values for the integer part. For entities, you should use 20-bit values for the integer part.
2618×2618 is 6,853,924. The limit for even a 21-bit value is 2,097,152, this is more than three times that. When squaring something, the numbers being squared must not reach or pass 1448.155. If it does, it'll return false values.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Re: Engine can not multiply high numbers!
[Re: Damocles]
#48220
06/25/05 14:01
06/25/05 14:01
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Berechne das doch einfach mithilfe von Vektoren. Und wenn deine Abstände immer so groß sind, dann skaliere deine Levelgrößen (Verhältnis quants/meter) einfach runter. Damit kommst du dann gar nicht erst an diese Grenzen heran.
Last edited by HeelX; 06/25/05 14:03.
|
|
|
|