Skip to content

DPR: Quality Presets and Recommended Preset #1228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from

Conversation

ariesninjadev
Copy link
Contributor

@ariesninjadev ariesninjadev commented Jul 21, 2025

(New PR for #1158 due to it being on my personal fork)


Task

Allow users to have access to graphics presets that will speed up their ability to tune their visuals to match their desired output/device's computing demands

AARD-1781 and AARD-1919

Symptom

"What!? There isn't a 'Fancy' graphics setting? I'm quitting this game 😡"

Solution

This PR adds quality presets to the graphics settings modal, and allows Synthesis to automatically select the low (or "fast") graphics preset based on certain parameters including whether the device is a mobile device, or the specs are low. Check the Recommended Settings section for help on testing the recommended settings functionality.


Presets

Fast Graphics (Low)
image

Balanced Graphics (Medium)
image

Fancy Graphics (High)
image

If any options are changed, the preset is automatically set to "Custom":
image


Recommended Settings

The recommended settings are only applied to a device once. We then save whether or not this optimization has been applied in localstorage. To tell the browser that we haven't run the optimization yet, run the following in dev tools:

let p=JSON.parse(localStorage.getItem("Preferences"));p.GraphicsOptimizationApplied=!1;localStorage.setItem("Preferences",JSON.stringify(p));

Then, you can emulate mobile device headers by using device mode in dev tools:
image

Finally, reload the page.

Verification

  • Unit tests pass
  • Changes work as intended
  • Existing bugs have plans

Before merging, ensure the following criteria are met:

  • All acceptance criteria outlined in the ticket are met.
  • Necessary test cases have been added and updated.
  • A feature toggle or safe disable path has been added (if applicable).
  • User-facing polish:
    • Ask: "Is this ready-looking?"
  • Cross-linking between Jira and GitHub:
    • PR links to the relevant Jira issue.
    • Jira ticket has a comment referencing this PR.

@ariesninjadev ariesninjadev requested review from a team as code owners July 21, 2025 22:17
@ariesninjadev ariesninjadev changed the title Aries/1781/quality presets DPR: Quality presets and recommended preset Jul 21, 2025
@ariesninjadev ariesninjadev self-assigned this Jul 21, 2025
@azaleacolburn
Copy link
Contributor

Why don't the settings with sliders appear when you use the fast graphics preset? Is this intentional? Also, could we conform this PR's description to the project's standard?

@ariesninjadev ariesninjadev marked this pull request as draft July 21, 2025 22:35
@ariesninjadev
Copy link
Contributor Author

Why don't the settings with sliders appear when you use the fast graphics preset? Is this intentional?

It's because fancy shadows is disabled on fast. The bubble is still filled because of an existing bug with bubbles and being unable to update them, which I will patch as soon as UI Refactor drops (UI Refactor before GTA 6?)

Also, could we conform this PR's description to the project's standard?

...fine

@ariesninjadev ariesninjadev added rendering Relating to the rendering engine or how something is rendered ui/ux Relating to user interface, or in general, user experience labels Jul 21, 2025
@ariesninjadev ariesninjadev marked this pull request as ready for review July 22, 2025 16:34
Copy link
Member

@AlexD717 AlexD717 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I enable fancy shadows on "fast" it switches to custom mode, but then if I switch back to "fast" it still shows fancy shadows enabled.

Screen.Recording.2025-07-22.at.10.14.38.AM.mov

@ariesninjadev
Copy link
Contributor Author

ariesninjadev commented Jul 22, 2025

If I enable fancy shadows on "fast" it switches to custom mode, but then if I switch back to "fast" it still shows fancy shadows enabled.

Please see this comment, this comment, and this comment.

@AlexD717
Copy link
Member

If I enable fancy shadows on "fast" it switches to custom mode, but then if I switch back to "fast" it still shows fancy shadows enabled.

Please see this comment, this comment, and this comment.

My bad, I didn't notice that. I think pr #1229 should solve your issue.

On another note, would it be possible for you to add a button that the user can press that reruns the optimization? Not really required but I do think that it would add some nice polish.

@ariesninjadev ariesninjadev requested a review from AlexD717 July 22, 2025 19:51
Copy link
Member

@AlexD717 AlexD717 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine for setting graphics quality but it isn't very accurate. Currently we just get the memory and cores which doesn't give an accurate estimate of device performance as cpu core performance can vary wildly. In my opinion it would be best to run a simple performance test, but I am fine approving this if we don't want to bother with that.

@ariesninjadev
Copy link
Contributor Author

This is fine for setting graphics quality but it isn't very accurate. Currently we just get the memory and cores which doesn't give an accurate estimate of device performance as cpu core performance can vary wildly. In my opinion it would be best to run a simple performance test, but I am fine approving this if we don't want to bother with that.

In my experience with web game development with doing performance tests, they aren't too reliable. There are too many factors that could sway the results of the test (surviv.io did an auto graphics adjustment, and the performance test was 4000 lines of mess).

Of course it's still totally an option, but would probably be a whole other 8 point ticket, and grabbing the specs/ram is usually enough to make a guess (and yes, 4gb and 2c are tested values)

@ariesninjadev ariesninjadev requested a review from AlexD717 July 23, 2025 22:41
@ariesninjadev ariesninjadev changed the title DPR: Quality presets and recommended preset DPR: Quality Presets and Recommended Preset Jul 23, 2025
@AlexD717
Copy link
Member

@ariesninjadev now that pr #1229 was merged into dev, are you able to make it so that the checkboxes work properly?

@ariesninjadev ariesninjadev requested a review from AlexD717 July 24, 2025 17:28
Copy link
Member

@BrandonPacewic BrandonPacewic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting an issue where if I:

  1. Graphics Settings -> Fast -> Accept
  2. Graphics Settings -> Fast -> Cancel

Then some lighting setting updates and everything goes dark.

I'm also getting toasts about settings being updated and saved everytime I open the panel. Not sure if this is also the behaviour on dev but it feels not quite right.

Copy link
Member

@BrandonPacewic BrandonPacewic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and I was unable to break the state from what I tried. Unfortunately this is where we are going to draw the line for UI changes for #1241 (AARD-1903). This will need to be updated for the introduced conflicts and then we can merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rendering Relating to the rendering engine or how something is rendered ui/ux Relating to user interface, or in general, user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants