ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Game compass: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Nighthawk200 (talk | contribs)
m Categorising.
m Replacing Template:TTL with Template:F.
 
Line 4: Line 4:
==Simple System==
==Simple System==
In the simple system, 8 facings of animation are used for the 8 facings of the compass, with 0/first signifying North, and North being at the top edge of the screen.<br>
In the simple system, 8 facings of animation are used for the 8 facings of the compass, with 0/first signifying North, and North being at the top edge of the screen.<br>
This system is used for {{TTL|Anim}} on [[WeaponType]]s, as well as for animations used for fire [[ParticleSystems]]. (Although fire systems only use 4 facings and re-use them on the opposite direction.)
This system is used for {{f|Anim|link}} on [[WeaponType]]s, as well as for animations used for fire [[ParticleSystems]]. (Although fire systems only use 4 facings and re-use them on the opposite direction.)


:''The author has the feeling that infantries have a counter-clockwise ordering; someone please check this and update this section.
:''The author has the feeling that infantries have a counter-clockwise ordering; someone please check this and update this section.
Line 11: Line 11:


==Fine-Grained System==
==Fine-Grained System==
This system is used on flags such as {{TTL|PoseDir}}, where the possible values range from 0-255, giving more control over where a unit should face. Internally, judging from one of the comments, this seems to be converted to a so-called "FacingType". 0 is North, North being the top right-hand corner of the screen. The resulting compass looks like this:
This system is used on flags such as {{f|PoseDir|link}}, where the possible values range from 0-255, giving more control over where a unit should face. Internally, judging from one of the comments, this seems to be converted to a so-called "FacingType". 0 is North, North being the top right-hand corner of the screen. The resulting compass looks like this:
<div style="border: 1px solid #CCCCCC; height: 415px; width: 415px;">[[Image:Yr compass.png]]</div>
<div style="border: 1px solid #CCCCCC; height: 415px; width: 415px;">[[Image:Yr compass.png]]</div>
Please note that, while {{tt|PoseDir}} is used when an aircraft is created, once it departed, returned, and connects to the landing pad, it will align with the building's facing, i.e. North.<br>
Please note that, while {{tt|PoseDir}} is used when an aircraft is created, once it departed, returned, and connects to the landing pad, it will align with the building's facing, i.e. North.<br>

Latest revision as of 08:01, 27 November 2009

Yuri's Revenge and other games based on the TS engine have at least two distinct systems of direction: A simple, and a fine-grained system. The simple system(s) are used for SHPs, due to their practically limited facing, while the finer-grained system is used for voxel-based units.


Simple System

In the simple system, 8 facings of animation are used for the 8 facings of the compass, with 0/first signifying North, and North being at the top edge of the screen.
This system is used for Anim on WeaponTypes, as well as for animations used for fire ParticleSystems. (Although fire systems only use 4 facings and re-use them on the opposite direction.)

The author has the feeling that infantries have a counter-clockwise ordering; someone please check this and update this section.
Someone also double-check if anims go clockwise or counter-clockwise.


Fine-Grained System

This system is used on flags such as PoseDir, where the possible values range from 0-255, giving more control over where a unit should face. Internally, judging from one of the comments, this seems to be converted to a so-called "FacingType". 0 is North, North being the top right-hand corner of the screen. The resulting compass looks like this:

Please note that, while PoseDir is used when an aircraft is created, once it departed, returned, and connects to the landing pad, it will align with the building's facing, i.e. North.
Also note how the (original) usage instructions of 1=NE, 2=E on PoseDir are wrong.


Indicators for Top-Right being North

Despite contradicting compassing on SHPs, from the comments inside Rules(md).ini is is quite evident that top right is indeed North, not just for voxel purposes, but in general.

Several comments list 0 as North

WindDirection=1         ; Direction of wind (gets converted to a FacingType, so 0 is north
                        ; and increasing numbers rotate clockwise)
;GEF PoseDir, despite the comments, is actually ranged from 0 to 255. I fixed DeployDir, and it actually works as described.
PoseDir=2               ; aircraft landing facing (0=N, 1=NE, 2=E, etc)
DeployDir=2                             ; Units that SimpleDeploy (Siege Chopper) will face this direction before doing so (0=N, 1=NE, 2=E, etc)

Aircraft's facing

insert screenshot of Harriers on pad here

Aircraft built with PoseDir=0 point to the top-right corner of the screen. (Comments for PoseDir clearly identify 0 as North.)

CAPARK04 faces top-right and is commented...

;Park Bench North facing
[CAPARK04]

NumberImpassableRows

With Refineries and Repair Depots, it is evident that the count of impassable starts from the top left; NumberImpassableRows is commented:

NumberImpassableRows=3 ; This is the fix to the Repair depots are flat and RadioContact/Enter means I can drive on you assumption.  It counts from game west

If we know NumberImpassableRows counts from top left, and top left is designated as West, top right must be North.

See also