u-value track following
Train game » Devlog
I've prototyped a more spline-like approach to track following.
Here (see video) a u value tracks % across the entire path and is used to lerp point-to-point.
Critically, compared to the previous prototype, we assume points are uniform (pixel) distances apart, which allows us to subtract a pixel amount (in this case, carriage length) from u and obtain a second u for the position of where the carriage should be.
This prototype is imperfect and I need to try it with sprites (since the rectangles here do not rotate) - but I think it is convincing enough for a first version of the track-following in the game.
Train game
A work-in-progress game probably featuring trains. Not a puzzle game.
Status | In development |
Author | d w roberts |
Tags | Life Simulation, Trains |
More posts
- Train delayed (or cancelled)Nov 04, 2023
- Back on track(s)Jun 01, 2023
- Train yardsApr 23, 2023
- Frame timing hellApr 21, 2023
- Basic object placementApr 15, 2023
- Spline cleanupApr 10, 2023
- NPCs, shops, inventoriesApr 09, 2023
- Basic gameplay milestoneApr 03, 2023
- Invisible technical workApr 02, 2023
- Putting some more thought into artworkMar 26, 2023
Leave a comment
Log in with itch.io to leave a comment.