Unit: Difference between revisions
add point of reference for size of units |
mention speed units |
||
Line 1: | Line 1: | ||
All [[wikipedia:Floating-point_arithmetic|floating-point numbers]] in the game's code that represent sizes or distances represent them using the same scale, and the distance represented by a value of 1 on this scale is known as a '''unit'''. A unit is equal to roughly 0.7% of Mario's height (conversely, Mario is about 142 units tall), but despite being extremely small, units are not the smallest meaningful distance in the game's engine since distances in units are represented using floating-point numbers rather than [[wikipedia:Integer_(computer_science)|integers]]. | All [[wikipedia:Floating-point_arithmetic|floating-point numbers]] in the game's code that represent sizes or distances represent them using the same scale, and the distance represented by a value of 1 on this scale is known as a '''unit'''. A unit is equal to roughly 0.7% of Mario's height (conversely, Mario is about 142 units tall), but despite being extremely small, units are not the smallest meaningful distance in the game's engine since distances in units are represented using floating-point numbers rather than [[wikipedia:Integer_(computer_science)|integers]]. | ||
Other units of measurement are derived from these base distance units. For example, one '''speed unit''' is equivalent to moving a distance of 1 unit in 1 [[wikipedia:Frame_rate|frame]]. | |||
Although it is impossible to see any unit-based values in an unmodified version of the game, various mods created for the purposes of glitch hunting allow viewing variables such as Mario's coordinates, which are by definition represented in units. | Although it is impossible to see any unit-based values in an unmodified version of the game, various mods created for the purposes of glitch hunting allow viewing variables such as Mario's coordinates, which are by definition represented in units. | ||
[[Category:Technical]] | [[Category:Technical]] |
Revision as of 23:30, 22 February 2024
All floating-point numbers in the game's code that represent sizes or distances represent them using the same scale, and the distance represented by a value of 1 on this scale is known as a unit. A unit is equal to roughly 0.7% of Mario's height (conversely, Mario is about 142 units tall), but despite being extremely small, units are not the smallest meaningful distance in the game's engine since distances in units are represented using floating-point numbers rather than integers.
Other units of measurement are derived from these base distance units. For example, one speed unit is equivalent to moving a distance of 1 unit in 1 frame.
Although it is impossible to see any unit-based values in an unmodified version of the game, various mods created for the purposes of glitch hunting allow viewing variables such as Mario's coordinates, which are by definition represented in units.