Good morning fellow devs.
Currently I am using ray casting for monster pathing. ( Both random pathing and pathing to the player when in aggro state )
I have found that ray casting is pretty expensive for the server to perform.
I just want to know if there are best practices with using raycasting or if there are other solutions.
I really like the net result of raycasting and how it works because you get really clean monster movements. But with a number of monsters and 5 players on a map it can start to suffer in performance ( client vs server vs client ), I would be fine with a different approach even if I sacrifice some of the quality that ray cast offers.
I was thinking perhaps one solution is to only have ray casting for when a player aggros a monster and outside of that set pre defined paths for monsters when they are not aggroed, although this would be time consuming to setup so before going down that rabbit hole I just wanted to see how you guys handle it.
Many thanks!