Home 576
Post
Cancel

576

About a half an hour ago I solved an issue I have been having with my 2D (but actually 3D) game project. It feels great.

When I started this, I had an extremely specific aesthetic and feeling that I wanted to capture. A late 80’s to early 90’s arcade machine. The first part of the journey  was creating a CRT effect. That came together fairly quickly. The next part was making properly looping animations and a system for making them either 3D or 2D rendered sprites. In the end I managed to make them 3D meshes that get rendered in a spritelike manner.

After that was control. I wanted analog control that still felt snappy like D-Pad or joystick inputs. I think I have that mostly taken care of, along with a simple, but solid general input component that handles button presses and gamepad or keyboard inputs. I have interaction with colliders and trigger volumes working. Animation trees are mostly ready to go. The only thing that never worked quite like I wanted was the camera.

Godot 4 is pretty well known for having camera jitter when trying to create pixel perfect movement and panning. I experienced a lot of it. Eventually I was able to get the player and object movement to be pretty crisp. There wouldn’t be very much pixel twitching when you ran the little character around. Background tiles would stay stuck to the simulated phosphors and CRT bloom. Until the camera moved. If it moved slowly, everything looked okay, but as soon as it started moving with any sort of speed things got very twitchy.

I did the first thing anyone would do, I looked it up on the internet. I watched tutorials. I snooped around in code off of GitHub. I did the research. There are a lot of people doing pixel art games and a lot of those people are working on pixel perfect cameras. Not one that I found were solving the same problems as me, and a lot of them required so many weird workarounds and caveats that it would be a chore to develop the actual game. I want aesthetic constraints, not arbitrary technical ones.
Anyway, at the end of all of that, I combined some techniques and figured out a solution that actually allows me more artistic freedom, and it looks damn near perfect.

I could try to explain, but you can just watch this and judge for yourself.

This post is licensed under CC BY-NC-SA 4.0 by the author.
Trending Tags
Trending Tags