britzl / template-lowres

Defold template project for lowres/pixel-art games.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Low res rendering

subsoap opened this issue · comments

commented

To do it right I think everything on the screen has to be rendered to a render target, and then that render target stretched to fit the size of the screen with filtering disabled and nothing else drawn outside of what was drawn to the render target. Using a render target is required because of the way the engine works with drawing - it won't be true 64x64 or lower otherwise.

Hmm, yeah, maybe. I was thinking of rendering to 64x64 and then stretching everything in the render script.

commented

They allow on screen buttons to be high res as long as they are for controls only, such as on screen buttons for mobile. So GUI could be rendered at higher res still.

I think some of the artifacts I've seen in the past in pixel art games were caused due to not merging the render at native resolution, and then stretching that to fit the view. Instead sprites get stretch independently. It looks almost right due to filtering being disabled, but the artifacts still show up.

Something else useful thing to look into would be how Enter the Gungeon handles pixel perfect rendering.

34863763-f2aa5e12-f725-11e7-9db7-ff798a75783f

34863762-f296288e-f725-11e7-90db-70dd258f5057

Basically let the window resize but center the game render and only change its relative size as it can safely fit into the parent window view while being a power of 2.

commented

it's live now

Pushed a first version now

commented

@britzl Bravo on the template! 🎉 😍

commented

Working on mine here https://github.com/subsoap/lowrezjam-template will do most of the work this weekend, made a pixel Defold logo