r/Unity2D • u/Nicstar543 • 5d ago
Question/Help Question about pixel UI design
Hey everyone I’ve been working on a pixel art game and had a question about the UI aspect. I currently have all assets sized to display the pixels as all the same size in game, but I am wondering if the UI also needs this? For example I have my battlefield where everything is scaled correctly, which then transitions to a shop, the merchant would need to be like 512x512 to be near the correct pixel scale or whatever, which would be insane, for a 4 frame animation for myself to do. Should the merchant just match the size of the merchant stands pixels? Does it not really matter? Would a background behind the merchant need to be smaller pixels or bigger?
This is like a full screen shop transition
I also have cards with troop icons that go in the hand but obviously dont change size and are bigger visually than things on the battlefield. However the troop icons are bigger pixels due to being zoomed in enough to be visible clearly on the card so their pixels are like 4x as big on the card
Just a little confused on all these aspects. Any help is much appreciated!
•
u/AutoModerator 5d ago
Reminder: Once your issue has been resolved, please reply !solved to this comment (or comment it anywhere in the thread) and your post's flair will automatically be updated to Solved/Answered. You can also edit it to Solved/Answered yourself.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/IC_Wiener 4d ago
No it doesn't have to match the same pixel density. It might be even better to design the UI & text to be vector for readability.
Might be a good idea that the shopkeeper is a sprite in the 3D world, like your gameplay. then layer UI on top of that.
some examples: https://store.steampowered.com/app/590380/Into_the_Breach/
https://store.steampowered.com/app/504230/Celeste/
1
u/Federal-Row2373 3d ago
Short answer: the rule is consistency within a single view, not across the whole game.
- Full-screen shop: it's effectively its own scene, so it can have its own pixel scale. Just keep the merchant and the background at the same pixel size inside that screen. You don't need a 512x512 merchant: draw it small (e.g. 128x128) and scale it up by a whole number (4x). Same look, much less work for the animation.
- Cards: a troop icon shown at 4x the battlefield size is fine as long as the scale is a whole number and uses point filtering, so pixels stay crisp. It's common for UI to use a different integer scale than the world. What looks off is mixing different pixel sizes inside the same element, like a 4x icon next to 1x text on the same card.
- If you want finer detail on the card, you could redraw the icon at the card's native scale instead of upscaling the battlefield sprite.
In Unity, set the textures to Point (no filter), turn off compression, and consider the Pixel Perfect Camera so everything snaps to the same grid.
1
u/Silent_Reputation596 5d ago
For pixel art all sprites/assets should have the same pixel size, is 512x512 the size for the sprites in your game? Because those are some LARGE sprites. Most pixel art games tend to stick to 8x8, 16x16 and 32x32. That's not to say that you can't go higher but if your a beginner you should stick to one of these. Unless your not a beginner in which case, ignore me.