For Anybody Who's used GM or has knowledge About Game Coding in General

I originally posted this in the yoyogame’s community forums, but haven’t gotten a solid answer yet. Hope someone here who knows how to program videogame’s might help :slight_smile:

I have a question that I couldn’t find researching the internet about objects that move outside the game room. This isn’t really for help, Its just something I’ve been wondering about. What exactly happens to an object that moves outside the game room going one direction and doesn’t stop. At a certain point does it eventually get erased from the game’s memory? If you kept the game on long enough would the object start causing lag and eventually crashing the game because it’s at such a far distance? Or does is just get deleted at the moment it leaves the game room? I’m wondering this because in the past I’ve developed games and in the process sometimes have an object move outside the game room (like a bullet that doesn’t collide with anything), and the variables for that object are still ‘active’. Which means that it isn’t essentially gone, just outside the game. Wouldn’t an object that moves forever in one direction reach a certain point where the game can’t process it anymore? and if so what exactly is this distance or point if it’s measurable.

Appreciate any feedback *Also I have an average knowledge about game design, and know that’s a good idea to delete objects or variables that won’t be in use anymore to save memory.

If there is a way to test this it would be cool to display the x value of the moving object as a string so you can see just how far it goes. Think I might try it now…

I’m not 100% sure, but I believe that if an object moves far enough, it just stops, it hits an invisible barrier. That’s what happens when the player moves out far enough, so I’d assume it’d be the same for an object.

As stated above there’s a limit to how far out an object or player can go, and I’m pretty sure the engine would just cease rendering the object once it’s far enough, so it wouldn’t be using up heaps of memory.

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.