Camera which works perfect with straight movement, cannot keep up to mob that moves diagonally.
EDIT:
Sorry, I made a mistake: it's the mob who cannot keep up to the camera. Mob while moving should be at the center of client's screen and it's not in this case.
Numbered Steps to Reproduce Problem:
- Hold down your keyboard key for diagonal movement
OR
- Just press diagonal key, then quickly hold down arrow key for straight movement
Code Snippet (if applicable) to Reproduce Problem:
world
fps = 25
icon_size = 32
client
glide_size = 4
mob
var/canmove = 1
mob/Move()
//var/delay = 3
if(src.canmove)
src.canmove=0
spawn(3.26)//((32/delay*world.tick_lag)-1)
src.canmove=1
..()
PS. spawn's argument which is 3.26 is my own number that I discovered to be good delay for perfectly smooth movement for my world.fps and client.glide_size settings.
Download demo:
http://www.sendspace.com/file/olfm4q
Video:
http://www.youtube.com/watch?v=mbW4Z6NNx0Q
- to 28th second mob is moving straight and you can see that camera works perfectly
- at 29th second I start moving diagonally or combining diagonal movement with straight movement
Expected Results:
Camera moving as smoothly when mob moves diagonally as when the mob moves straight
Actual Results:
Camera can't keep up when the mob moves diagonally
Does the problem occur:
Every time? yes
In other games? yes
In other user accounts? yes
On other computers? yes
When does the problem NOT occur?
When mob's move delay is greater - spawn(5) instead of spawn(3) in my example (but then moving straigh looks delayed)
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Workarounds:
I don't know
Set your mob's glide_size to 4 and see if the problem persists. If it does, we may have a bug. If it goes away, no bug. Similarly, you should also see good results if the glide_size is set for the mob but not the client, since the client will use whatever the mob uses unless you specify otherwise.