Target size

The render script can be a bit daunting at first but it will give much power.
In your case, I think it will be enough to send a couple of messages to it:

  • Setup your “design” resolution, let’s say 320x200, in project settings

  • Send a message to use fixed fit projection:
    msg.post("@render:", “use_fixed_fit_projection”, { near = -1, far = 1 })

  • Send a message to resize the window of your game (I’m using something arbitrary)
    msg.post("@render:", “resize”, {width = 1280, 720})

At this point the 320x200 will be scaled at best into the 1280x720 window. Don’t forget to set the texture filter if you’re dealing with pixel art.

2 Likes