M.U.G.E.N Documentation:Coordinate Space Notes
Coordinate Space Notes[edit]
M.U.G.E.N, (c) Elecbyte 1999-2009
Documentation for version 1.0 (2009)
Updated 18 September 2009
Overview[edit]
M.U.G.E.N 1.0 supports the loading of assets made for different coordinate spaces. Characters, motifs and stages made for different coordinate spaces are processed at runtime to interact in a single common coordinate space. This common coordinate space is referred to as the "game coordinate space". The conversion from one coordinate space to another is known as "translation".
In M.U.G.E.N, the game coordinate space is specified in mugen.cfg by the GameWidth and GameHeight parameters of the [Config] group.
The translation scaling factor of vectors between coordinate spaces is the ratio of the target coordinate space's width and the source coordinate space's width. For example, a character made for a 320x240 coordinate space will be scaled by a factor of 4 to operate in a 1280x720 coordinate space.
Terminology[edit]
- Game coordinate space
- The common coordinate space in which interactions are calculated in. Coordinate and vectors of characters, motifs and stages are converted to game coordinate space for interactions.
- Translation
- The conversion from one coordinate space to another.
- Aspect ratio
- The ratio of the width and height of a coordinate space. Also known simply as "aspect".
- Game aspect
- The aspect ratio of the game coordinate space.
Characters[edit]
The coordinate space for a character is specified in the character def file by the localcoord parameter of the [Info] group. This is not recommended by the community because the Y parameter is completely ignored; the exact same scaling that is applied to the X parameter is also applied to the Y parameter.
Motifs[edit]
The coordinate space for motifs is specified in the system.def file by the localcoord parameter of the [Info] group. A limitation of motifs in 1.0 is that they are unable to adapt to game aspect ratios different from that of the motif.
Stages[edit]
The coordinate space for stages is specified in the system.def file by the localcoord parameter of the [StageInfo] group. Stages contain additional parameters to control cropping if the game aspect is shorter than the stage's coordinate space aspect, and to control overdraw if the game aspect is taller than the stage's aspect.