Y
YCCCM7
Guest
Didn't think I'd be asking around here for help again so soon, but hey, such is life.
So this is kind of an odd and specific question. Working on an RTS. It has a grid for terrain and the like, walls, rocks that slow down workers, etc. But I can't help but notice that when simply using mp_paths to move my men, on rare occassions they "teleport" outside the map and towards impossible coordinates.
This isn't a slight deviation either, we're talking going from 950 Y to -120 in a single frame. Other times, they'll jump straight into walls a few hundred units X-wise... walls that the grid is specifically told to avoid at all costs.
These are ALSO numbers I can say definitively aren't being referenced in the code. Just doubled checked this with some logging to make triple sure. Interestingly, if rebounded back to place within 1 frame, the bug is invisible and will not repeat itself again for the remainder of the path's travel.
I just ran some tests with NOT editing path_speed, as I am doing that dynamically for slowing over obstructive terrain blocks and such, but even then the teleportation persists.
For now I've got an abs(LastX - x) > 12 and similar check in place, and it's solving the problem surprisingly well. But suffice to say, I largely would prefer to be able to stomp out the bug altogether at the source. I can get some code snippets, but it's hard to say what could be invoking these random jumps with path_start code.
Sound like a known bug or familiar error? If not, I can live with this, but thanks for your time either way.
Gamemaker v1.4 for Windows, obtained through Steam.
So this is kind of an odd and specific question. Working on an RTS. It has a grid for terrain and the like, walls, rocks that slow down workers, etc. But I can't help but notice that when simply using mp_paths to move my men, on rare occassions they "teleport" outside the map and towards impossible coordinates.
This isn't a slight deviation either, we're talking going from 950 Y to -120 in a single frame. Other times, they'll jump straight into walls a few hundred units X-wise... walls that the grid is specifically told to avoid at all costs.
These are ALSO numbers I can say definitively aren't being referenced in the code. Just doubled checked this with some logging to make triple sure. Interestingly, if rebounded back to place within 1 frame, the bug is invisible and will not repeat itself again for the remainder of the path's travel.
I just ran some tests with NOT editing path_speed, as I am doing that dynamically for slowing over obstructive terrain blocks and such, but even then the teleportation persists.
For now I've got an abs(LastX - x) > 12 and similar check in place, and it's solving the problem surprisingly well. But suffice to say, I largely would prefer to be able to stomp out the bug altogether at the source. I can get some code snippets, but it's hard to say what could be invoking these random jumps with path_start code.
Sound like a known bug or familiar error? If not, I can live with this, but thanks for your time either way.
Gamemaker v1.4 for Windows, obtained through Steam.