On-rails Movement behavior (n00b question)

This forum is currently in read-only mode.
From the Asset Store
Create a game inspired by great arcade classics as Operation Wolf
  • I've decided to make a game that features trains, which means it would be really handy to be able to create a behavior that ties objects to a track and allows the movement of an object to be characterised entirely by its speed and how far along a given track it is. The basic idea is to define rails as some parametric curve (say, a spline), and then store only a train's speed and distance along this curve and at every frame decode the parametric position into the Cartesian position that the sprite gets drawn at. Once that's done it's fairly easy to add fancy behavior like acceleration, slowing down for corners and slopes and whatever.

    My question is is it worth writing an entire behavior for this, or is simply calling a Python script that does the calculations every frame the way forward? As I understand it there's no way of implementing this kind of movement without some kind of script.

  • Pretty much anything that can be done with a script can be done with events. This can be done with events.

  • There's lerp, cubic, etc, or an existing behavior.

    http://www.scirra.com/forum/viewtopic.php?f=2&t=5693&hilit=path+behavior

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Or what you can do easily (If you are looking from a top view) is give it bullet movement, and put an invisible block at corners.

    Train>On collision with>Turn_right_square:Train=Turn 90*

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)