ID:877395
 
(See the best response by Kaiochao.)
How do I stop that? The character is jumpy and doesn't move smoothly towards me. What could be the cause of this?

mob/enemies/proc/FightingAI(mob/player/M as mob)
while(src.arm > 0)
for(M in view(8))
if(get_dist(M,src)==1)
src.NPCAttack(M)
else if(get_dist(M,src)<=8)
step_towards(src,M)
else
step_rand(src)
sleep(1)
sleep(1)
Possibly the two sleeps remove one.
removing the first sleep doesn't work. removing second sleep lags the game
What is your step size?
my step size is 8
When using BYOND pixel movement mob movement always looks jittery because it auto disables gliding.
so how do i solve this problem?
I honestly have no idea, I would suggest maybe switching to FA's pixel movement.
Use Forum Accounts pixel movement library. ;)

[EDIT] Damn you GreatFisher :D !
Best response
Smoothness comes from a smaller step size combined with a high frame rate. Forum_account's library runs games at 40FPS with a maximum speed of 5, I think, incorporating acceleration to smooth things out even more. Even though it takes more CPU to move a mob 16 times with a step_size of 2 to move a tile, it looks much better than moving a mob moving 8 pixels 4 times, from standing still. However, over a bad network connection, they look pretty similar anyway.
its only the enemies that jitter. the main character does not. will FA's pixel movement library still help me?