Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/20/26 15:57
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 3,785 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
juergenwue, VladMak, Geir, ondrej, mredit
19208 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Engine can not multiply high numbers! #48214
06/23/05 20:43
06/23/05 20:43
Joined: Jan 2003
Posts: 4,305
Damocles Offline OP
Expert
Damocles  Offline 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 Offline
Senior Expert
Doug  Offline
Senior Expert

Joined: Jul 2000
Posts: 8,973
Bay Area


Conitec's Free Resources:
User Magazine || Docs and Tutorials || WIKI
Re: Engine can not multiply high numbers! [Re: Doug] #48216
06/24/05 11:47
06/24/05 11:47
Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
TripleX Offline
Expert
TripleX  Offline
Expert

Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
never heard of the value limitation of "var" ?
It's 2^21 (around 2 million) even if I wouldn't usw values over 2^20 (1048576) because some instructiosn will have problems with these values..
If you want to use such numbers for a short time (as an extension) you'll have to use the sdk at the moment..

TripleX

Re: Engine can not multiply high numbers! [Re: TripleX] #48217
06/24/05 21:10
06/24/05 21:10
Joined: Jan 2003
Posts: 4,305
Damocles Offline OP
Expert
Damocles  Offline OP
Expert

Joined: Jan 2003
Posts: 4,305
Wie gesagt, ich wollte nür die Euklidische entfernung
zwischen 2 punkten berechnen
(Satz des Phytagoras)
Und die eine Differenz war -2618 "quants",
quasi c=sqr(a*a+b*b); wo a = -2618 war

und es kamen völlig verrückte negative werte
bei a*a raus... obwohl es nich negativ sein kann

Naja, im Augenblick teile ich alle werte durch 10..
aber das ist nicht gerade ne schöne Lösung...

Re: Engine can not multiply high numbers! [Re: Damocles] #48218
06/24/05 21:25
06/24/05 21:25
Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
TripleX Offline
Expert
TripleX  Offline
Expert

Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
liegt am folgenden.. wenn du 2^21 + 1 rechnest sollte, soweit ich weiß genau -2^21 rauskommen.. und so weiter dann..

Die einzigste möglichkeit ist im Moment das SDK oder halt die Werte durch 10/100 teilen..

mfg
TripleX

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 Offline
Senior Expert
ulillillia  Offline
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
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

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.

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1