Add an option to display the path travalled by the local player#2062
Add an option to display the path travalled by the local player#2062Calinou wants to merge 2 commits intoZDoom:masterfrom
Conversation
7d06a20 to
de9f05e
Compare
|
Okay, I don't really know much about the automap code, but this seems and works fine code-wise. But I feel like the way to not draw path lines when the player teleports is kinda flawed. It does not account for short distance teleports, like say a teleporter that just transports you to the other side of a wall, and so lines are drawn between teleport positions anyway. |
|
Cool. If I were you, I'd use |
I've set the distance threshold pretty high while testing. It can probably be decreased as even full-speed SR50 isn't quite close to this distance threshold (in terms of distance travelled per tick). Edit: I've reduced the distance threshold for teleport detection from 300 to 100 units. I've tested Doom 2 MAP12 with
There doesn't appear to be a built-in type for points with |
de9f05e to
b0d4921
Compare
Yeah that works a lot better, by the way, if you wanna test something involving player speed, I'd suggest using the
That ain't happening, 65535x65535 map units is the maximum size limit for any Doom maps except for the ones in Sonic Robo Blast 2, where IIRC they doubled the map size limit |
madame-rachelle
left a comment
There was a problem hiding this comment.
This is an interesting idea and I like it, but, I am not a fan of it doing a static distance check to see if it should break the lines.
Instead, what you should do is see if the delta distance between tics is greater than the player's velocity. This would be a much more reliable way to check for teleport shenanigans since - in some cases - velocity can be arbitrary. As a general rule, always whenever possible, avoid arbitrary static numbers, especially in a moddable engine.
This is useful to avoid getting lost on larger maps.
b0d4921 to
d853f9b
Compare
I've tried my hand at implementing this in a second commit (which also fixes a compilation warning related to signed type comparison). It works mostly OK from my testing. One issue is that bumping into a wall and backing up will cause the line to be missing one point: PS: Doom E2M4 is a good place to test this code, as it has a teleport near the starting area. |
|
Any more progress or info on this PR? |
|
Hello, I think this is really cool! Are you still interested in having this added? If so, can you open a PR in UZDoom? If not, may I? |
I don't have much time to work on this anymore, so feel free to open a PR that takes the current code and improves upon it. |



This is useful to avoid getting lost on larger maps. This is inspired by a feature from Doom Retro.
The following situations have been tested:
Future ideas:
kill count / number of monsters in map), so you know how recent a certain portion of the path is. This could also be based on game time, but I think it'd be preferable for existing path points to keep their color.Preview
Normal mode
Overlay mode