Trampoline

From Ukikipedia
Revision as of 03:06, 27 May 2019 by Nim (talk | contribs)
Jump to navigation Jump to search
Trampoline
Trampoline.png
Hitbox Info
Hitbox

Collision involves triangles instead of a cylindrical hitbox

Tangibility radius 1000
Interaction type None
Surfaces 0x00 (default)


The Trampoline is an unfinished and unused object in Super Mario 64. Its model and collision are nearly fully finished, but its code was apparently abandoned early on.

The game contains infrastructure for the trampoline to affect Mario's jumps, and the trampoline has code for visually stretching and compressing. However, if you manage to load the trampoline into the game, it doesn't do anything other than act as a platform since there is no code to move it nor code to interface it with the existing trampoline infrastructure.

Below, you can see an example of the trampoline as it is in the game, with no modifications. It does nothing visible. It does not stretch or squish itself.

Code

The trampoline is made out of 3 objects: the top, the spring, and the base. The base is a static object with no associated code. The top spawns the spring and the base, and sets a variable to whether Mario's on the platform or not (though this variable goes unused).

The trampoline as it is in the game, inert
The trampoline spring when forced to stretch; it doesn't line up with the trampoline, instead going below and above it

The spring continuously updates to be 75 units under the top of the trampoline, and has the incomplete code to visually stretch/compress itself. The math is not complete; on the right, you can see the effects it has when it is forced to run. The errors are caused by the programmers putting 50 and 500 arbitrarily in place of 150 (the height of the trampoline), and not putting a simple line of code to correct the spring's apparent position. The lack of this code supports the hypothesis that the code was abandoned early on.

When the aforementioned spring code is repaired and the trampoline top is made to lower when Mario gets on it, the intended compression effect can be seen.