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

Allow nearest-neighbor scaling and pixel-perfect window size options #630

Open
emihead opened this issue Nov 26, 2023 · 2 comments
Open

Comments

@emihead
Copy link

emihead commented Nov 26, 2023

This probably needs a bit of explanation. I wanted to try making a low-res "resource pack" for BrogueCE by editing tiles.png. Since the original tiles are 128x232, I edited them at the scale of 16x29. However, I feel like the way they're rendered in game makes such a resource pack look really bad. I'm not super knowledgeable about this kind of stuff, but it seems like the tiles are rendered using something like "bilinear" scaling rather than "nearest neighbor", so they end up being blurry, which goes against the pixel style I was going for.
image
For reference, the tiles.png looks like this, so it doesn't have anything to do with me messing up the actual image, it's purely related to how the game draws it to the screen.
image

My proposed solution for this involves a couple changes:

  1. Giving the user an option to switch the rendering mode to nearest-neighbor if they wish
  2. Letting the user set their window size to any multiple of 800x493 pixels. This is the size of the smallest tile that could scale up cleanly (16x29) times the size of the screen in tiles (50x17).

I hope I worded this in a way that's understandable. This is obviously a change that's not at all critical to gameplay or anything like that but I think it's still something that'd be really cool to have for people who are interested in modifying the game's visuals.

@tmewett
Copy link
Owner

tmewett commented Nov 26, 2023

Did you delete tiles.bin? It caches hinting info about how to align tiles to pixels while scaling. It might be impacting things

@tmewett
Copy link
Owner

tmewett commented Nov 26, 2023

To clarify: try deleting it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants