Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
almost constant, log or n?
I believe its object index with recycling.
Develop games in your browser. Powerful, performant & highly capable.
But do all the objects in the game are continuous in memory or is there fragmentation?, and if so, how much? Which are the basic rules for dividing the data? In which scenarios we don't want to abuse "get by uid"?
The scenario where you are constantly creating new objects and instances.
Its advised not to use it unless you can deal with the timing well.
Think of it like you would a stack.
"Get by UID" is specially coded for efficiency. It essentially does a single Map lookup, which I think typically works in constant time (O(1)). So it won't slow down even if you have thousands of objects.