Physics: Deprecating the legacy spring physics solver

Update
As of 5:40 PM PST September 12th we’ve switched control over to TemporaryLegacyPhysicsSolverOverride to select which solver is being used.

If TemporaryLegacyPhysicsSolverOverride is not enabled your games will be using PGS. This takes effect when servers or Studio starts up.

Original Post
Hey All,

We are in the process of disabling and removing the legacy spring solver from the Roblox physics engine, and transitioning exclusively to the PGS solver (for more information on the PGS solver see https://blog.roblox.com/2017/12/using-pgs-solver/).

If you absolutely require more time with the legacy solver to migrate your game to the PGS solver, we will allow you to use it by checking the box next to the Workspace property called “TemporaryLegacyPhysicsSolverOverride” in Roblox Studio. This property will be visible only if you are not currently using the PGS solver.

Why are you doing this?

Maintaining both solvers is challenging and puts more and more pressure on us when developing new features and improving physics code.
Even though many new features don’t support legacy solver, this keeps being a problem.
For example, we now have two completely distinct collision detection pipelines because we needed to optimize certain interactions and this ended up being possible only in PGS.

Separately, most games now use PGS. As an interesting fact, 92% of play time in all of Roblox over the past weekend was in places with PGS enabled.

What’s the timeline for this?

Today we’re announcing the change to let you prepare for this.
If your game is already using PGS, you can stop reading now - you won’t experience any changes.

If your game is using the legacy solver, this means you have Workspace.PGSPhysicsSolverEnabled set to false.
If so, please try to enable PGSPhysicsSolverEnabled and see if your game works. If it does - you’re good!

If it doesn’t, you need to fix the issues in your game - while most of the time, PGS solver behaves pretty similarly, in some cases the game might require tuning to become PGS-compatible.
Please refer to this article for more details: http://robloxdev.com/articles/Building-with-PGS

What happens if I do nothing?

If you don’t change your game, in one month we will automatically activate PGS for your game - because we will stop using the PGSPhysicsSolverEnabled property, so its value won’t matter. You can use this time to adjust your game to work well with PGS if necessary.

It’s summer and I don’t have time to fix my game!

We want to give you enough time to be able to adapt your games. Which is why we’re introducing a new property, Workspace.TemporaryLegacyPhysicsSolverOverride.

In one month, we will stop using Workspace.PGSPhysicsSolverEnabled property to choose the solver and start using Workspace.TemporaryLegacyPhysicsSolverOverride instead. If you need more time to adjust your game to work with PGS, you can temporarily set Workspace.TemporaryLegacyPhysicsSolverOverride to True and re-publish your game to make sure it keeps working.

Keep in mind that at some point after this we will remove the legacy solver from Roblox completely - so you can’t just set Workspace.TemporaryLegacyPhysicsSolverOverride and forget about this. But having a temporary override gives you a chance to adapt your content. We will be publishing the date when PGS solver will become the only solver on Roblox separately - it depends on the feedback we will get and on places that will be using the override.

Why do you need a temporary switch?

A lot of games were made before PGS solver became the default. Many of them work just fine with PGS, but some don’t. After we start using Workspace.TemporaryLegacyPhysicsSolverOverride property, we’ll be able to look at games that made a concious decision to stick with legacy solver for the time being, and work directly with their developers to help them migrate to PGS. Essentially the temporary switch gives us a way to tell the games that don’t care which solver they’re using from games that intentionally choose legacy solver over PGS.

My game doesn’t work with PGS and I’m not sure what to do, help!

Feel free to create separate threads on developer forum asking for help and advice; other developers as well as staff should be able to help you migrate.

Thanks,

Timobius

39 Likes

Is it possible to have a more concrete time table than just “a few weeks?”

EDIT: NVM

4 Likes

The post has been updated (just now) with more information on what’s going on.

3 Likes

I love PGS but is there any chance you can apply friction on a rolling ball or cylinder without using a script to do it for you?

(I would make a feature request thread but it’s only a small comment)

3 Likes

Well. There goes the entirety of the racing community as we know it. :-1:

17 Likes

Please remember that feedback on developer forum should be actionable and criticism - constructive. If you think there will be games that will be significantly impacted by this feel free to let their developers know about this, and also post at least one link to a game like this so that we can take a look at whether we can do anything to fix them automatically.

3 Likes

My game. Uses the old school style. Vehicle Seat & Ball Tires with Hinges.
With PGS On:

  • The cars handle horribly no matter how much you try to tune it back to handling the way we, as a community, like to drive them.
  • Any collisions with either the wall or other drivers has weird physics issues. (i.e. getting bounced off the wall like a trampoline)
  • When the car is turning, it over-rotates easily.

A majority of the racing leagues on Roblox use either:

  • This exact car
  • A very similar car to this
7 Likes

Ok - thanks! This is exactly the feedback we were hoping to get. Short-term, you can set the temporary override to keep the game working through the transition. Long-term, we’ll take a look at these issues and see what we can do.

5 Likes

Unsure what the rest of the community is going to do though…

1 Like

One thought for example is that we can look at how to make this car work better with PGS, and make a tutorial on how to convert it to work better. Then anybody can just follow it to adjust the cars.

5 Likes

Give me a car and a track and I can get it to drive properly with PGS.

5 Likes

Probably deserves its own post but can you guys fix artificial gravity(bodyforce) causing shaky humanoid problems with PGS?

Only reason so far I’ve found a reason to turn it off

20 Likes

Pretty much the same case as @GeorgeOfAIITrades
But instead of it being a racing community, its a soccer/football community


With PGS Off we’ve had

  • Better Reactions ( When the ball is touched )
  • Better Forces
  • Better Friction

However, with PGS On we’ve had:

  • Reaction Delay ( It takes a second to even move the ball )
  • Extremely Bad Forces
  • We’ve had to simulate rolling friction of any real angular damping ( All attempts have horribly glitchy results).

Dribbling in legacy:
https://gyazo.com/e7ada9825f6cc455338aafff846cd19c

Attempting to dribble with simulated angular damping in PGS:
https://gyazo.com/48d3f48d4a97758c56ba1ce3533b5f68


PGS

Legacy


Controls are made with UserInputService, therefore use:
1, 2, 3, 4, 5

8 Likes

Please leave a link to the game(s) that experience these issues when PGS is enabled.

1 Like

Game with PGS issues:

With PGS enabled, the spike storm skill will sometimes void people:
https://gyazo.com/42a62301e550c0cb1396b7b2b8ab895c

However with the legacy solver, none of this happens:
https://gyazo.com/b37824f4fcac8ca1e7ca0ef211d29a58

I’ve noticed that it usually occurs when the caster is standing on top of the other player, it happens to both characters.

2 Likes

The only reason I’m still using the spring solver in my game is because it’s literally a simulation of the old Roblox.

I’ve seen this coming for awhile now and I don’t anticipate there will be many problems.

I’m definitely going to miss hinges going completely berzerk with the spring solver. It’s pretty entertaining.

37 Likes

Hi guys,
Our game uses non-PGS for vehicle physics. The vehicles have ball-shaped tires, and this causes a huge problem when PGS is applied. PGS causes the ball shaped wheels to spaz out and make the vehicle “jumpy” and hard to control. I think it’s likely a very similar, or identical problem to @GeorgeOfAIITrades but it’s certainly something that needs to be fixed.

Link to Game:

https://www.roblox.com/games/909795144/Coral-City-Florida-PRE-ALPHA

2 Likes

Edited my post to have the links

The legacy spring physics solver honestly cannot be removed when the PGS solver still has so many issues. In my hockey game alone (which heavily relies on physics) I can spot like 3 different bugs when switching to PGS.

For starters, creating any kind of Ice is impossible, as the character uses too much force to move the character when PGS is on, with no option to adjust the values. So instead I have to create my own hackish solution, which leads to bug number 2. But for the sake of this being bug 1, even with 0 friction on the ice and all parts of the character set to 0 friction the character still makes turns on a dime.

PGS:

Spring Solver:

Bug 2: Body Movers don’t work correctly with PGS
So I have a BodyVelocity object created by the server, parented to the Character to move the character with ice like behavior (updated locally from the client, while the server version has 0 max force on all axises). However, when ever I set the MaxForce to 0 on the client (to let other forces move the character around like hockey checks) the BodyVelocity moves the character in the direction the character was originally moving when the stick was first equipped. This might be caused by the default movement scripts, for when I completely disable those, the bug goes away. However, if I try to only disable the default movement scripts when the stick is equipped, using this code in the MasterControl updateMovement function:

if not LocalCharacter:FindFirstChild("Stick") then
	moveFunc(LocalPlayer, moveValue, true)
end

it causes the bug to occur as shown below (MaxForce set to 0 when I poke check):

Also Body Positions tend to act all crazy, such as when I use a bodyposition and bodygyro to to position and rotate a character to face a direction:

Bug 3:
This is intersecting parts in general, having no solution to separate them in a timely fashion like the spring solver can, especially when the two parts are not controlled by the same physics owner. Take the goalie and player for example:

I can’t even imagine what running into another player might look like.

Repro steps for all of these bugs:
Step 1 for all bugs: Join the Hockey game linked above and using the left hand menu, select ‘Choose Server’->‘Testing Servers’->‘Testing Server 2’->‘Join Game’.

Bug 2: Once the game loads, start walking in a direction and then press the button to equip the Stick. Then click and release the left mouse button quickly to do a poke check (which will set the BodyVelocity’s MaxForce to 0) and watch the player be pushed in the direction when you equipped the stick, while the MaxForce is at 0.

Bug 2 (Case 2): Simply go onto the ice with the stick equipped and without the puck. Then Press Z to start winding up for the one timer slap shot (which uses Body Positions and Gyros to rotate and position the character) and watch him go sailing.

Bug 3: Just skate with the puck into the goalie to create an intersecting collision which causes the player to fling or move up into the air most of the time. You can also notice the goalie looks like he is spazzing out back and forth as the BodyPosition just isn’t doing its job correctly with PGS on.

7 Likes

Chill out with the “it’s the end of the world”. comments, guys. This thread is literally “Help us make PGS work 100% of the time” – you’ll have the opt-out to continue using the spring solver until those issues are fixed as well.

5 Likes