Posted June 11, 2024 by patchware
#pixelart #unity #development #retro #post-processing
Since I first worked on this game, I've become more aware of how units work in Unity. When I created The Infiity Machine, I would throw images and text into the scene and resize them to my liking. The problem with this is that you get pixels of all sizes, which kinda ruins the immersion if you're trying to emulate a retro gaming style.
I've learned a little from each game I have worked on since and here is my cheatsheet for setting up a Unity project to be pixel-perfect.
public static float RoundToPixelValue(float value) { Float value = 1/32f; float remainder = value % multiple; float roundedValue = value - remainder; if (remainder >= multiple / 2f) { roundedValue += multiple; } return roundedValue; }
Post Processing
I've applied bloom and some chromatic aberration to give the game the feeling of being played on an older device. To this end I've also added a scanlines texture in the 'Lens Dirt' field of Bloom to emulate a CRT screen
In addition to all that cosmetic stuff, I decided to add an element of backstory for The Infinity Machine. Try collecting the pages scattered about the room and check them out on the upgrade screen by clicking on the highlighted books.