GLBasic forum

Main forum => GLBasic - en => Topic started by: Hemlos on 2009-Jul-18

Title: 2d world size
Post by: Hemlos on 2009-Jul-18
Is there a size limit - + to the 2d world....

i was firing some particles at lightspeed and i got shot in the back lol.

Does it wrap, or is my rounding function flipping the sign of the coordinate?




Title: Re: 2d world size
Post by: MrTAToad on 2009-Jul-18
To what 2D World are you referring ?
Title: Re: 2d world size
Post by: Moru on 2009-Jul-18
There are usually two things that can happen when you go past the limit of a numberstorage. Either you get an overflow error or it wraps back to the other side of the extreme you just passed. I'm not sure how GLBasic does it though.
Title: Re: 2d world size
Post by: Hemlos on 2009-Jul-19
Quote from: Moru on 2009-Jul-18
There are usually two things that can happen when you go past the limit of a numberstorage. Either you get an overflow error or it wraps back to the other side of the extreme you just passed. I'm not sure how GLBasic does it though.
Right you are, one of those.

I dont think its an overflow error, it seems to be wrapping....i was curious to know what the extreme ranges are.

Its not a problem, its just an observation, i will create my own ranges.
Title: Re: 2d world size
Post by: Hemlos on 2009-Sep-04
Found the answer:

- 2147.483648 to 2147.483648 for both planes is the range.

Note: if your 2d object exceeds the positive number, it becomes negative, for the plane X Y in question.
Also note, that this only happens when the +max is exceeded, not in negative direction.
If it is exceeded in negative direction, it becomes 0.

Ill create limits as needed.
This is just an observation, not a requst for any changes.