Game gets glitchy when far from origin

I am currently developing an exceptional and true-to-life train simulator named “Strongstead Island RR,” created by the esteemed Leopard Transit Authority (LTA). Drawing inspiration primarily from the renowned Metropolitan Transportation Authority (MTA) and incorporating elements of the Long Island Rail Road, which is under the MTA’s ownership, LTA: Strongstead Island RR aims to deliver an unparalleled virtual experience.

My open-world train simulator, equipped with cutting-edge graphics and future-oriented features, immerses users in the bustling state of Leopard City, reminiscent of the vibrant metropolis of New York. With multiple routes originating from Leopard City and extending all the way to Strongstead Island, players will embark on exciting and authentic train journeys.

However, I am currently encountering a technical challenge related to floating point errors that need to be addressed. When the train operates at a considerable distance from the origin, certain issues arise, leading to undesired behavior. During rigorous testing, I have noticed slight jittering of the train, my avatar, and the camera. As the distance traveled increases, these disturbances exacerbate, resulting in noticeable glitches and inconsistencies. Unfortunately, the problem intensifies further upon reaching the end of a route. Moreover, reversing the train’s direction experiences significant delays, impacting responsiveness and user satisfaction. Additionally, I have observed that when disengaging from the seat, the GUI persistently remains visible, causing momentary confusion. After a brief period, the GUI disappears, restoring normal train functionality.

Even within the development studio, specifically in the vicinity beyond the third station, I have encountered an unusual offset issue that makes aligning train tracks more challenging when attempting to move or resize objects.

I’ve tried to use the F3X Building Tools Plugin to edit the tracks, but I have the same error. Only when I move the tracks with the Local setting, that’s when it doesn’t do the offset thing, but it doesn’t go straight. I’ve also tried aligning all the tracks and pieces since the rails weren’t actually aligned and I did align it, but when I rescale or moving it still does that offset thing.

2 Likes

This is something that happens in any game, and im not sure if there is much of a fix

I just wanted to say that I realized that there were no floating point problems in the studio where an object does the weird offset issue when moving or resizing, it was just the part’s rotation in the model was messed up, and the weren’t aligned like they were supposed to be. But the other stuff I mentioned are a huge issue!

This is a problem every game encounters due to the Game Engine that is being used.
For Roblox, the Rendering Engine uses Math Calculations to render stuff, in a nutshell the further you get from the origin, the more likely it is that the X,Y Values of a Game (Floating Point Numbers) get more complex leading to less accurate Calculations, THUS your jittering problem

I won’t be going into detail but here’s a video of a game called BeamNG that can give you the basic understand of what happens and why it happens, and yes it’s the same thing in Roblox.

I am unsure of the Development Studio and GUI part.

I may be wrong or I may be right, I’d still ask Roblox Staff lol.

Float numbers get less accurate when you go farther away from (0,0). There is really no fix to this.

1 Like