Best way for low resolution 2D pixelart game?

Hello everyone!

I am working on a low resolution game that supposed to look like an old NES game. The native resolution is 256x224. I wonder what would be the best solution to avoid issues with pixel perfection.
Right now I do the following:
-I am using 8 pixels/units for sprites.
-Snapping the camera to every 0.125 unit (for some reason, it’s not perfect, I see a few pixels of on the edges
-Using Tiled for maps, using X-UniTMX for importing them, I needed to edit one of its script, the UV coordinates that it generated wasn’t perfect. Maybe it’s still not, but I can’t really see it. I am just thinking about the camera issue. Maybe it’s caused by its imperfection.
-Snapping sprites with a special shader that actually snaps the vertices to 0.125 units precision. It actually works fine.
-The customised sprite shader also takes advantage of FF0000, 00FF00, 0000FF colours, it can recolour those colours but it’s just for NES’s limitation, so I can’t really cheat with using more colours. Not pixel perfection related thing.
-I had to add some offset to the shader because fonts and HUD elements were pretty bad looking. Especially fonts, at the native resolution.

So what should I do for scaling? It should stay perfect. Now, I am happy with 256x224, but of course, I can’t leave that as it. It’s just a resolution for the editor. I need a good solution for scaling up. Is it possible to render it somehow at this resolution to a texture and display it with another camera? Or some other solution? What about resolutions that’s not multiple of 256 or 224 (or 240)?

I need some suggestions and an idea, how should I render it in that resolution and scale it up without messing up the pixel perfection. I tried with using another camera actually, rendering it to a texture, but it was looking horrible. It was looking different, some pixels were wider, some of the were missing. And I set the camera position well I think.

The best solution I’ve found is this set of scripts:

using it is just about as easy as it gets. The price is nice too. It’s a bunch of solutions that are actually fairly elementary, but it is implemented in a way that’s easy to use.

1 Like

unless you want to lose your mind, I’d also advise the above script, and my fonts of course! (shameless pimping, linked in my signature)

1 Like