Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
1 user currently in Super Mario World hacking: |
Acmlm's Board - I2 Archive - Super Mario World hacking - Collision Detection | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
francoispress Goomba Level: 8 Posts: 3/30 EXP: 2158 For next: 29 Since: 05-14-05 Since last post: 168 days Last activity: 167 days |
| ||
How is collision detection done in Super Mario World? This has always intrigued me. Is it tile-based or sprite-based. Perhaps I will get into Super Mario World because it could attract more tourists to my site. It also looks like fun. |
|||
Smallhacker Green Birdo SMW Hacking Moderator Level: 68 Posts: 1613/2273 EXP: 2647223 For next: 81577 Since: 03-15-04 From: Söderhamn, Sweden Since last post: 10 hours Last activity: 9 hours |
| ||
It's tile based when it comes to tiles and sprite based when it comes to sprites. (edited by Smallhacker on 05-14-05 01:49 AM) |
|||
francoispress Goomba Level: 8 Posts: 6/30 EXP: 2158 For next: 29 Since: 05-14-05 Since last post: 168 days Last activity: 167 days |
| ||
Originally posted by Smallhacker What would you concider tile based? Walls, blocks, ground, etc? I'm still confused. |
|||
Juggling Joker Boomerang Brother SMW Hacking Moderator Yeah, JAMH is still being worked on. Level: 48 Posts: 832/1033 EXP: 811447 For next: 12096 Since: 03-15-04 From: Wyoming Since last post: 2 days Last activity: 3 hours |
| ||
The only collisions that matter to the game is when a sprite touches a Layer 1 (or Layer 2, in some levels) object. Everything else is ignored, at least as far as I know. | |||
Smallhacker Green Birdo SMW Hacking Moderator Level: 68 Posts: 1614/2273 EXP: 2647223 For next: 81577 Since: 03-15-04 From: Söderhamn, Sweden Since last post: 10 hours Last activity: 9 hours |
| ||
Don't forget that (most) sprites turns around if it collides with another sprite. Also, don't forget Mario to sprite collision. | |||
Juggling Joker Boomerang Brother SMW Hacking Moderator Yeah, JAMH is still being worked on. Level: 48 Posts: 837/1033 EXP: 811447 For next: 12096 Since: 03-15-04 From: Wyoming Since last post: 2 days Last activity: 3 hours |
| ||
Yeah, I forgot Sprite to Sprite. Silly me. And I consider Mario a sprite, albeit a little more unique than the rest of the bunch. | |||
BMF98567 BLACK HAS BUILT A SILLY DICE-MAZE! GO! Current list of BURNING FURY >8( recipients: - Yiffy Kitten (x2) - Xkeeper Level: 53 Posts: 869/1261 EXP: 1094149 For next: 62970 Since: 03-15-04 From: Blobaria Special Move: Rising Meatloaf Backhand Combo Since last post: 21 hours Last activity: 1 hour |
| ||
The SNES does not have hardware collision detection, so it must instead utilize the screen location of each sprite. There's usually a "box" of coordinates programmed to match each sprite's size (though in SMW's case, each box is probably 16x16, aside from special sprites like Rexes and Dino-Rhinos), and if one sprite's collision box enters another's, the game runs an appropriate routine (hurt Mario, flip sprite, power-up, etc.). For a good example of collision detection boxes, play Vectorman for the Genesis and press ABACAB while paused. The little lights that appear indicate where collision detection will occur. |
|||
DisruptiveIdiot Paratroopa Level: 21 Posts: 93/147 EXP: 42614 For next: 7329 Since: 04-09-04 Since last post: 4 days Last activity: 5 hours |
| ||
Originally posted by BMF3PO How complicated is the collision code? Has it been mapped out fully yet? Just curious, I might have some ideas to fiddle with if they're feasible. |
|||
Sukasa Boomboom Error 349857348734534: The system experienced an error. Level: 57 Posts: 556/1981 EXP: 1446921 For next: 39007 Since: 02-06-05 From: *Shrug* Since last post: 6 days Last activity: 1 day |
| ||
AFAIK It has not, although I would think that it wouild work something like the example below. 'get the sprite's size (commented out becaue the code for the tables I was using was rather large) 'now check it with the player's X coordinate. (the code is almost the same as the snippet below) 'Now, if the the X coords were reasonably close, check the Y co-ords if Px > Ex then if (px - Ex) < es AND (px - ex) < ps then coll = TRUE else if (ex - px < es AND (ex - px) < ps then coll = TRUE End If 'now do the damage routine if there is a collision... |
|||
francoispress Goomba Level: 8 Posts: 14/30 EXP: 2158 For next: 29 Since: 05-14-05 Since last post: 168 days Last activity: 167 days |
| ||
Originally posted by BMF3PO So it's tile based just like I thought. Wouldn' that have and effect on the graphics? Oh, but wait... graphics are stored as tiles anyways. I'm wondering if these collision detections take into account transparent areas. And why does Mario or any of the other characters always hit platforms, ground, pipes, or walls perfectly? Why is there not overlap of the 2 sprites when the collision detection occurs? What would be your approach to this? |
|||
Sukasa Boomboom Error 349857348734534: The system experienced an error. Level: 57 Posts: 559/1981 EXP: 1446921 For next: 39007 Since: 02-06-05 From: *Shrug* Since last post: 6 days Last activity: 1 day |
| ||
actually, if you look very closely, mario overlaps all other objects and spries by one pixel before he interacts with them. | |||
francoispress Goomba Level: 8 Posts: 23/30 EXP: 2158 For next: 29 Since: 05-14-05 Since last post: 168 days Last activity: 167 days |
| ||
Originally posted by Darkflight Hmm... but how does one deal with the collision detection between sprites that are not box-like. You know, bubbles. How are their collision detection mapped? Is it safe to say that the bounding box would be completely inside the bubble? |
|||
Sukasa Boomboom Error 349857348734534: The system experienced an error. Level: 57 Posts: 566/1981 EXP: 1446921 For next: 39007 Since: 02-06-05 From: *Shrug* Since last post: 6 days Last activity: 1 day |
| ||
They still have the box-shaped collision perimeter, just their ASM deals with it instead. |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Super Mario World hacking - Collision Detection | | | |