Low resolution pixel art game

Lowrez game jam? Please share with us whatever it is you decide to create!

I would also do like @Andreas_Jirenius and modify the render script. First, set your game.project to the size in which you want to play your game (you suggested 128x128). Next, copy the default.render_script to some folder in your project. Create a new Render File and point it to your copied render_script. In the render script you need to change how the view and projection is defined.

I would change:

render.set_projection(vmath.matrix4_orthographic(0, render.get_width(), 0, render.get_height(), -1, 1))

to

render.set_projection(vmath.matrix4_orthographic(0, 64, 0, 64, -1, 1))

to force sprites to render to only 64x64 pixels.

Then I’d also ensure that the viewport is rectangular to avoid it being stretched. For this I’d probably change:

render.set_viewport(0, 0, render.get_window_width(), render.get_window_height())

to

local size = math.min(render.get_window_width(), render.get_window_height())
render.set_viewport(0, 0, size, size)

And the same for the gui projection further down.

You probably also want to change default_texture_min_filter and default_texture_max_filter in game.project to nearest to get that blocky pixel feeling.

2 Likes