scawful / Oracle-of-Secrets

Custom Code for the Legend of Zelda: Oracle of Secrets ROM hack
11 stars 0 forks source link

Minecart, Mineswitch, and Switch Track Sprite Review #53

Closed scawful closed 4 months ago

scawful commented 4 months ago

Changes to formatting and moving Minecart into Sprites/Objects to get a second look at all the work done so far and recommendations to improve the system. Particularly with regards to "dummy carts" which exist at transition points in dungeons. Potential expansions could be making the minecart a follower when the player is riding it, but this would require more extensive research and probably a separately filed issue. Most of the dummy cart code is handled inside of the Sprite_Minecart_Prep fn.

The collision detection also needs some looking at. There is an experimental routine SetTileLookupPosBasedOnDirection which is meant to help prevent the cart going off the tracks when it hits the custom collision tiles for the corner pieces depending on the direction the cart is approaching them from. This routine would be used inside of the HandleTileDirections routine, so be sure to check that out while reviewing. One potential fix I attempted was the ClampSpritePositionToGrid fn which would clamp the sprite to a 16x16 grid, however this slowed the game down when ran every frame. I attempted to only run it at the corner tracks and this makes a bit of a grinding turn effect, which slows down the ride until the turn has been completed.

Additionally, the cart now requires the player to press the B button when standing near the cart to start the ride. This will show the player swinging their sword, so if there is another button you think would be better like L/R feel free to give that input. This was so the cart was easier to lift with the A button. I also need to handle the logic for the cart throwing and landing, since right now it does not have any distance to the throw and simply drops in front of Link.

scawful commented 4 months ago

I've made updates to the description and expanded the scope of this PR to include all of the features which need attention. PTAL.