5
\$\begingroup\$

I am working on a medieval isometric RPG in which the player can ride on horses and in horse drawn carriages. The player's movement is not restricted to the common eight directions; he may move in whichever direction he points his joystick in. What is stumping me is the problem of animating this sucker. I'd rather not have my horse and carriage sliding along unnaturally at an angle to their animation's direction, but I would also like to keep my player movement system.

I have considered a snake-like algorithm where the carriage parts bend along a curve when they turn, but I am not sure this can be done with 2D artwork. I have also considered creating large numbers of animations for the horse and carriage, but this is too time intensive to be feasible.

Now maybe I'm off topic and maybe this question is going to get deleted, but I am wondering if anyone out there can either suggest an idea on this or point me to a game which has implemented thi kind of functionality before (with cars, carriages, or other kinds of vehicles).

\$\endgroup\$
  • \$\begingroup\$ I think this can be done with 2d sprite skeletal animation. But with 2d there are limitations... You probably want to go with a 3d model for this kind of flexibility. \$\endgroup\$ – Anthony Raimondo Mar 27 '15 at 0:48
  • \$\begingroup\$ I had this issue as well. I scrapped the isometric view and went to a top down. \$\endgroup\$ – Evorlor Mar 27 '15 at 15:57
5
\$\begingroup\$

I guess you have two options:

  1. Render more angles, 12 or 16. If you create your asset in a 3d program you can create it once and render many angles in no time. Only limit is the texture size. I guess 12 sprites are enough.

  2. Splitting your sprite in two parts allows you two animate the curves more smoothly. However you still have the problem that your sprite moving/animation angle has a max error of 22.5° which is not that big. Of course you can combine the two points. To reduce the error you can use more sprites. The algorithm depends on you implementation of the game objects. I would make the front the part which you can control and the back part which gets pulled by the rear of the front. Then you should get two angles and you can render two sprites at different angles.

\$\endgroup\$
1
\$\begingroup\$

Well I am definetely no expert, But I have read somewhere, about someone rendering a 3D object and displaying it in 2D on the screen. This way you could even rotate the camera!!

\$\endgroup\$
  • \$\begingroup\$ is this sarcasm? :D \$\endgroup\$ – Anthony Raimondo Mar 27 '15 at 0:45
  • \$\begingroup\$ No I just started coding about a month ago... it was a solution to factorios big texture atlas's \$\endgroup\$ – HgMerk Mar 27 '15 at 4:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.