Tilesheets are a classic way of game development. Tilesheets are often used to create tile-layers that are auto-rendered with simple math calculations versus assigning an object to stationary object render locations. For example, in a game where the player runs over non-moving blocks, a game developer may choose to use tiles in place of game objects more suited for A.I. Tilesheets help save you processing time as the logic used to render them is much simpler than game objects.
As pictured above you can see the main engine-related properties of a tilesheet. Due to window-sizing a few properties are not visible here; but we will go over them below.
Let’s go over each input field to firmly fully understand how to work with tilesheets within the editor.
- Tilesheet image – The file location to the image of the tilesheet.
- Width – The width of each tile in the tilesheet.
- Height – The height of each tile in the tilesheet.
- X-Offset (Horizontal Pixel Offset ) – This number in pixels is the horizontal margin from (0,0) to the first frame of a tilesheet.
- Y-Offset (Vertical Pixel Offset ) – This number in pixels is the vertical margin from (0,0) to the first frame of a tilesheet.
- X-Padding (Horizontal Frame Padding )- This number in pixels is the horizontal padding between each tile.
- Y-Padding (Vertical Frame Padding )- This number in pixels is the vertical padding between each tile.
- Preloaded – If checked, this makes the tilesheet part of the game’s opening loading screen. If false, it is loaded when needed(although its properties is defaulted to its editor value on export for coding purposes).