Well, in this topic, I will explain it the best I can:
w is used to define the width of a frame in a single image file. Example:
Code: Select all
"w": 32 // Image will be 32 px wide
h is used to define the height of a frame in a single image file. Example:
Code: Select all
"h": 32 // Image will be 32 px high
x is used to define the coordinate of a frame in an image file, on the x (horizontal) axis.
Code: Select all
"x": 32 // Image will be shifted 32 px to the right
y is used to define the coordinate of a frame in an image file, on the y (vertical) axis. This axis is mirrored.
Code: Select all
"y": 32 // Image will be shifted 32 px down
handle is commonly used before x or y, and its function is to align the frame that's displayed in the game (not the image file).
For example:
Code: Select all
"handle x": 8
For vehicles, you can use v2 to align the frame vertically. For example:
Code: Select all
"v2": [0, 1, 2, 3, 4, 5, 6, 7]
count is commonly used when there are several frames in an image file. Defining w is required for this to work. For example, to define 4 frames in an image file:
Code: Select all
"count": 4
copies is commonly used to copy the same file without repeating the same JSON object just to define the same frames. For example, copying the same frames for a one-way road:
Code: Select all
"copies": 3
Additional note: Math and cartesian geometry might be particularly useful while working with those attributes.