#Need Help Developing Top-Down Train Movement- 5 USD

1 messages · Page 1 of 1 (latest)

analog tiger
#

Hello People, i am making a 2d top-down train traffic management game and i need someone to help me code a proper track system.

What i have? :-

  • Different types of trains,
  • Multiple Train spawning system,
  • Carriage spawning system
  • Carriage that follow its engine

What i want exactly?:

  • When train is spawned it should follow the track,
  • The carriages of the train should follow the its engine (To help Train no is already generated and given to engine and its own coaches) ,
  • Track changes should also be possible. Like player should be able to click and switch the tracks to get the train of different line (wherever switches are available)
raw fable
#

Do the user make the train tracks

or do you make the train tracks map?

#

if the user makes the map, then you gotta place invisible "Checkpoints" every place

Make the train go to the next check point (by using object variables)

when it reaches the next it will go the further next and so on

and when there is a diverge in the path
check if the variable of the diverging point (a point where train diverges you can set it as a hidden block if you want) is true

then the further next is changed

so, it won't go straight

I dont know if you can understand by what i mean

raw fable
analog tiger
# raw fable if the user makes the map, then you gotta place invisible "Checkpoints" every pl...

The Tracks are made by me..and yes i tried that...basically you mean to use trigger with id's to check the collision and move the trains/ carriages to the next trigger....The problem is collision itself as the more carraiges collide the more there is offset coz collision is a box not a point....and even if i check for points ,it needs to be lot more precise..which is very difficult with this kinda random runtime movement...

Thanks for reply ....appreciate it

raw fable
#

Or make the tracks the object

Like the train will be track.angle to see where it is looking

And add a track variable deactivate

The train will chose the nearest train track(not the current one)

And chose that path

raw fable