October 6th, 2020 Livestream Q&A: What is the object limit and why is it that number?

October 6th, 2020 Livestream

Q&A: What is the object limit and why is it that number?

https://youtu.be/VpCuu0aYFw0

This question was possibly duplicated with a more recent answer: July 6th, 2021 Livestream Q&A: What does the Object Limit refer to exactly? https://www.youtube.com/watch?v=cVhPGZZyMn8

Suggested Wiki Reference Code <ref name="yt-VpCuu0aYFw0">[https://youtu.be/VpCuu0aYFw0 YouTube - October 6th, 2020 Livestream - Q&A: What is the object limit and why is it that number?]</ref>

Topics

Transcript

a reason was told by twitch streamer that there's a limit to objects in the game what is it and why is it that number so it's not a it's not a limit to objects per se this is this is something that's very confusing to a lot of people because it's it's like not easy to explain this, but it's not a limits to like amount of objects in the game per se it has to do with the, garbage collector the memory garbage collector in unreal engine, so like there are two ways kind of with a million to handle memory, and that's either you you allocate and deallocate everything manually yourself which is it's prone for like, human error because if you forget to like clean up memory say like you build a a conveyor belt or something you like allocate memory for all that stuff and then when you dismantle it and you remove everything related to it if you don't manually like clean everything up you're going to get memory leaks and that the more you play the more memories you get and it's eventually big problems happen right so there's something called the garbage collector in in the real engine which is their own implementation of garbage collection which exists in a lot of programming languages which essentially like every time you create data objects it will like take care of the memory for it so like it will keep track of like oh things are still referencing this memory part murders rotors are rotors check the the codecs thing oh yeah the corrects if that exists you press x or whatever it is it sucks, it explains memory management yeah so the garbage collector is essentially like a system that unreal engine made that kind of takes care of memory management for you, the trade and there are a few trade-offs with that though and one of those trade-offs is that they have a limit of amount of objects in engine that they can keep track of and and that is a fixed like object limit because of I don't know exactly why it's set to that, but there's there's some reasoning why it's set to a certain limitation maybe it's ram maybe it's I don't know but they have a limit to it, and we have to adhere to that limit if we want to use the garbage collector and that limit is like and it's not like it's it's data objects it's not game objects so like the confusing thing is that for instance a constructor contains a lot of data objects within it because it's keeping track of like input and output and like what's in the inventory if it has more than one inventory slot stuff like that so there's various like complexity of like there's various amount of complexity of data objects within a game object in the world right so at foundation it's not as memory intense as a constructor so that's where the confusion kind of comes in so like the you can place like say that the limit is that you can place 1 000 foundations but you can't place at 1 000 constructors because the limit will you'll hit the limit before then so yeah and that limit will kind of always exist but we are working on ways to like optimize the amount of memory each building takes like uses or if we can like chunk data, and stuff like that so we're trying to improve that but there is there's a limit to how much you can build in the game and that's because of memory management in a real engine all right that's the I'm going to have to explain that 40 billion times more because that probably didn't make any sense but someone clip it it's gonna be a really long clip, let's see