UID Limit?

Discussion and feedback on Construct 2

Post » Sun May 12, 2013 5:21 am

I have searched in the forums about this without success... Is there a limit of objects spawned?
Said in other words, when a new object is created, each one receive a UID... What is the limit of those UID?
My question goes because I am working on a Tower Defense Game, and while testing, it came a time (after 49 waves) that the game preview on I.E. crashed without notice.
At first glance, it seems to me that the number of allowed UID reached the upper limit, which does not surprise me as a Tower Defense Game spawns a LOT of bullets!

So, such a limit exists?
B
7
S
1
Posts: 17
Reputation: 585

Post » Sun May 12, 2013 5:38 am

There is no limit.
However you are limited on how many objects can exist at one time, but that depends on the individual pc.
The uid is merely an index given to each new instance when it is created.newt2013-05-12 05:39:05
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sun May 12, 2013 5:49 am

But, if the index is stored somewhere in memory, it must have a limit...
Anyway, I will try to test it several times to find out if the crash is always at the same wave...
B
7
S
1
Posts: 17
Reputation: 585

Post » Sun May 12, 2013 7:52 am

You have two limits:

1. Integer: I guess UID is an integer so you can get theoretical 2.147.483.647 different UIDs.

2. Memory: Your PC or mobile device will run out of memory long time before the integer limit
B
7
S
1
G
1
Posts: 32
Reputation: 1,016

Post » Sun May 12, 2013 2:47 pm

The maximum UID is 9007199254740992. You would have to create 1 million objects per second for 285 years to get close to the limit.

Most crashes are caused by buggy graphics card drivers. Try checking they're up to date.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sun May 12, 2013 3:04 pm

nine quadrillion,
seven trillion,
one hundred ninety-nine billion,
two hundred fifty-four million,
seven hundred forty thousand,
nine hundred and ninety-two

I think you'll be fine!
slap it onto the flappy bird template...
bang it on google play with all the other shovelware...
sorted...
B
36
S
7
G
4
Posts: 322
Reputation: 8,170

Post » Sun May 12, 2013 4:15 pm

Not enough UIDs.
B
45
S
19
G
10
Posts: 562
Reputation: 9,543


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests