Today I want to explain how the orientation of markers work.
The markers on the sprites define where the slots of the object are. With orientation.x and orientation.y the orientation of the object in that slot can be defined. This comes handy when a slot will be occupied by an entity which should face the right direction.
My research found, that the orientation can be set with the values -1, 0 and 1 in both orientation.x and orientation.y.
Basically there are 4 possible orientations: facing north, south, west and east, but there are 9 (3×3) possible combinations of orientation.x and orientation.y with values -1, 0 and 1. My question was how those properties have to be used to get the right result. So I tried each combination and the results are shown in the image below. As the image shows, the orientation.y property is dominant and changing orientation.x when orientation.y is not 0 doesn’t have any effect. Also, as orientation.x 0 and orientation.y 0 force the entity to face south, orientation.y 1 is not necessary. With that in mind we get 4 usable combinations (bordered red) to get the four directions an entity can face.
The original spritebank file uses floating point numbers between 0 and 1 to define the orientation. It’s not clear why there are floats for the orientation. But most markers just face south. Floating point numbers are not necessary to define the direction. Also only four of nine combinations are actually needed to get entities properly aligned.
I want to thank Mr. Peter Green and his family for participating in this experiment.