Cheers,
i‘ve got this quick code for an enemy to move between two walls:
{
if (!wallInfront())
{
move();
}
else
{
turn(180);
}
But the problem is that the rest of the game (multiplayer game, WASD and arrow keys) starts to lag.
The other players can‘t move smoothly, which means I have to e.g press W a couple of times for it to react.
How can I avoid this problem?
Thanks in advance and have a nice day guys!