Bob-omb: Difference between revisions

192 bytes removed ,  12 November 2019
Cleaned up, spell/grammer checked, etc. last edit
(or just say "wen bomby touch a wall, dey r 2x faster!")
Tags: Mobile edit Mobile web edit
(Cleaned up, spell/grammer checked, etc. last edit)
Line 22: Line 22:
'''Bob-ombs'''<!--or '''Bombombs'''--> are enemies in SM64. When they see Mario, their fuse lights and they start chasing him. After their fuse ends, they explode, creating an explosion object.
'''Bob-ombs'''<!--or '''Bombombs'''--> are enemies in SM64. When they see Mario, their fuse lights and they start chasing him. After their fuse ends, they explode, creating an explosion object.


bobomb walk into a wall make it a fast boi:
Tyler, in discord: "@Kaztalek and others who were thinking there were a couple speed vectors being added were basically spot on. When testing for wall collisions on Bob-ombs, the game first adds the speed to the current position and uses that point in the collision calculations. The algorithm pushes the bob-omb outward from the wall if a collision occurs, so if it's already against the wall it effectively adds the component of the bobomb's speed that's tangent to the wall. Regardless of whether a collision occurs or not, the Bob-omb's position is incremented by its speed at a later point as well. Finally, since the point used for the collision calculation is only written to the Bob-omb's position if a collision occurs, the double speed increment doesn't happen in the open field."
Basically, Bob-ombs always check for wall collision before moving. If they do collide with a wall hitbox, then the Bob-omb's position is incremented and pushed away by the wall.
This is before the Bob-omb's actual movement step occurs, so then it moves a 2nd time before the frame ends. Thus, when Bob-ombs touch a wall, their speed is effectively doubled.


==Bloated Bob-omb==
==Bloated Bob-omb==
Line 42: Line 36:
===Uses===
===Uses===
This trick is used frequently in the [[A Button Challenge]], but also generally for clipping through walls, such as in [https://www.youtube.com/watch?v=28PT7HZWaHI the Chain Chomp's Gate clip.]
This trick is used frequently in the [[A Button Challenge]], but also generally for clipping through walls, such as in [https://www.youtube.com/watch?v=28PT7HZWaHI the Chain Chomp's Gate clip.]
==Interaction with walls==
The game first adds the speed to the current position and uses that point in the collision calculations. The algorithm will push the bob-omb outward from the wall if a collision occurs, so if it's already against the wall it effectively adds the component of the bob-omb's speed that's tangent to the wall. Regardless of whether a collision occurs or not, the Bob-omb's position is incremented by its speed at a later point as well. Finally, since the point used for the collision calculation is only written to the Bob-omb's position if a collision occurs, the double speed increment doesn't happen in the open field. This occurs before the Bob-omb's actual movement step, so then it moves a 2nd time before the frame ends. Thus, when Bob-ombs touch a wall, their speed is effectively doubled.
Basically, Bob-ombs always check for wall collision before moving. If they do collide with a wall hitbox, then the Bob-omb's position is incremented and pushed away by the wall.


[[Category:Enemies]]
[[Category:Enemies]]


{{Glitches}}
{{Glitches}}
44

edits