The best tip anyone ever gave me is this: talent is just another word for stubborn.

Cristina Ramos
Creator of
Recent community posts
Reducing unnecessary work is always the key. Also, as a solo dev making an original game, it's really important to keep the renderer code easy to understand and to iterate. I'm sure I'm close to feature complete, but I may still make some changes, so being able to make changes easily is as important as the code being fast.
Once I'm close to release I can then focus on extreme optimizations, even if they make the code a bit more complex to follow.
Memory hasn't really been a problem, since the Playdate has 16 MB of RAM, which is more than enough. I render internally at 200x120 and upscale to 400x240, so the 16-bit Z-buffer only takes about 48 KB.
I'm not using a Quake-like span renderer either. I use a triangle rasterizer that processes horizontal scanlines. In the Playdate the real challenge isn't RAM capacity, but the CPU's tiny cache. Keeping memory accesses efficient and avoiding cache misses is key to the performance.
Your project sounds really interesting, you should make a devlog of your own.
When I started, my renderer was at single digits and at that moment it felt like it was impossible for me to get anything working in real time. I was stubborn, and eventually it got better. So keep at it!
The biggest optimizations weren't focused on low level hardware, don't get me wrong, those helped to improve the framerate, but the biggest improvements were changing the way I was doing things. Finding a smarter way to calculate things, to cache everything, to draw only what's really needed, etc.
Good luck with your project!
Yes, the 8×8 Bayer pattern is fixed to screen coordinates, so it doesn't move with the camera or rotate with the view. I experimented with shifting the pattern based on camera yaw, but that introduced more noticeable artifacts, so I kept it screen-fixed.
I always test the solutions on the Playdate's display, since that's the target device, and the current one works well.
Good question! It could be faster, but the lines still need clipping and depth testing, and masked textures can have contours that aren't represented by BSP edges. I went with the current plane-ID approach because it builds on the renderer's existing visibility and masking, making it easier to handle moving objects and transparent textures. Still, it would be interesting to test and benchmark that approach, see if it can be actually faster.
