Tweeted twitter.com/#!/StackGameDev/status/363265091463942144
3 An attempt to make the title of this question make more sense to what actually is being asked
| link

Stuck with getting objects How to movedetermine where on a path my mapobject will be at a given point in time?

2 Made question more direct/answerable
source | link

I have map and an obj that is meant to move from start to end in X amount of time.

The movements are all straight lines, as curves are beyond my ability at the moment. So I am trying to get the object to move from these points, but along the way there are way points which keep it on a given path.

The speed of the object is determined by how long it will take to get from start to end (based on X).

So thisThis is what i have so far:

//get_now() returns seconds since epoch
var timepassed = get_now() - myObj[id].start; //seconds since epoch for departure
var timeleft = myObj[id].end - get_now(); //seconds since epoch for arrival
var journey_time = 60; //this means 60 minutes total journey time
var array = [[650,250]]; //way points along the straight paths 


if(step == 0 || step =< array.length){
  var destinationx = array[step][0];
  var destinationy = array[step][1];        
}else if( step == array.length){
  var destinationx = 250;
  var destinationy = 100;
} else {
  var destinationx = myObj[id].startx;
  var destinationy = myObj[id].starty;
}
step++;

Ok so this is what I am stuck with:

When the user logs in at any given time, the object needs to be drawn in the correct place of the path, almost as if its been travelling along the path whilst the user has not been at the PC with the available information i have above.

Does any one have any insight on how iHow do I do this  ?  

Note: The camera angle in the game is a birds eye view so its a straight forward X:Y rather than isometric angles.

I have map and an obj that is meant to move from start to end in X amount of time.

The movements are all straight lines, as curves are beyond my ability at the moment. So I am trying to get the object to move from these points, but along the way there are way points which keep it on a given path.

The speed of the object is determined by how long it will take to get from start to end (based on X).

So this is what i have:

//get_now() returns seconds since epoch
var timepassed = get_now() - myObj[id].start; //seconds since epoch for departure
var timeleft = myObj[id].end - get_now(); //seconds since epoch for arrival
var journey_time = 60; //this means 60 minutes total journey time
var array = [[650,250]]; //way points along the straight paths 


if(step == 0 || step =< array.length){
  var destinationx = array[step][0];
  var destinationy = array[step][1];        
}else if( step == array.length){
  var destinationx = 250;
  var destinationy = 100;
} else {
  var destinationx = myObj[id].startx;
  var destinationy = myObj[id].starty;
}
step++;

Ok so this is what I am stuck with:

When the user logs in at any given time, the object needs to be drawn in the correct place of the path, almost as if its been travelling along the path whilst the user has not been at the PC with the available information i have above.

Does any one have any insight on how i do this  ?  

The camera angle in the game is birds eye view so its a straight forward X:Y rather than isometric angles.

I have map and an obj that is meant to move from start to end in X amount of time.

The movements are all straight lines, as curves are beyond my ability at the moment. So I am trying to get the object to move from these points, but along the way there are way points which keep it on a given path.

The speed of the object is determined by how long it will take to get from start to end (based on X).

This is what i have so far:

//get_now() returns seconds since epoch
var timepassed = get_now() - myObj[id].start; //seconds since epoch for departure
var timeleft = myObj[id].end - get_now(); //seconds since epoch for arrival
var journey_time = 60; //this means 60 minutes total journey time
var array = [[650,250]]; //way points along the straight paths 


if(step == 0 || step =< array.length){
  var destinationx = array[step][0];
  var destinationy = array[step][1];        
}else if( step == array.length){
  var destinationx = 250;
  var destinationy = 100;
} else {
  var destinationx = myObj[id].startx;
  var destinationy = myObj[id].starty;
}
step++;

When the user logs in at any given time, the object needs to be drawn in the correct place of the path, almost as if its been travelling along the path whilst the user has not been at the PC with the available information i have above.

How do I do this?

Note: The camera angle in the game is a birds eye view so its a straight forward X:Y rather than isometric angles.

1
source | link

Stuck with getting objects to move on my map

I have map and an obj that is meant to move from start to end in X amount of time.

The movements are all straight lines, as curves are beyond my ability at the moment. So I am trying to get the object to move from these points, but along the way there are way points which keep it on a given path.

The speed of the object is determined by how long it will take to get from start to end (based on X).

So this is what i have:

//get_now() returns seconds since epoch
var timepassed = get_now() - myObj[id].start; //seconds since epoch for departure
var timeleft = myObj[id].end - get_now(); //seconds since epoch for arrival
var journey_time = 60; //this means 60 minutes total journey time
var array = [[650,250]]; //way points along the straight paths 


if(step == 0 || step =< array.length){
  var destinationx = array[step][0];
  var destinationy = array[step][1];        
}else if( step == array.length){
  var destinationx = 250;
  var destinationy = 100;
} else {
  var destinationx = myObj[id].startx;
  var destinationy = myObj[id].starty;
}
step++;

Ok so this is what I am stuck with:

When the user logs in at any given time, the object needs to be drawn in the correct place of the path, almost as if its been travelling along the path whilst the user has not been at the PC with the available information i have above.

Does any one have any insight on how i do this ?

The camera angle in the game is birds eye view so its a straight forward X:Y rather than isometric angles.