Our game assets are free because of donations from the community, consider one if you can!

Importing and using tilemaps

Guide January 6th, 2024 1 min read

Many Kenney game assets come with tilemaps, sheets of sprites that are all in an uniform size. You can often find a tilemap.txt file included with the download which contains information on the tilesheet.

    Tiled

    • Select: FileNewNew Tileset...
    • Select the tilemap image file
    • Find the tile width, height and spacing values in the included tilemap.txt file

    Construct

    • Right click › Insert New Object
    • Select the "Tilemap" component
    • Click the folder icon and select the tilemap image file, then close the dialog
    • Select the tilemap object
    • Copy the tile width, height and spacing values (X and Y are the same) in the included tilemap.txt file

    Unity

    • Add the tilemap image to your project
    • Select the image, and select "Sprite (2D and UI)" as texture type
    • Set sprite mode to "Multiple" and click the "Sprite Editor" button
    • On the top of the new dialog click "Slice" and select "Grid By Cell Size" as type
    • Copy the tile width, height and spacing values (X and Y are the same) in the included tilemap.txt file
    • Click "Slice" and close the dialog
    • Select: Window2DTile Palette
    • Click "Create New Palette", then "Create" and select a folder to save
    • Drag the tilemap sprite onto the palette and select a save folder
    • Select: GameObject2D ObjectTilemap
    • Set the grid size of the tilemap to the tile size divided by 100 (i.e. 16px = 0.16)

    Mastodon