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

Formspec pixel perfection and atlases improvement proposals #13805

Open
lua-rocks opened this issue Sep 14, 2023 · 0 comments
Open

Formspec pixel perfection and atlases improvement proposals #13805

lua-rocks opened this issue Sep 14, 2023 · 0 comments
Labels
@ Client rendering Feature request Issues that request the addition or enhancement of a feature Formspec

Comments

@lua-rocks
Copy link

lua-rocks commented Sep 14, 2023

Problem

In the current implementation of the formspec, there is no universal way to strictly (pixel by pixel) control the position and size of GUI elements. The developer has no way to change the interface scaling method, preventing rounding to non-integer values, which causes each pixel on the screen to stretch or compress to random actual sizes.

Solutions

In fact, the engine is already capable of scaling formspec correctly. If you specify its dimensions not in abstract inventory slots but in real pixels, the scaling will be very precise, but it will create a bunch of problems. I think it would be nice to add such a command in the formspec syntax that switches it to 'pixel perfect mode,' in which all coordinates are specified in pixels rather than inventory slots.

In addition, I'd like to add one more thing that I would really like to see in formspecs - texture atlases, which I'm so used to in other engines. It would be really cool if the entire texture pack could be placed in one image, and the engine could create 'batches' from such atlases to improve performance.

I understand that this is a challenging task, but if you ever decide to completely rewrite the formspecs, please consider my request. Thank you! :)

Additional context

Related issues: #13777, #12524, #6527

@lua-rocks lua-rocks added the Feature request Issues that request the addition or enhancement of a feature label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client rendering Feature request Issues that request the addition or enhancement of a feature Formspec
Projects
None yet
Development

No branches or pull requests

2 participants