GMS 2.3+ Real fps drops greatly when creating new path

ZacKow264

Member
I have a monster that follows you, using mp_potential_path_object to get to you without walking through walls.
As the player can move, the monster deletes the previous path and creates a new one every 3 seconds (room_speed * 3).

According to the debugger, this causes a drop in real fps whenever it happens, dropping down to under my room_speed of 60, if only for a single step.

Should I be concerned? The game still looks like it's running smoothly, and everything still works, but I'm worries this might become a problem in the future as I continue working on the game.
Is it normal for the creation of a path to reduce fps that much? Is there a better way I could do this? Would a mp_grid be less demanding?

To compare, my real fps hovers around 1700 normally. Then drops down to somewhere from 0-60 whenever the new path is created.
 
Top