britzl / template-lowres

Defold template project for lowres/pixel-art games.
26 stars 3 forks source link

Low res rendering #1

Closed subsoap closed 6 years ago

subsoap commented 6 years ago

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.

britzl commented 6 years ago

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

subsoap commented 6 years ago

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.

subsoap commented 6 years ago

it's live now

britzl commented 6 years ago

Pushed a first version now

subsoap commented 6 years ago

@britzl Bravo on the template! 🎉 😍

subsoap commented 6 years ago

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