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

Expose pixel snapping settings add pixel-art notes #88456

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Expose pixel snapping settings add pixel-art notes #88456

merged 1 commit into from
Feb 20, 2024

Conversation

sabslikesobs
Copy link
Contributor

This small in-engine documentation change aims to make it easier to discover ways to handle pixel art aesthetics.

  • I have moved 2D pixel snapping settings out of "Advanced." This now matches other pixel-art-friendly settings for GUI Snapping and Default Texture filtering.
  • I've added notes to the project settings and Sprite/AnimatedSprite sources to hint users towards better understanding of why pixelated sprites may not work correctly and what to do about it. This should help users make informed decisions for their needs.

Context: Proper handling of pixel art in Godot is routinely frustrating for new users: I, like others, assumed that Godot would act on pixels, not subpixels, when I was working a pixel art game. I was confused when my interpolations would appear blurry, and when pixel textures would be distorted for no apparent reason (this was because of centering). I had naively thought that setting Linear interpolation would be the single "it's a pixel art game" toggle, but that only hid the underlying issues until later. I had no idea there was a snap-to-pixel option because it was hidden in the Advanced options--my default assumption was that a pixel art game would want no subpixels at all.

Some references for the frustrations of other users:

@sabslikesobs sabslikesobs requested review from a team as code owners February 17, 2024 18:21
@sabslikesobs
Copy link
Contributor Author

I fixed the mistaken GLOBAL_DEF location.

Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

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

I do appreciate the effort, I really do, as I can relate to this.

But the PR's descriptions are a tad too excessive. By being so verbose and specific they are difficult to read, and they do the opposite of what they clearly try to achieve.

doc/classes/AnimatedSprite2D.xml Outdated Show resolved Hide resolved
core/config/project_settings.cpp Outdated Show resolved Hide resolved
doc/classes/ProjectSettings.xml Outdated Show resolved Hide resolved
doc/classes/ProjectSettings.xml Outdated Show resolved Hide resolved
doc/classes/ProjectSettings.xml Outdated Show resolved Hide resolved
doc/classes/Sprite2D.xml Outdated Show resolved Hide resolved
@sabslikesobs
Copy link
Contributor Author

@Mickeon Thanks for your review. I've cut most of the text, as I agree that those details are not necessary for editor documentation hints, and the main issues of discoverability are still solved--a user who experiences mysterious distortion from centering or something should be able to find pixel snapping a little easier.

@sabslikesobs
Copy link
Contributor Author

(Accepted all review suggestions)

Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

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

It's good in its current state, with a few nitpicks.

I like this slight extra nudge in the documentation to ease up pixel art developers. I don't think it will completely remove any need of external help, but it is nice to have.

doc/classes/ProjectSettings.xml Outdated Show resolved Hide resolved
doc/classes/AnimatedSprite2D.xml Outdated Show resolved Hide resolved
@sabslikesobs
Copy link
Contributor Author

Thanks, I applied your suggestions. A few other notes in the same file also use the term "games."

@Calinou Calinou added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Feb 17, 2024
@Mickeon
Copy link
Contributor

Mickeon commented Feb 17, 2024

@sabslikesobs sabslikesobs requested review from a team as code owners February 17, 2024 23:28
This small in-engine documentation change aims to make it easier to
discover ways to handle pixel art aesthetics.

- I have moved 2D pixel snapping settings out of "Advanced." This now matches other pixel-art-friendly settings for
GUI Snapping and Default Texture filtering.
- I've added notes to the project settings and Sprite/AnimatedSprite sources to hint users towards better understanding of why pixelated sprites may not work correctly and what to do about it. This should help users make informed decisions for their needs.

Context: Proper handling of pixel art in Godot is routinely frustrating for new users: I, like others, assumed that Godot would act on pixels, not subpixels, when I was working a pixel art game. I was confused when my interpolations would appear blurry, and when pixel textures would be distorted for no apparent reason (this was because of centering).
I had naively thought that setting Linear interpolation would be the single "it's a pixel art game" toggle, but that only hid the underlying issues until later. I had no idea there was a snap-to-pixel option because it was hidden in the Advanced options, since my default assumption was that a pixel art game would want no subpixels at all.

Some references for the frustration:

- #82696
- https://www.reddit.com/r/godot/comments/fah25e/best_way_to_achieve_pixel_perfect_rendering/
- https://shaggydev.com/2021/09/21/project-setup-for-pixel-art/
@sabslikesobs
Copy link
Contributor Author

Squashed into one commit.

@Mickeon Mickeon removed request for a team February 17, 2024 23:45
@Mickeon Mickeon removed request for a team February 17, 2024 23:45
@akien-mga akien-mga modified the milestones: 4.x, 4.3 Feb 18, 2024
@akien-mga akien-mga merged commit 73758e0 into godotengine:master Feb 20, 2024
16 checks passed
@akien-mga
Copy link
Member

akien-mga commented Feb 20, 2024

Thanks! And congrats for your first merged Godot contribution 🎉

@akien-mga akien-mga added cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release and removed cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants