Trampoline: Difference between revisions

1,063 bytes added ,  25 May 2019
no edit summary
No edit summary
No edit summary
Line 11: Line 11:


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.
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.
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).
[[File:InertTrampoline.gif|320px|thumb|left|The trampoline as it is in the game, inert]]
[[File:TrampolineBrokenStretching.gif|320px|thumb|right|The trampoline spring when forced to stretch; it doesn't line up with the trampoline, instead going below and above it]]
The spring 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.