Switching all games to the PGS Physics Solver next week (March 4th, 2019)

If anyone wants to learn a little about how the new PGS physics can work together, here’s a bike!

It uses two counter-weights to help balance and turn, as well as a single BodyGyro (which isn’t really needed but helps to dampen some swaying).

The counter-weights are connected via WeldConstraints, which allows you to move them about freely to change the balance and centre of gravity.
This REALLY effects how the bike turns, balances and lands, so mess around with it and see what you can make. =)

pgs bike.rbxl (21.5 KB)

1 Like

I suggest you look at this thread on the devforums: How do I make my minecart stay on the rails? It was asking the same question as yours: how to make a physics object work the way it’s supposed to, when it just can’t.
The short answer is to use a completely scripted, node-based approach and use AlignPosition and AlignOrientation objects to ignore the physics problem completely. The thread itself has a ton more information about how to implement this and what the alternatives can be.

Unfortunately in my game that is not an option

We added a block underneath the rails to keep the train from hopping off. The trains used to slide on the ballast, and be held in by the rails, so all the trailing points did not have both rails functional (the trains would slosh around a bit but ultimately would work fine). The trains now rest on the rails, so we had to modify all those switches to use both rails. We had more manpower than I expected, so while @Synchorus and I were maintaining the junctions, @dr01d3k4 and Synchorus were also upgrading all the trains to use the new wheels.

It was a brilliant display of teamwork to get a huge amount of work done in just a few days. Steam Age is now updated with PGS, and you can play it here:

7 Likes

Dude that’s awesome. Glad to hear you guys did it!

The main problem I have is actually not the instability of PGS, but instead the part misalignment and the inconsistent conveyors. Parts that are perfectly aligned in studio tend to misaligned in game, causing bumps in my perfectly aligned tracks and ultimately derailment. This is not a PGS issue, its been around since 2016. It wasn’t a problem for my game until now, because the legacy physics engine used to absorb the bumps. Meanwhile, the stiff collisions of PGS made it far worse. I guess the fact that vehicles are traveling at 500 sps+ in my game amplified the issue. How did you get around this? Or is this never an issue for your game?

image

In Steam Age, trains travel no faster than around 200 studs per second. When upgrading to PGS, we made it mechanically impossible for the train to leave the track, similar to a roller coaster:
image

We use a combination of cylinders, balls, and blocks to do this.

Previously, we used only a block riding on top of the ballast, with the rails holding it in like the walls of a trough. This worked great, even across extremely bumpy ballast like for superelevation.

PGS does make things more complicated, but there are usually ways around things. For example: have you tried adding physical rails instead of letting the train travel freely through the tube, and surrounded those rails with Ball gliders?


An example.

4 Likes

I tried a similar design like this and it does stop derailments. However, every time it hits a bump the vehicle gets stuck. The bump is an issue that becomes more persistent further away from the origin. I am thinking of using body position to have the vehicle levitate above the track.

does this affect my new car testing game? (using the toolbox to get cars)

Could you use collision groups to stop the train colliding with the visual tunnel?

Or make it so that the train can only collide with the track?

The change to enable PGS for all new servers and remove the override property is queued for release today.

This change has been enabled and should take effect on any servers started after Match 4th, 2:23 PM PST.

With this we’ve now sunset the old solver that was actually written by builderman himself and served Roblox well for many years. Long live the new solver!

14 Likes

Welp, my games broke.

4 Likes

The problem is not the visual tunnels, but the bumps on the track caused by misalignments of parts that only happen in servers.

What about all the gears that depend on the old PGS solver? What will happen to them? I’m in the process of making a ski resort that depends on the ski tool, which is already broken with the newer PGS solver. I don’t really know how to script lua well, so could anyone help? Maybe a updated ski tool link will come in handy?

1 Like

We have been working with the community for several years since the introduction of the PGS solver to get gear and toolbox models updated to work with the new solver. If you find important items that don’t work with PGS, please upload the model with detailed instructions to reproduce the problems you observe. We will take a look.

Thanks!

5 Likes

Nice seeing some changes, very excited for the future with PGS.

1 Like

Could you connect the drive system using either prismatic joints or springs that pull the wheels inwards to the rail but have a slight amount of leniency so as they can roll over the bumps?

Basically, add suspension springs to the wheels?

I think high stiffness with damping around 1000-2000 should do.

Edit
Just thinking
The reason why they’re getting stuck could be caused by the drive system being unable to turn - if the wheels are fixed jointed to the chassis (instead of pivoting on a hinge) they will cause friction against the track on turns.

Like a car trying to turn a corner without actually turning the wheels.

Hi, this is the tool that I would like fixing: https://www.roblox.com/catalog/143606407/Team-ROBLOX-Skis

However, many people have updated it as a model rather than a tool, so could you fix it and provide a link with the model for the tool here?

Hi Hadiispec - we’ll take a look and get back to you. Thanks!