-
Notifications
You must be signed in to change notification settings - Fork 32
Description
bug:
sometimes when jumping into bricks whether big/small, mario will teleport sideways several bricks worth or even to the opposite side of a entire row.
how to reproduce:
not entirely sure how to make it consistently happen, but try as small mario on the first set of platforms so that you don't break them and jump into the bottom/corner of bricks repeatedly and from multiple angles/velocitys.
suggestions for fixing:
I'm thinking that the collision code for one brick occasionally decides to move mario sideways, but in the wrong direction and thus into another brick because it doesn't know theres another brick there. So that brick proceeds to do the same and results in Mario teleporting multiple bricks or even to the other side entirely.
probably need to tighten up the bounding-box code for how Mario resolves collisions, since Mario is so central to the game its worth extra collision-handling code i think. maybe just better resolving edge-cases (literally) for when multiple bricks are in a row? maybe make the brick constructor method ask the gameengine if there are any neighboring bricks and if so they both give eachother a reference to themselves and then any collision handling that involves thems can do the needed 3+ entity checking?
also related to the moving platform issue as it also is probably related to 3+ entity collision handling: #37 (comment)