Defold supports many kinds of visual components frequently used in 2D games. Use can use Defold to create static and animated sprites, UI components, particle effects, tile maps, bitmap fonts and Spine animations. Before you can create any of these visual components you need to import image files with the graphics that you wish to use. To import image files you simply drag the files from the file system on your computer and drop them in an appropriate place in the Defold editor Assets pane.
Defold supports images in the PNG and JPEG image formats. Other image formats need to be converted before they can be used.
Creating Defold assets
When the images are imported into Defold they can be used to create Defold specific assets:
Atlas
An atlas contains a list of separate images files, which are automatically combined into a larger texture image. Atlases can contain still images and Animation Groups, sets of images that together form a flipbook animation.
Learn more about the atlas resource in the Atlas manual.
Tile Source
A tile source references an image file that is already made out to consist of smaller sub-images ordered on a uniform grid. Another term commonly used for this type of compound image is sprite sheet. Tile sources can contain flipbook animations, defined by the first and last tile for the animation. It is also possible to use an image to automatically attach collision shapes to tiles.
A bitmap font has its glyphs in a PNG font sheet. These types of fonts provide no performance improvement from fonts generated from TrueType or OpenType font files, but can include arbitrary graphics, coloring and shadows right in the image.
Learn more about bitmap fonts in the Fonts manual.
Using Defold assets
When you have converted the images into Atlas and Tile Source files you can use these to create several different kinds of visual components:
A sprite is either a static image or flipbook animation that is displayed on screen.