Some Dumb Bum Fun

Today’s implementation of the bum attack and the crouch have been relatively straightforward, but I now need to think about blocks that the player can interact with. The problems are many.

First of all, the blocks are not guaranteed to be aligned to a 16×16 grid. In fact, if they have been moved by the player, there is a good chance that they won’t be. It is possible to move the player along by using the bounding box extremes, but it is not enough, as the following example shows.

Observe that the bounding box boundaries are overlapping in different positions. However, also note that the bounding box rules are identical between the two. For example, the player sprite’s top bounding box boundary is between the top and bottom boundaries of the block, and the player’s right boundary is between the block’s left and right boundaries. I want different reactions for these two scenarios. The one on the left should result in a headbang, and the one on the right should be a simple wall collision. This shows I need to think more about the rules regarding the player colliding with free-movingĀ blocks. This will be my focus for tomorrow.

Leave a Reply

Your email address will not be published. Required fields are marked *