Fixed that one cart physics bug.


The bug in question  was when you collide with a corner and it bounces the Chinchilla in the opposite direction. I tried fixing it as best I could earlier before release, but now post-release I thankfully figured out a fix with the wall collision.

The story behind this bug and the programming -- It was a sort of quick jerry-rigged physics script that wasn't at all originally used for a player controller. Before some tweeking, the bug used to be a lot worse than what it was on  release and was essentially unplayable. The way it was programmed, the script would take in the player object, look for any collisions, and apply movement based on those collisions. The way it worked specifically was flipping the y direction of the movement if hitting the top or bottom walls, and flipping the x direction if hitting the left or right walls. But, there was no actual physics simulation involved (again, it was very jerry-rigged), and so I've had to play with the offsets and more conditional statements to make sure it doesn't detect walls it shouldn't detect.

In the end, this was a learning experience that taught me that next time I should create a mathematically better physics system-

Files

Utah Indie Game Jam 2021 (after-jam bug patch).zip 11 MB
Nov 19, 2021

Get What It's Like to be Reincarnated as a Chinchilla

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.