This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Castlevania collision and hit boxes

Castlevania collision and hit boxes
by on (#228492)
I came across this post from 6 years ago that includes a Lua script for viewing the collision and hit boxes in Castlevania. I noticed that it fails to display the collision boxes for hidden treasure items such as the flashing money bag before you enter the castle. The script reveals how the coordinates of the game objects are stored in memory. I studied the surrounding regions and I found other related object properties. But I was unable to figure out how the treasures are represented or why they aren't like the other objects. If the treasures aren't showing up, there might be other things missing as well. It would be nice to expand the script to account for them all.

Also, running the script suggests that the hitbox for the whip only happens for 1 frame even though the whip graphic is displayed for a full 10 frames. Is that really the case? I've always had a sense that when you jump and whip simultaneously, you can stretch out the effects of the hitbox.
Re: Castlevania collision and hit boxes
by on (#228493)
Update: Regarding the hidden treasures, the loop range for the object addresses simply needed to be extended. It loops from 4 to 20, suggesting that Castlevania supports 16 game objects in addition to the player. Expanding the range to 4 to 24 made the collision boxes for the hidden treasures visible, suggesting that Castlevania supports at least 20 game objects.