this concerns isometric scrolling. ok. i need to keep the character always centered on a tile, no matter how much the user holds down the arrow key. I'm pretty sure that the problem can be solved by modifying this one simple formula:
ob.y += ob.speed*diry;
this basically means to change the isometric _y (ob.y) by how ever many pixels are specified in ob.speed, how ever many times the down arrow key is pressed (diry represents the arrow key being pressed.)
I've tried to change it to the following formula, which actually works wonderfully on a non-isometric map:
ob.y += (speed*diry)-(ob.y)/div;
Using this formula, speed is set to equal the tile width, and the numeric value assigned to div should actually control the speed of the scrolling. Actually, to be honest... I get the basic idea, but how dividing a number into the difference is supposed to control the scrolling I have no idea. The original source of this formula (the non-iso one that works wonderfully) says "we divide the difference by div to have an value that continues to change until the equation is true."
The problem: Without dividing by div, it kind of almost works but instead of scrolling, the map really just instantly moves that many pixels over. And the character doesn't stay centered in the tile. When dividing by div, it slows down the scrolling, but the character doesn't stay centered at all.
Tile width (tileW) = 71
Speed, by my formula should also be 71, in the original is about 6 or whatever
div can be whatever
thanks so much in advance for any help