Deadlines? What deadlines?


Hello again. This is going to be a very short one. And you know why.
Naturally, I did not deliver on everything that I said last week.


Here you can see a line being draw for every full collision on the map, and also the player bounds. Some of the map layers are correctly tinted and some aren’t. And of course, my collision algorithm doesn’t work.


My Idea for the collision map, is to use 1Byte for each tile to store the type of collision in each one. For now, 0 means there is no collision.
1 means full collision. I’m still unsure on what to do with the types. Probably I’ll use a type alias for this, so I can change the size later. Because I want to use the minimum amount of space to store the collisions. But to do that, I need at least 4 numbers. And I don’t think I can cram 4 numbers, even if they are just from 0 to 10 in 7bits. Here is an example:


In this one we have a tile in blue that has two empty pixels on it’s left.
For me this tile has a negative X offset of two pixels. Extending this logic we could have positive offsets in X and also the two in the Y range. For now, I’m going to map it to each one as an index. Since I don’t think (currently) we are using all of this types.

For the next week I’m planning on just finish the collision and implement the collisions for the non-full blocks. That should be easy enough to finish it in time, and also, refactor a little bit of the code.