Unbound scrolling limit?

New releases and general discussions.

Post » Wed Oct 22, 2008 8:32 pm

Hey all, simple question: Is there a limit to how far out an object can go with unbound scrolling? I set up a test and got over 2,000,000,000 X position.

Has this been tested?
Thanks
Follow me on Twitter @evgLabs
B
33
S
14
G
4
Posts: 251
Reputation: 4,049

Post » Wed Oct 22, 2008 8:46 pm

Objects can still go that far when bounded scrolling is on. You just can't scroll that far. If you want to limit how far it can go though, you could do something like:

+ Sprite X is greater than 10000
-> Set sprite X to 10000

Also note because positions are stored as floating point values, at such high numbers as 2,000,000,000 you'll probably start to lose precision on the pixel scale. I wouldn't advise letting anything go that far!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Oct 22, 2008 9:58 pm

Thanks! I'll just have to change my game method. That's good to know.
Follow me on Twitter @evgLabs
B
33
S
14
G
4
Posts: 251
Reputation: 4,049


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests