π Multi-Carriage Node-Based Train System
Client-side simulation, path-tangent bogey alignment, BulkMoveTo movement
Stable at high refresh rates and supports any number of carriages.
This document explains how the new train system works internally, how the client simulation stays perfectly smooth, and how bogeys, carriages, and route segments interact.
π§ High-Level Architectureβ
Our train system is built around three key principles:
- The server controls only the lead bogey
- The client runs a continuous simulation
- All geometry is placed from path distances
πΊοΈ Route Representationβ
Each train route is represented as a list of segments.
π‘ Server Responsibilitiesβ
- Moves the lead bogey
- Sends periodic updates (
updateLead)
π₯οΈ Client Responsibilitiesβ
- Converts server CFrame β route distance
- Simulates continuous movement
- Computes all bogey/carriage CFrames
- Moves everything using BulkMoveTo
π Bogey & Carriage Geometryβ
Spacing rules for bogeys and carriages.
π§© Components Overviewβ
- NodeManager
- TrainController
- TrainUtils
Server path motion + syncing.
Client rendering + simulation.
Math engine: projection, tangents, distances.
π Common Issues & Fixesβ
FAQ & troubleshooting.