Skip to content
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

make example font_atlas_debug deterministic with a seeded random #12519

Merged
merged 1 commit into from Mar 17, 2024

Conversation

mockersf
Copy link
Member

Objective

  • Make example font_atlas_debug deterministic so that it's easier to check for regression

Solution

  • Use a seeded random

@mockersf mockersf added A-Build-System Related to build systems or continuous integration C-Examples An addition or correction to our examples labels Mar 16, 2024
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 16, 2024
Copy link
Member

@james7132 james7132 left a comment

Choose a reason for hiding this comment

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

If this is meant to be an example for new users, wouldn't this be confusing why we're using a seeded RNG? I can see the benefit in CI but this seems to be a regression in explainability.

@pablo-lua
Copy link
Contributor

I can see the benefit in CI but this seems to be a regression in explainability.

I agree, we can at least explain that we are using seeded rng for ci reasons somewhere (we have something like this in the gizmos_axes example, after explanation, I understood why we are using this, but I don't think a beginner will understand without we saying anything)

@mockersf
Copy link
Member Author

to be fair, I think the other solution is to remove the example font_atlas_debug because it's of no use for users, it was meant to debug how atlas are built for fonts

@alice-i-cecile
Copy link
Member

Determinism is generally useful in games: I'm okay with showing users how to do it, if they happen to be poking through this mostly-internal example.

Copy link
Member

@james7132 james7132 left a comment

Choose a reason for hiding this comment

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

Probably raised this in the wrong PR, since this one is meant for debug, but examples like alien cake addict (in #12515) probably deserves more mention as to why we choose to set it up that way.

@james7132 james7132 added this pull request to the merge queue Mar 17, 2024
Merged via the queue into bevyengine:main with commit 4a4d73e Mar 17, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System Related to build systems or continuous integration C-Examples An addition or correction to our examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants