Skip to content

Sprites and Sprite Atlas Files

Scott Zimmerman edited this page Dec 12, 2025 · 4 revisions

You may notice that many of the game images use sprite sheets with an accompanying (.atlas) file. The atlas is a text document that specifies where the sprites can be found on the atlas. For the sake of not using copyrighted assets, we can look at the current "editorIcons4x.png" and "editorIcons4x.atlas" files.

The editor icons used to look like this (note it has been cropped to better fit the window):

image

But I have remade them to look a bit nicer and even added a few new icons for some new game objects that I created. Since the original creator upscaled them, may as well take advantage of that extra pixel density.

image

Opening up the atlas file gives us this:

1
4
editor 2d mode:176,0,16,16,0,0
editor bed:87,2,8,11,0,0
editor color shift:144,0,16,16,0,0
editor compass sound:16,16,16,16,0,0
editor dialog box:112,2,9,11,0,0
editor door:32,16,16,16,0,0
editor dungeon:128,0,16,16,0,0
editor dungeon blacker:192,0,16,16,0,0
editor egg teleport:32,0,16,16,0,0
editor enemy trigger:160,0,16,16,0,0
editor floor:16,0,16,16,0,0
editor grave trigger:160,16,16,16,0,0
editor hit trigger:208,0,16,16,0,0
editor intro:104,3,7,9,0,0
editor item disabler:96,0,16,16,0,0
editor jump:48,0,16,16,0,0
editor key condition setter:144,16,16,16,0,0
editor key setter:128,16,16,16,0,0
editor kill trigger:160,16,16,16,0,0
editor ladder:80,16,16,16,0,0
editor ladder top:96,16,16,16,0,0
editor light:112,16,16,16,0,0
editor music:0,16,16,16,0,0
editor object hider:208,16,16,16,0,0
editor object respawner:224,0,16,16,0,0
editor object spawner:64,0,16,16,0,0
editor overworld:0,0,16,16,0,0
editor position dialog:64,0,16,16,0,0
editor room darkener:176,16,16,16,0,0
editor script on touch:80,0,16,16,0,0
editor shadow disabler:112,0,16,16,0,0
editor shadow setter:80,5,7,7,0,0
editor shore sound:16,16,16,16,0,0
editor slow:64,16,16,16,0,0
editor teleporter:32,0,16,16,0,0
editor upper level:192,16,16,16,0,0
editor water:48,16,16,16,0,0
  • The very first number at the top of the list is irrelevant. It refers to the "version" which is not currently used.
  • The second number on the list is extremely important. This is the "scale" of the PNG in relation to the dimensions.
  • Everything after that, is the list of sprites and where they can be found on the sprite sheet.
  • Think of the six number as "pairs", meaning 3 pairs of 2 numbers for a total of 6 values.

Now let's break down an entry: editor 2d mode:176,0,16,16,0,0

editor 2d mode: This is the name of the sprite. 176,0: This is the first numerical pair, and is the X and Y values of top left corner of the entry. 16,16: The second numerical pair is the size of the image. In this case, 16x16 pixels from the top left corner. 0,0: This the "origin" position, and determines the sprite's placement on the editor sprite selection window when holding control.

So now that everything has been explained, there is another reason I chose the editor icon sheet. And that is because I do believe it is the only sprite sheet that uses a scale other than 1. The offsets of all icons need to be multiplied by the scale to get the "real" values.

That means that this example: editor 2d mode:176,0,16,16,0,0

Really means this: editor 2d mode:704,0,64,64,0,0

And that's all there really is to it when it comes to sprite sheets and sprite atlas files.

πŸ“š Documentation Index

🏠 Home

βš™οΈ Engine Reference

πŸ›οΈ File & Data Reference

🎧 Audio Reference

πŸ’Ύ Modification

Clone this wiki locally