Toy train track builder

Been working on a little wooden train set building game I started for gamejam. General idea is to build a track and then ride along it in a toy train.
The theme of the jam was ‘comfy’ so I’ll be steering clear of the frantic time-restricted building you often see in track-based games. I’ll probably have some token objectives to deliver items from one side of your track to the other, but my main aim is a relaxing sandbox.

Demo is available on itchio
You can follow my most recent progress on my Twitter or Tumblr.

https://img.itch.io/aW1hZ2UvMTE5NDYyLzU1MTM1OC5qcGc=/347x500/FOK6Gv.jpg https://img.itch.io/aW1hZ2UvMTE5NDYyLzU1NTk0NS5wbmc=/347x500/RuSMyx.png

Development progress:

https://fat.gfycat.com/BriskResponsibleCrocodile.gif

Track following works through a system of traces which bounce along the grooves, interpret the route and update a spline curve representing the path to follow.
The spline runs a little ahead of the train which means I can interpolate along it for smooth turning. Additionally it can leave a trail if needed for attached carriages to follow without having to do the calculations again.
Depending on the direction the game takes I might try to build the spline before the game starts, at the moment it dynamically checks ahead of where the train currently is.

The game uses no ‘real’ physics, everything is interpolation along a spline so I had to make my own gravity system.
As the spline is being made it’ll accelerate downwards if there is no track. Because everything is being faked I can more easily manipulate the effects of momentum off ramps, keep the train safely grounded and in the grooves unless it goes over a proper ramp etc.

1 Like

Hi Dr. Whoop DSc,

That looks like a lot of fun. I was working on a Toy Electric Slot Car Racing Sim, but, suspended efforts after I failed to get Spline Loops to work proper. Can your Spline Tracking method support Loops? If YES, I can easily visualize a Toy Electric Slot Car and RollerCoaster Sim evolving out of this project. Keep up the awesome work!

Comfiest UE4 art style I’ve seen. Looks great.

One suggestion - discarded toys and belongings etc as obstacles to navigate around.

Oooh man this is beautiful as it is! I really like style so far, soft and warm. I’m subscribing to this :slight_smile:

Loops are something I was worried about, that’s partly why I did it the way I did.
At the moment my system doesn’t really have any notion of loops, if you go round and round a loop the spline will go round and round too, but since the last spline point gets removed when a new one is made, it doesn’t really become unwieldy.
It’s not the most efficient way since going along the same length of track requires rebuilding the spline, but it doesn’t seem to have any major performance impact. If I had lots of long trains I’d probably need a better approach.

Thanks!

The art style was never really supposed to be permanent but people seem to like it.
I’ll definitely have some objects lying around either way, but my initial idea was to make a room in the spirit of a ‘rats’ map where everything is the correct scale relative to you being in your tiny train.
I guess the only difference is whether there are walls or not.

Automatic intersections when you approach a track from an angle:

Carriages:

Environment as it stands
https://img.itch.io/aW1hZ2UvMTE5NDYyLzU1MTM1OC5qcGc=/347x500/FOK6Gv.jpg

The game uses no ‘real’ physics, everything is interpolation along a spline so I had to make my own gravity system.
As the spline is being made it’ll accelerate downwards if there is no track. Because everything is being faked I can more easily manipulate the effects of momentum off ramps, keep the train safely grounded and in the grooves unless it goes over a proper ramp etc.

Game is available free on itchio

This would be great in VR :cool:

Some nice gifs