Adaptive Timestepping as Default

It is something worth discussing, but we would like to avoid this route if possible.

2 Likes

I would be inclined to agree, fixed-axis force would be a huge benefit, so Iā€™m glad youā€™re looking into it.

How much of an improvement does this see in physics performance? Iā€™ve not had a chance to test adaptive yet. Sounds like it could be a significant improvement!

2 Likes

Itā€™s quite the opposite actually. The setting is not to increase performance, but to decrease it for games that donā€™t need it. The spare CPU cycles could be used to power something else in the game for example, if you donā€™t need to simulate lots objects being flung around the players. :sweat_smile:

Thanks for the feedback. Iā€™m interested in getting a repro with the issues you are seeing with your game. (DMd)

2 Likes

Hmm I will try to message bug reports asap, hereā€™s what I had around 10 QA testers report when testing adaptive timestepping in short tho:

  1. When a player walks into another player they both get flung into air. This bug used to be in roblox many years ago but was patched in fixed.
  2. If thereā€™s an unanchored object standing on an unanchored object the object on top will end up tripping
  3. Unanchored assets shake like crazy for no reason
  4. Purposely dragging the player makes the player fling in Adaptive only
  5. If you walk into a wall the camera starts shaking and so does the player
  6. If you hold the left/right arrow keys + w the camera starts stuttering
  7. If thereā€™s too many parts (around 50) adaptive becomes really laggy and ends up just freezing most of the parts in air
    Other bugs iā€™d like to report while iā€™m on it
    -Strafing enabled toggle is broken
    -Video looped/playing toggle is broken
    Both reset to off when publishing/reopening studio and can only be enabled thru scripts.
    Some of those bugs happen to the games in my profile. I am hosting another QA test tomorrow so Adaptive is on.
3 Likes

I would like an option in which itā€™s adaptive between 120Hz and 240Hz. Iā€™d like to use this, but 60hz just too often breaks stuff, as others have reported as well. I do feel like 120Hz would be enough, but I canā€™t properly test this.
At least consider this, I have no idea how difficult this would be to implement.

3 Likes

Maybe it would be better if we saw a Dynamic option that allowed us to individually set the physics behavior of each BasePart/Assembly, as well as the ability to set what the default behavior for all BaseParts/Assemblies is. An extension of this for code, as MANY systems rely on RunService events would be .stepped type events for both physics behaviors that can be used interchangeably, i.e. RunService.AdaptiveRenderStepped and RunService.FixedRenderStepped, assuming that is possible of course. Iā€™m pretty sure in Unity there is something similar, but donā€™t quote me on that.

4 Likes

Hey, thanks for the feedback. We have the ability to tune the aggressiveness of the system, so in the future we plan to provide the option to select between different modes :slight_smile:

1 Like

It depends on the game, but if your game doesnā€™t involve any hard-to-solve mechanisms (which will default to 240hz) you can expect ~2x perf boost for physics simulation time.

1 Like

I just tested adaptive timestepping right now on my community fighting game (squid game chaos mode)
Itā€™s a small game that really only has close quarters combat

Things I noticed immediately:

  1. Random flinging during combat (even though mostly everything is can collide false)

  • Note that Iā€™m not using any body movers or stuff for combat, just pure animations and tools. (The tools are can collide false, and using r6)
  1. The adonis fly command, has random glitchbacks and caused a massive FPS drop that didnā€™t subside even when I rejoined the game (very odd)

These are just 2 instances I found right now, so Iā€™ll probably keep fixed on for most of my games, I will continue testing and reporting on other issues I find though!

3 Likes

Weā€™ve been working on tuning humanoid simulation behavior a lot recently. Iā€™m interested in knowing if the humanoid related issues still there.

1 Like

Thanks for taking time to post the videos, these are super helpful.
Iā€™ll try out your game to see if I can catch anything.

1 Like

While youā€™re there fixing the missing vector3 maxforce issue, itā€™d probably be a good idea to wrapper or clean up the whole API for bodyAlignmentā€¦
For something that is meant to be the ā€œcoreā€ of making things like baddies and elevators and doors in roblox, its API and workflow has a few problems. Especially now if you really are pushing hard to take away bodyPositions.

A very common experience is: " Add BodyAlignment to unanchored part. Add attachment to unanchored part. Put into single attachment mode. part still falls to the ground"

In general:

  1. The default values are poor for the common use case. Most people just want to use a bodyAlignment to glue a part into a fixed position in the air, much like using a bodyPosition. Figuring out how to make this work via single attachment mode and the correct forces is actually fairly difficult.

  2. It has a lot of properties. Many of which are contextual and donā€™t do anything, depending on what mode it is in. This is super confusing especially when you encounter issue 1

  3. There is little to no feedback as to what goes wrong when your bodyAlignment doesnā€™t do the thing. Did I use the wrong setting? Are the attachments wrong? Whatā€™s going on?! Warnings or errors would be appreciated.

  4. The way youā€™re meant to put the attachment somewhere else other than on the object is ultra confusing. Why the heck doesnā€™t this work, or at least give feedback why its not working.

Hereā€™s a fun experiment: Try a blind test where you watch someone whos never used roblox before try and make an unanchored part stick in the air with a bodyAlignment. Just give them the rough outline of ā€œOh, you make parts fly with a bodyalignmentā€ and watch them goā€¦

9 Likes

That would be good! I donā€™t know performance increases, but for stability I think a lot of feedback/issues by people in this thread would be solved with 120Hz/240Hz. Or just a lower ā€˜agressivenessā€™ could help, although that may be tricky for all use cases.

Something else you could consider is dividing the workspace up in regions to apply this to, but that might technically be impossible (not sure how the system works under the hood) and thus I didnā€™t suggest it at first.

2 Likes

Can I ask how the flying command is implemented? Are you using constraints or is the character being CFramed?

1 Like

Perhaps bodyalignments could be set to a ā€œsimpleā€ mode by default that make them behave more like old bodymovers, while the more niche, power-user capabilities can be relegated to an enum or a true/false boolean

5 Likes

This is awesome feedback. Thanks for sharing.

3 Likes

image
The admin seems to be using Body gyro and body position

Adonis is an open sourced admin thatā€™s used by a lot of developers, the source code can be found here if youā€™d like to take a look
Adonis Admin Loader [Epix Incorporated] - Creator Marketplace (roblox.com)
Adonis MainModule - Roblox

1 Like

Was DMd some repros that might be related. Iā€™ll take this cases into consideration and polish the logic a little more! :slight_smile:

1 Like

Below is an example of a problem I have run into with a bridge made with sections connected together via RopeConstraints.

With Adaptive timestepping:

With Fixed timestepping:

Admittedly, this is the most egregious instance I have. Even in Fixed mode, getting this bridge to play nice has always been a problem. This is a shame because the game the bridge is in would otherwise benefit from adaptive timestepping if this issue did not occur.

Adaptive timestepping is a feature that Iā€™m on board for and will use where I can get away with it, but without a means of highlighting problem children to the engine, developers are at the mercy of the engine to prioritize things the same way they do. This point has been addressed before, so I will not belabor it, but I do want to throw my chips into the ā€œdo not remove Fixed modeā€ pot so long as there is no reliable workaround to problems like these.

15 Likes