# Maximum keygrab distance?

## Recommended Posts

What is the maximum distance at which keygrabbing by "bumping" is possible? I always thought that it is 16 units (like in ksutra map19) but yesterday I managed to grab the yellow key in AV map02 (22 units, very difficult).

Well, I may be completely wrong, but this is how I understand grabbing items by bumping:

Step 1: Player is running towards the key, which is behind a solid obstackle.
Step 2: One tic later, player have moved a certain distance, which always depends on his actual speed. Engine doesn't check for collision with walls, so the player runs in the wall (and the key) like if there was no wall.
Between steps 2 and 3: The engine first checks if player's bounding box is overlapping with an item -> the key is grabbed. After that, it checks for collisions -> the collision is detected and the engine "moves the player back". But the key has been grabbed before it.

Therefore, I guess that the maximum distance depends on player's speed. But as I said, I may be wrong. I don't understand the engine perfectly, this just seems logical to me :)

So:

```15 units by running
21 units by SR40
23 units by SR50
35 units by wallrunning
?
```

doom2 map13 bk grab is 24 units and it's considered one of the hardest known grabs.

Here is a test map I made. There is a bunch of health potions on a ledge, the 1st potion is 1 unit away from the border, the 2nd potion is 2 units away and so on. So when you bump into the ledge, your HP - 100 = the distance of your grab. The zip includes three demos where I do:
18 unit grab by running
22 unit grab by sr40
24 unit grab by sr50

--------------------

So I rotated this map by 180 degrees and for this version my best results are:
11 unit grab by running
13 unit grab by sr40
14 unit grab by sr50

Interesting, so running in south direction gives much better results?

dew said:

doom2 map13 bk grab is 24 units

Really? Key radius is 20 according to doomwiki.org, the key center is 40 units away from blocking linedef. So it seems to be 20 units?

What do you mean by "radius"? Things in Doom aren't circles I think?

edit: Just did 19/23/25 on grabtest.wad.

The distances in that thread are from the center of the key. I don't know how to move an item one unit away since doom builder grid only goes down to 2x2.

TimeOfDeath said:

I don't know how to move an item one unit away since doom builder grid only goes down to 2x2.

Turn off "snap to grid"? Don't tell me that you didn't know you can do this. :)

Never tried it... :)

TimeOfDeath said:

The distances in that thread are from the center of the key. I don't know how to move an item one unit away since doom builder grid only goes down to 2x2.

Doom Builder 2 (not sure if that makes a difference) grid can go down to 1x1

dew said:

doom2 map13 bk grab is 24 units and it's considered one of the hardest known grabs.

honestly, I've never even seen this wall closed when playing that level.

Memfis said:

What do you mean by "radius"? Things in Doom aren't circles I think?

But WRT Chebyshev distance, they ARE circles. :)

Memfis said:

What do you mean by "radius"? Things in Doom aren't circles I think?

They're not, they are indeed squares but the game uses the term "radius" to mean half the square's side length.

Scypek2 said:

honestly, I've never even seen this wall closed when playing that level.

Go into the building via the big teleporter at the top of the map that's basically a giant shortcut for both the blue key and the blue door. You teleport up to the ledge around the BFG building and then it is easy to jump off onto the raised ledge by the little door on the front of the building with the key. You know, the ledge with the backpack on it.

Or just watch a speedrun.

dew said:

doom2 map13 bk grab is 24 units and it's considered one of the hardest known grabs.

I just tried this and managed to grab the key after only a couple of tries. It seemed that running against the torch to build momentum, a fairly standard thing glide, did the trick. I don't know if I was just very lucky though. I bet if I tried to record it I would fail repeatedly...

I'm also curious about the switch flipping distance while doing a grabbing like run. I have a map where I have a switch behind bars, and by experimenting i ended up making the shortest distance between a bar gap and the switch to be 40 units. Now it seems untouchable, but I'm not sure about SR50 (wallrunning is out of picture, no suitable walls nearby).

Z86 said:

I'm also curious about the switch flipping distance while doing a grabbing like run. I have a map where I have a switch behind bars, and by experimenting i ended up making the shortest distance between a bar gap and the switch to be 40 units. Now it seems untouchable, but I'm not sure about SR50 (wallrunning is out of picture, no suitable walls nearby).

I don't think switch-pressing is affected by taking run-ups.

When you press the use key the game traces out up to 64 units from your centre in the direction you are facing until it reaches a special line or something else that stops it. Since the player's radius is 16 units the button press can reach at most 40 units from the nearest distance he can approach the switch, as you have observed.

The momentary position checks that allow people to pick up items behind walls don't apply here as all of that happens entirely within the one call to P_TryMove. Use key presses are handled separately, afterwards possibly beforewards since P_PlayerThink comes before P_RunThinkers...