Camera

From Final Fantasy Hacktics Wiki
Revision as of 01:40, 30 December 2013 by Xifanie (talk | contribs) (Created page with "= Camera = The camera can move around as you wish, as if it were a small copter. It's not as complicated as it seems. with some experience, you should be able to get exactly ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Camera

The camera can move around as you wish, as if it were a small copter.

It's not as complicated as it seems. with some experience, you should be able to get exactly what you want without testing in game.

All the camera values are absolute; not relative. It will only take into acound current values to determine the shortest way to reach destination.

Absolute: Based on point zero (0,0,0)

Relative: Based on last coordinates


All numbers are suggestions and by no means you must use only those. Anything can range from -32768 to 32767.


See Also: {1F}Focus {E5}WaitForInstruction


X axis : Half-Word (signed)

A tile is 28x28 The camera can move 4x more precisely than the tiles' dimension, so moving a tile away would require 28*4=112. If you simply add tiles, it will already be centered, 112 will have 1st tile centered. 168 whoever will be the border between 1st and 2nd tiles.

  • +00112 = 20 pixels = 1 tile (center)
  • +00392 = 98 pixels = 3,5 tiles (border 3-4)
  • +00896 = 224 pixels = 8 tiles (center)


Z axis : Half-Word (signed)

Similarly to the X & Y, 1h is 12 pixels high, or 48 units high when using the camera. Centering is the determined by given height +2h (48*2=96), which is technically not correct as most units are 3h high (48*3=144) so if you want "perfect" centering, you have to subtract 1/2h (40/2=24).

  • +00048 = 1h (centers 3h)
  • +00192 = 4h (centers 6h)
  • +00384 = 8h (centers 10h)


Y axis : Half-Word (signed)

See Move on X axis.


Angle : Half-Word (signed)

Note: the base of the map is 0º.

  • +00000 = +00,00º
  • +00302 = +26,54º (often used in regular game)
  • +00341 = +30,00º
  • +01024 = +90,00º (bird view)


Map Rotation : Half-Word (signed)

Positive result = Clockwise Rotation The camera will take the shortest way to the new coordinates based on the previous ones. You should always stay in a range on -180º to 180º to avoid unecessary rotations. I marked -135º, -45º, 0º, 45º and 135º with an asterix (*) to help.

  • -03584 = -315,00º [Map_1]
  • -02560 = -225,00º [Map_2]
  • -01536 = -135,00º [Map_3]*
  • -00512 = -045,00º [Map_4]*
  • +00000 = +000,00º [Map_0]* ((0,0) at bottom left corner)
  • +00512 = +045,00º [Map_1]*
  • +01536 = +135,00º [Map_2]*
  • +02560 = +225,00º [Map_3]
  • +03584 = +315,00º [Map_4]


Camera Rotation : Half-Word (signed)

Positive result = Clockwise Rotation And no, at 180º your characters won't fall from the map like ants. That's why it's the camera that is rotating, and not the map.

  • -02048 = -180,00º
  • -01024 = -090,00º
  • -00512 = -045,00º
  • +00000 = +000,00º
  • +00512 = +045,00º
  • +01024 = +090,00º
  • +02048 = +180,00º


Distance : Half-Word (signed)

Distance between the camera and target. For simplicity's sake we will convert it to a zoom value. This one is rarely ever used since resizing makes the maps, and mostly units, ugly.

  • +02048 = 050%
  • +04096 = 100%
  • +08192 = 200%


Time : Half-Word (signed)

Time required in frames to perform the whole instruction.

  • +00060 = 1,00 seconds
  • +00120 = 2,00 second
  • +00300 = 5,00 seconds