Genkora
Frog blast the vent core!
- Reaction score
- 92
This is not a tutorial for learning how to remove leaks, technically this isn't even a tutorial at all, but more a way to better help understand what a leak is.
I for one had a tough time understand what exactly a leak was; I learned how they worked long after I learned how to remove them, and I figure many people might be the same as I was.
Now memory leaks, better known simply as leaks, are when a bit of information is no longer used, but still there. These unused bits of information, points, units, groups, special effects, etc. can pile up and up and up and eventually slow everything down, causing lag or even server splits.
When I first learned of leaks, I wondered how exactly they were still there, but unused. It didn't make much sense to me, and I eventually came up with a metaphor that made a whole lot of sense to me. I suppose you can all be the judge of that.
Say you are at a public pool. This pool is rather large, it has a lot of length, width, and depth, a lot of people can swim in it at once. Now, the pool has a diving board, people keep jumping into the pool, they just keep jumping in and in and in, and eventually it starts to be pretty crowded. But oh no! Some fool has forgotten to put any stairs or ladders into this pool and the people inside can not get out. The people outside the pool don't pay attention and keep jumping in. The pool is so full now it is hard to swim around, you have to ease your way around everyone and pay close attention to what you are doing.
Now, after time, the water level rises because of so many people. It gets higher and higher and eventually it spills over and people are able to leave. They are very upset and go find a different pool. Unfortunately, not everyone can leave because the water level lowers as people get out. There are now roughly half as many people as there were when the pool spilled over. It's easier to move now, but that doesn't stop anyone from jumping into the pool.
Now for the explanation. The pool is, as you may have guessed, your map. The people are bits of information, points, groups, effects, etc. The diving board? That is a trigger. The diving board, or trigger, generates information like points, which are used in your map, or pool. As new points are made, the old ones get pushed into the pool, somewhere on the map.
There is only room for one on the diving board.
If a point is continually used, say as a spawn point, then you don't have any new points that want to jump off of the diving board. That continually used point gets its own personal diving board that only it uses.
If a point is not continually used, say in an ability, then you need to provide some sort of exit for that point, or swimmer. What I mean is, stairs or ladders to the pool. Those stairs are usually custom scripts like:
Now if you remember, the pool overflowed. When there are a tremendous amount of leaks in a multiplayer game there is a thing called a server split, essentially where the game splits into pieces, and the players are split up into these different games, no longer together. Or rather, they get angry and walk to a different pool.
I hope this has been insightful and useful to anyone who does not understand what exactly leaks are. Thank you.
I for one had a tough time understand what exactly a leak was; I learned how they worked long after I learned how to remove them, and I figure many people might be the same as I was.
Now memory leaks, better known simply as leaks, are when a bit of information is no longer used, but still there. These unused bits of information, points, units, groups, special effects, etc. can pile up and up and up and eventually slow everything down, causing lag or even server splits.
When I first learned of leaks, I wondered how exactly they were still there, but unused. It didn't make much sense to me, and I eventually came up with a metaphor that made a whole lot of sense to me. I suppose you can all be the judge of that.
Say you are at a public pool. This pool is rather large, it has a lot of length, width, and depth, a lot of people can swim in it at once. Now, the pool has a diving board, people keep jumping into the pool, they just keep jumping in and in and in, and eventually it starts to be pretty crowded. But oh no! Some fool has forgotten to put any stairs or ladders into this pool and the people inside can not get out. The people outside the pool don't pay attention and keep jumping in. The pool is so full now it is hard to swim around, you have to ease your way around everyone and pay close attention to what you are doing.
Now, after time, the water level rises because of so many people. It gets higher and higher and eventually it spills over and people are able to leave. They are very upset and go find a different pool. Unfortunately, not everyone can leave because the water level lowers as people get out. There are now roughly half as many people as there were when the pool spilled over. It's easier to move now, but that doesn't stop anyone from jumping into the pool.
Now for the explanation. The pool is, as you may have guessed, your map. The people are bits of information, points, groups, effects, etc. The diving board? That is a trigger. The diving board, or trigger, generates information like points, which are used in your map, or pool. As new points are made, the old ones get pushed into the pool, somewhere on the map.
There is only room for one on the diving board.
If a point is continually used, say as a spawn point, then you don't have any new points that want to jump off of the diving board. That continually used point gets its own personal diving board that only it uses.
If a point is not continually used, say in an ability, then you need to provide some sort of exit for that point, or swimmer. What I mean is, stairs or ladders to the pool. Those stairs are usually custom scripts like:
Trigger:
- call RemoveLocation (udg_PointVariable)
Now if you remember, the pool overflowed. When there are a tremendous amount of leaks in a multiplayer game there is a thing called a server split, essentially where the game splits into pieces, and the players are split up into these different games, no longer together. Or rather, they get angry and walk to a different pool.
I hope this has been insightful and useful to anyone who does not understand what exactly leaks are. Thank you.