01 - Beginnings

Hello! Welcome to the first one of these devlogs. Here, I'm gonna ramble about what I've been working on and my current plans and all that. First of all tho, if you don't know what paintread is, it's a purely static precision platformer where your ability to jump is determined by the level around you. You should check it out here! I hope to write a blog post every ~2-4 weeks, but only time will tell if I actually keep that up. Also, I promise that future ones aren't going to be as tech jargain-y as this one xp. Kinda fitting that the devlogs start here since this one is about fixing up a bunch of the game's tech debt from like 8-12 months ago and getting a clean slate that I can better work off of.

Collision Rework

How gaining a surface's ability worked has always been a bit janky ever since I started developing the very first level around a year ago, so I have been working on fully fixing the tech debt that the game has in that aspect. How collisions worked actually changed twice funnily enough. At first, the way that collisions worked, was that you were actually colliding with the yellow / purple walls (which I'll call surfaces from now on) and depending on which one, you'd gain a jump or not. The issue with that was that there was a very inconsistent and noticable issue of the player character sometimes stopping when moving over a section where different kinds of surfacess met. Tilemaps and collisions are something where this has always been an issue and godot semi-recently actually alleviated this (I think this was in 4.4 or 4.5?), but between different types of tilemaps, I imagine that it still persists.

Anyway, I ended up changing it so the player collides with the black blocks and the surfaces became areas that if they detect the player inside them, they apply the effect like regenerating a jump. This was better and didn't have collision issues and is how it currently works in Paintread 0.5.3, but does have 2 very major drawbacks; first of all, every single surface tile is its own area, which is pretty bad for performance, especially for the kind of minimalistic game that paintread is, although that's not a major issue. The much bigger problem is that it is a pain to design levels like this. There are ~10 different area tiles that are used excluding the borders. Since you couldn't rotate these objects on tilemaps before godot 4.5, that meant 4 different variations of every area and since there was no preview for any of them, designing levels was a pretty slow process, probably 2-3 times as slow as the now reworked system. And considering there are people who have been making fanmade levels in the godot editor, that meant a lot of memorizing and annoyances for them, in addition to a much more unintuitive system in general.

This brings us not to today, but instead to like august when I reworked the code to make tiles much more streamlined. Since I barely knew about tilemaps a year ago when I made the system, I completely overlooked the obvious option: just have the walls on a different collision layer that detects the player and a different player hitbox for detecting surfaces. This just lets me have regular tiles that don't have all the previously mentioned disadvantages. Turns out, this works pretty much perfectly and the only issue is that checkpoints still need to use the old system for technical reasons, but since you are now able to rotate non-tile objects, that system will be much more streamlined when I get to polishing it. And since I was going to need to remake the tileset and fix some minor issues, I also decided to add a bunch more tiles and unify everything into a single tileset instead of having it split in 3!

the old tileset. Contains 21 tiles

old tileset for decorations

the new tileset, it's around triple the size of the old one

new unified tileset, including decorations, collisions and surfaces

So what I've been doing is defining the collisions for this tileset for 3 different purposes (fully matching collisions for use for the blocks the player stands on, lenient collisions that extend outwards of the actual sprite to use for surfaces, and strict collisions for the same purpose but for something like death surfaces). After 6-8 hours, that is now done and I'm currently working on remaking all 9 levels with the new tileset, such riveting work that I get to do for around 20 hours based on my estimations :]. It's thankfully not work I need to be fully focused on tho, so I can do it in the background and so far I'm done with Treadtorial, Levej 1 and Up & down.

Color Rework

I will NOT go into detail of how the system for colors on the various surfaces used to work, partly for the sake of brevity and partly because I forgot lmao. The important bits are, that from the perspective of a leveldesigner, it was very restrictive and only allowed either full or half opacity surfaces since changing the colors in the options menu would set the opacity of any non-preset surfaces to full. From a modding and developing perspective, it was a system that was all over the place and super unintuitive to use. I'm still in the process of finishing a couple small things but the way things work now is a lot better; Basically, every different type of surface has an index to a list of colors that they use and the surfaces themselves update their color whenever something changes instead of being updated externally. This also makes modding custom surfaces a ton easier since you can just add your new surface script and only need to add a single color to a list.

The important part about all of this, is that surfaces now define their own opacity instead of being tied to external things which allows for way more freedom in designing levels. I'm not fully done with this system yet and there are some parts I need to work out still, but the bulk of the work there is done already. Theres one more issue that I need to work out, that being the method that changes colors in a surface gets called like 1000 times every time something changes for some reason??? Like theoretically, it should AT MOST be called ~40 times and it being like this causes the game to freeze for a split second when changing the options on older machines so I'll have to look into that.

What's Next?

Once I'm done with all of this, I'll release the next version which will hopefully also have some decent performance improvements and include the new level that's present in the april fool's update! After that, I wanna look into sfx, making music and also having different backgrounds, I have some issues with the current ones and I think they could be improved a lot. Byeah, thanks for reading :)