A naive tilemap renderer
One of the biggest mistakes I've made so far is writing code. Lots of people have told me over the years that I should Just Use This Engine, for some definition of This. I've tried using some engines, and some of them were even very good (LÖVE and Godot spring to mind). But I don't often find that entertaining. And this project is not about me making a game for the players to enjoy. It's about me having fun tinkering. If the end result is playable, great. If it's fun, that would be remarkable.
The renderer
My tilemap renderer sucks. I forget the details, but I do recall that it does some smart things, and a lot of daft things.
For the sake of entertainment, here's one silly thing it did while I was working on it.

This particular issue is fixed now, but hopefully now you understand the level of quality we're dealing with.
This is okay, probably
The appearance of the game will definitely change in future:
- the art is an asset pack from kenney.nl, which I dropped in for the sake of just getting something—anything—running;
- I haven't yet decided between 2D or 2.5D, pixel art or not, etc.
Right now, fully functional gameplay is the priority, so I can experiment more with the puzzles. Appearance is important, but the game will only be fun if the puzzles and gameplay are solid.
Mistakes
I wrote the renderer using OpenGL. Two mistakes I made:
- writing a renderer at all;
- doing it naively, without accounting for pixel art being, well, pixelly.
I didn't need to write a renderer. I could have used an engine, a library, or just done
the obvious thing, given that I'm using SDL3, of using SDL_Renderer, SDL_Texture et
al. Probably the output would have looked better with the latter. But I felt that this
custom renderer would give me more flexibility later on (questionable), and also, I just
wanted to.
Embracing bugs
The worst remaining problem with this naive implementation is that it represents pixel locations using floats. This introduces inaccuracies in the location of rendered sprites, and so we get tears in the image (the thin lines appearing between tiles).

I haven't fixed the tearing yet. Possibly the easiest fix would be to just render pixels
to a texture and then perform scaling. Again, this could have been done easily with e.g.
SDL_Renderer et al., but also again, I like making my life hard and gameplay is more
important. So, let me apologise now for all the terrible screenshots you poor readers
will be subjected to in future.
- ← Previous
A grave error