So I was reading up on some old Doom bugs, and I came across this.
When you're moving fast, though, the point which the game tests for solid obstacles is much farther away from your own position, so that it can react in time. However, since it's such a long distance away, somebody decided that it would be smart to instead check two points: the one that's far away from you, and a point in between. This way, if by any chance the point that gets tested for collision ends up PAST the solid obstacle (read: past the otherwise Impassable wall), the halfway point will catch it instead and correctly prevent you from going through the obstacle.
There's always something that's bugged me about the wall permeability bug in SRB2. Northern and Eastern walls work fine, but Southern and Western ones are as effective as a big sheet of paper. Why should this be?
Because apparently, the game only tests two different points of collision if your X or Y speed is GREATER than a certain amount. Imagine that the threshold is 8. So if your X or Y speed is greater than 8, two points are tested for collision. Your X or Y speed can only be greater than 8 if you're travelling to the north or east -- where collision in SRB2 works fine -- if you travel to the south or west, your speed will be -8! Is -8 greater than 8? No! So only use one point for collision testing.
Am I right? Can this be researched? Can we fix this?
So let's break this down. If I'm understanding this correctly, when you're moving slowly, the game checks a short distance directly ahead if there's something solid. If it finds one, it stops you in your tracks.When a player encounters an obstacle, the game will attempt to "slide" the player alongside the obstacle. Presumably to improve the accuracy of collision detection, at high speeds the game will split the player's path of movement into two segments and test each segment for obstacles. No check is made to ensure that the player did not already slide along the wall once, so if the obstacle is present in each of the two segments, the player will slide along the wall twice in the same tic, effectively doubling the player's speed.
The bug only occurs when the player is traveling quickly enough to the North and/or to the East. This happens because the player's path is not split into segments unless his X or Y movement is greater than a certain amount. However, no check is performed to see if the player's speed is smaller than the negative of that threshold (i.e. the player is traveling just as fast South and/or West), so the bug is not invoked.
When you're moving fast, though, the point which the game tests for solid obstacles is much farther away from your own position, so that it can react in time. However, since it's such a long distance away, somebody decided that it would be smart to instead check two points: the one that's far away from you, and a point in between. This way, if by any chance the point that gets tested for collision ends up PAST the solid obstacle (read: past the otherwise Impassable wall), the halfway point will catch it instead and correctly prevent you from going through the obstacle.
There's always something that's bugged me about the wall permeability bug in SRB2. Northern and Eastern walls work fine, but Southern and Western ones are as effective as a big sheet of paper. Why should this be?
The bug only occurs when the player is traveling quickly enough to the North and/or to the East. This happens because the player's path is not split into segments unless his X or Y movement is greater than a certain amount. However, no check is performed to see if the player's speed is smaller than the negative of that threshold (i.e. the player is traveling just as fast South and/or West), so the bug is not invoked.
Because apparently, the game only tests two different points of collision if your X or Y speed is GREATER than a certain amount. Imagine that the threshold is 8. So if your X or Y speed is greater than 8, two points are tested for collision. Your X or Y speed can only be greater than 8 if you're travelling to the north or east -- where collision in SRB2 works fine -- if you travel to the south or west, your speed will be -8! Is -8 greater than 8? No! So only use one point for collision testing.
Am I right? Can this be researched? Can we fix this?
Last edited by a moderator: