Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

those blasted MMF Hotspots!


Recommended Posts

Okay, if there is one thing that is annoying about MMF/TGF sprites, its setting those hot spots!

So what kind of techniques do you use to set hot spots? Do you set them relativte to the center of the sprite? Or do you set them at the bottom center? Also what about walking/running animations? Do you set them so everything stays relatively centered animation wise, or do you set them so the character's feet is level and causes the character to bouce when they run? Discuss.

Link to comment
Share on other sites

When you rotate the sprite it rotates arround the hot-spot, right? Or do you have to rotate and define hotspots for each 360/16 degrees (:/)? Anyway, GM has a similar mechanism. I'm assuming they work pretty much the same way (if you draw the sprite at (x,y) then the hotspot will be drawn at (x,y) and all the pixels are relatively placed).

Anyway, the way I do it is based on the circle mask used for rotating. The idea is that you place the circle over the sprite so that the part of the sprite you want to be just above the ground overlaps with the very bottom of the circle. then the center of the circle would be the center of the sprite, or the "hot-spot." The idea being, that if the sprite rotates around this point, then the part of the sprite that you want to be above the ground will rotate along the edge of the circle. The point usually ends up being about 2/3 down the sprite. Here's a diagram:

sonic_circle.png

If you zoom-in and mouse-over the center of the circle (the green cross), you get a coordinate in the lower right. That's your hot-spot.

It's also a lot easier if your sprites fit into a compact 16*i by 16*j form.

Link to comment
Share on other sites

If I'm making a static engine and I don't feel like spending too much time on the sprites, I'll just set it to the feet. Otherwise I'll put it at the middle of the sprite's belly and for animations like walking I'll shift it a bit to give it the bounce. If I can't see the belly for a part of the sprite being in the way, I'll count how many pixels down it is from either the pupils or the shoulder of the right arm. For certain animations like jumping where the form changes, I'll just put the hotspot in the very center of the sprite. That's how I usually get things done. For sprites other than Sonic though, I either put it in the center or if I want it to rotate in a certain way I'll put it in a spot that's almost like the sprite's 'joint'.

Edit: Little method I forgot to mention for finding out how much to move the hotspot for the walking bounce. Check the walking frame where the feet are almost in a standing pose ( when they're transitioning from front to back and visa versa ). The bottom-most point of the shoe is the ground. When you notice another frame slightly below this point ( counting the pixels from the belly to the bottom point and comparing each frame to this can help ), move the hot spot down the amount of pixels the foot went down. If the foot happens to be higher on a certain frame, don't move the hot spot up, just leave it at the normal position. It's really easier than it sounds; for me anyway.

Link to comment
Share on other sites

For me it's very rare to have any kind of problem with hot spots. I usually just center them pressing 5 on the numpad. If some sprite has a very different shape than the others, I go back, look to see where the hotspot is at Sonic, and place it at the same/a similar place on the problematic sprite.

That doesn't work. It does nothing when I press 5 on the numpad

Link to comment
Share on other sites

" Unless it's Multimedia Fusion 2, yo, since MMF2 has preset buttons instead of hotkeys "

Frankly, I support the template idea that Xoram uses, since it rules out the option of retarded positioning, since you know exactly how your sprite is going to be placed ( granted if you put the main sensors in the template background ), but I never got around to doing it because I usually do math before placement, not placement after math.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...