In a browser game made in HTML5/Javascript, I would like to handle the move of units in real-time. But units would have to follow some predefined roads...
Canvas seems better than svg to handle complex games (is it ? byby complex I mean like some Rome total war global map or conflict of nations map), but in svg lines are more clearly defined (with ). In canvas, I suppose I have to calculate the coordinates of the unit against the coordinates of the road in canvas to made the unit like "following" the road ? There is no some feature like "follow this path" ?
I'm I'm not even sure how to handle the coordinates of the road (it can be curved, not simple straight line), I guess I need to define some equations ?.
