Hello, hi, good evening, trying to make an engine for an adventure game, and by that I mean the old Call of Cthulhu / beneath a steel sky variety and have been thinking about how to implement the movement. I’d like it to be mouse based, click and move, the problem is I’d like to spruce it up to be more like the king’s quest games. By that I mean that the further away from the camera / the higher up the plane the slower the character moves. He’d also have to move slower when moving perpendicular to the horizon to match the foreshortening and all that.
He’d also scale based on the y-position, but that’s not a problem.
My problem is that my first instinct is to just make tweens between origin and target but looking through the ease classes I can’t find one that would emulate movement dependent on position on screen. I could create a different kind of tween every time based on the starting position and ending position I think, the further up the screen the more time the ease will take, but I wanted to check and see if anyone had already done this and found a better way.
//not actual code, just me daydreaming...
//if moving laterally...
var tweenX:Tween = new Tween(current_image, "x", None, current_image.x, current_image_2, 1, true);
//if moving down the screen...
var tweenY:Tween = new Tween(current_image, "y", Regular.easeIn, current_image.y, current_image_2, 1, true);
//if moving up the screen...
var tweenY:Tween = new Tween(current_image, "y", Regular.easeOut, current_image.y, current_image_2, 1, true);
//and then the parameters currently set to "1" would change
//based on the total distance he has to walk.
Something like that.
Any help or ideas appreciated.