ID:1632661
 
(See the best response by DarkCampainger.)
At the moment by default your client.eye seems to move as with your step_x/y to make it appear smooth in pixel movement. That's great, but if I set my client.eye to anything other than the default mob, it suddenly stops doing that.

Case and point:
var/list/games = new/list()
mob/client
var/gameHandler/game = null
verb/newGame()
var/gameHandler/GH = new()
src.game = GH
GH.playerOne = src
GH.playerTwo = input(src,"Who?")as null|mob in world
GH.playerTwo.game = GH
if(GH.playerTwo)GH.gameStart()
else del GH
gameHandler
New()
..()
var
gameLoc = 0 //z level for stage
mob/client
playerOne = null
playerTwo = null
proc
otherPlayer(var/mob/client/M)
if(!M)return null
if(M == playerOne)return playerTwo
else if(M == playerTwo)return playerOne
else return null
gameStart()
playerOne.inGame = 1
playerTwo.inGame = 1
playerOne.client.eye = playerOne.viewer
playerTwo.client.eye = playerTwo.viewer

mob/client
var/tmp
otherDir = "left"
state_icon = ""
mob/viewer = null
New()
..()
spawn()loop()
var/mob/M = new()
M.density = 0
M.loc = locate(1,1,1)
src.viewer = M
proc
loop()
while(src)
if(src.inGame)
viewLoop()
sleep(0.1)

viewLoop()
var/mob/M = src.game.otherPlayer(src)
step_towards(src.viewer,locate((src.x+M.x)/2,(src.y+M.y)/2,1),20)



(Sorry if this doesn't compile by itself, it's taklen straight from my source, might have a few undeclaired vars in it but it shouldn't be much of a problem.)


The idea is to get the camera to center between the two players in a fighting game, this effectively does it but make the camera move very jerky like it's back on tile movement. Can anyone help? (Originally I used an obj instead of a mob for the viewer but I thought using a Mob might remove the jerky-ness, I was wrong)
I realized it could be because I was using step and looping every 0.1 ticks so it might just be instantly jumping, but setting the loop to 20 ticks and using walk_to didn't fix it.
Best response
This is a bit of a shot in the dark, but do you have a step_size set for the /mob type?
No I haven't but the walk() has it's third argument set so it shouldn't make a difference
In response to Paragonix
Do you mean the forth argument? walk()'s forth and walk_to()'s fifth args set the step size.
I noticed that mistake and set the third argument to 0 and the fourth to 4, yet it's still choppy.
I meant fifth. To clarify:

walk_to(src.viewer,locate((src.x+M.x)/2,(src.y+M.y)/2,1),0,1,5)


On a sleep(5), still moving the eye in blocks of 64
Fixed it by giving it a step_size, but that seems like a bug that it wouldn't work before. Oh well. Thanks! Now I have another issue.