A Low-Res Display in Unity

I don't want this book to be a tutorial on how to do things in Unity, but this is a fun technique, and maybe it'll be useful for other game engines.

LOW REZ GAME JAM

In 2016 and 2017, I competed in a couple of game jams where the constraint was that you only had 64 pixels x 64 pixels for your display. This was a little bit more forgiving than the 40 pixel x 48 pixel "low res" graphics mode of the Apple ][ that I learned to program on.

I was able to write to a texture in Unity and draw a screen-oriented quad with that texture, which provided good results. Having the CPU modifying texture data isn't great for GPU performance, but the games I was working on didn't need a lot of speed (one primitive, 4096 texels per update) that's not that demanding.

Scene setup

For a project like this, you can use a 2d or 3d project. Create a single quad in the scene, and place it where it fills the camera's view. I use an orthographic camera, which seems like it might be slightly more efficient, but probably not worth worrying about.

I attached a C# script to that quad, and inside the script, I create a new Texture2D for my use:

Texture2D texture = new Texture2D(64,64);
renderQuad.material.mainTexture = texture;
texture.filterMode = FilterMode.Point;

And then in Update, I call into my game mode drawing code, which fills out a framebuffer object, which I then copy into the texture:

texture.SetPixels32(frameBuffer);
texture.Apply();

For some projects, I maintain a palette for more authentic constraints, but I often just draw using 24-bit RGB values.

Last updated

Was this helpful?