Username:
B
I
U
S
"
url
img
#
code
sup
sub
font
size
color
smiley
embarassed
thumbsup
happy
Huh?
Angry
Roll Eyes
Undecided
Lips Sealed
Kiss
Cry
Grin
Wink
Tongue
Shocked
Cheesy
Smiley
Sad
1 page
--
--
List results:
Search options:
Use \ before commas in usernames
I want to make a snes hitbox viewer, for classic fighting games. I have bizhawk, and i have the addresses for the x and y position of the center of the sprites as well as the position of the camera. my question is, is there and way to find out how big the hitbox should be without guessing?
Thread title:  
All the things
It really depends on the game. Most games have the data structures set up such that a common index will point to a table of relevant hitbox information, typically in the form of x/y radius. It's hard to dig into this unless you can work your way through an assembly trace, though. So if you want to get through that next step, I would advise you to study up and then see if you can figure out how the game checks whether something "hits" or not.
Typically games store information about an object in contiguous memory addresses (like your player's X is near your player's Y). If you've found the centers of sprites, try looking in nearby memory addresses to see if any of them look like width/height values.
Note that sprite positions are not necessarily character positions. It could be just the data used for drawing the sprites, rather than the data used for hit detection. And to my knowledge, fighting games often use multiple hitboxes for each character, because a single rectangle doesn't really work for such a detailed outline.
Edit history:
Patashu: 2014-02-20 01:20:31 pm
Oh right, it's for a fighting game. Then yeah, you're not likely to find hitboxes with the ease of finding hitboxes in other games, because of what Scepheo said ^^ They still exist but they'll be more difficult to find.
All the things
Fighting game or not, different games handle things in different ways. I've seen uses of run-time table lookups, storage within enemy data structures in RAM, or even as hard-coded values in object-specific subroutines. It can be really tricky to figure these things out. Your best bet in understanding things to the point of making a viewer is to set up some cases where you can record a single frame of action and key in on something directly related to hitboxes, such as HP loss. Check the assembly immediately around that and see where it pulls in values. Another approach is to use the centroids of the hitboxes, if you already have them.

That said, a lot of engines get re-used from game to game. If you happen to have a hitbox viewer for Final Fight, there's a pretty good chance that Final Fight 2 or 3 will use a very similar process, maybe only differing in RAM addresses. You could try to use some known viewers to help you out in that regard.