YesNoOk
avatar

Coordinate Space Notes (Read 2500 times)

Started by JustNoPoint, October 27, 2015, 03:20:30 pm
Share this topic:
Coordinate Space Notes
#1  October 27, 2015, 03:20:30 pm
  • ******
    • www.justnopoint.com/
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

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

The coordinate space for a character is specified in the character def file by the localcoord parameter of the [Info] group.

Motifs

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. The height parameter of localcoord is not used.

Stages

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. The height parameter of localcoord is not used.