March 2nd, 2021 Livestream Q&A: Less object usage as the Engine has an object limit?

March 2nd, 2021 Livestream

Q&A: Less object usage as the Engine has an object limit?

This question has 2 related videos



less object usage as the engine has an object limit yeah so the unreal engine has a memory uh allocation let me rephrase this so this has to do with with garbage collection in the game if you know if i'm gonna like low level lists because there's no other way to like start explaining this so if you if you if this sounds confusing uh don't worry about it it is like low take or all looked here but essentially we're using a a object uh like the way we don't die oh boy the way that memory is allocated in in in unreal engine is with their with unreal engines uh garbage collector which is like a system to like keep track of what's memories in use and then if it's not in use then it will remove it and this is so you don't have to keep track of memory yourself uh there's a limitation with the the the garbage collector in a real engine that there's a set amount of objects that it can keep track of uh and i'm not quite sure exactly why this limit exists or what the implication of it is but it has to do with their design decisions off the garbage collection system it probably has to do with why that garbage collector is so good honestly because the garbage collector in marine london is pretty good compared to like most garbage collectors i've seen out there for what you use it for for game development specifically like you can obviously make your own garbage collector that works a lot better than unreal engine that's more fit to like your specific needs when you're making a game but like when it comes to like garbage collectors that are four game games specifically of those type of sizes and um for those kind of needs then the garbage check is really good but limitations to that is that it can't keep track of that many objects uh and there's a specific number so something two million blah blah blah and uh like that number can be adjusted but it's not recommended to do that because it can mess up the rest of the game if you do you can even corrupt your games uh your save files um if you do so it's it's not recommended by us but you can do it if you google how to do it you can find stuff about that uh and we can't really change it because it has to do with the garbage collector in a real engine what we can do is optimize the game for it though so we don't need to utilize as so we don't need to leave as big of a memory footprint that we are doing because we are kind of leaving a huge memory footprint um with the implementation of the game yes yes and so we are that's what we're doing to to improve that situation so it's not like you know we can't do anything about it but uh increasing the the u object limit which is what it is it's not like actual game object it's actually like memory objects in in it's a part of the programming paradigm that you refer to memory in that way to make it like more understandable um so it's not like so like building like two billion foundations is not does not leave the same memory footprint as building one million constructors like it's it's hard to compare like that so it's really hard to say like give advice as well to how you should build and stuff like that because it's really hard to to keep track of uh that was well done that was a marathon you're a marathon