UID Limit?

0 favourites
  • 7 posts
From the Asset Store
Act on your instances, get/set their properties and variables only thanks to their UID. No more picking trouble! Plugin
  • 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?

  • 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.

  • 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...

  • 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 <img src="smileys/smiley2.gif" border="0" align="middle" />

  • 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.

  • 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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Not enough UIDs.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)