This render script locks the vertical component of the displayed resolution for the purpose of retro-style games, for both 2D and 3D. The horizontal component scales to match according to the aspect ratio of the window, so pixels are always square or close to square.
This is my first Defold project, a first to-do.