[Won't fix] Patrol routes
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone
Patrol routes
Is anyone else finding monster patrol routes to be a little unreliable? I have some set up for my SSD intro, and the marine often wanders away from the path between two points (shouldn't they go in a straight line?), bumping into obstacles, missing doors and failing to get to the end of the path in time.
The smallest route I have works fine, but the others (which are longer and also have doors) are the ones that screw up.
The smallest route I have works fine, but the others (which are longer and also have doors) are the ones that screw up.
- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone
I actually did that - in one scene the marine starts outside one of those octagonal LTSD doors and he was missing the entrance. I put impassable lines around him and he still bumped into them and turned round. Fortunately the small space means he still opens the door pretty quickly. (and the patrol point is straight ahead from the marine when he starts) moving and follow with 90º turns and straight lines only after that)
So the marine still goes off course with impassable lines there, as he just turns into them and eventually faces the wrong way, but it's probably better than letting him wander all over the place. Unless I set up sectors that block the way behind him when he enters it...I suppose I could try that.
So the marine still goes off course with impassable lines there, as he just turns into them and eventually faces the wrong way, but it's probably better than letting him wander all over the place. Unless I set up sectors that block the way behind him when he enters it...I suppose I could try that.
Patrol routes tell the actor in question to move to the targetted spot, and then let the normal enemy movement kick in. The reason they don't take a straight line to get there is because they are limited to 8 directions of movement: N/NE/E/SE/S/SW/W/NW. This means they have to wander around a bit in order to move in between those directions. AFAIK, they wander even if the path from their current position to the destination is along one of those 8 directions, probably so that they don't end up wandering for a little bit and then suddenly make a beeline straight for their target when they happen to hit the right angle.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49235
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Hirogen2 wrote:Why? Because there is only 8 rotations? Sounds logically, but what if there are 16 rotations for a sprite? Otherwise, just let the actor walk the set angle (i.e. 10° right, when 0° is North) to the next waypoint and draw ACTRx0 then.
No, because the code relies on this limitation. It seems to make some things easier to calculate which was important back when Doom was created. Significant changes to the movement code (as in a major rewrite) would be necessary to remove this limitation. But what about a simpler solution? Isn't it possible to completely circumvent the normal movement code while on a patrol route and go straight to the next point?