Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Pixelbox

Create 2D games in JavaScript, made easier · By Cedric Stoquer

How exactly can I specify an image as a new tilesheet?

A topic by kuccello created May 04, 2021 Views: 228 Replies: 2
Viewing posts 1 to 3
(1 edit)

I looked through the docs and the boards looking for an answer to this but did not turn up anything (at least anything obvious to me).

What is the method I should use to specify a png as a tilesheet so that it shows up in the editor? I added an image to the assets directory (a png that is a tileset) and it appears in the editor under assets, also when I hover over the image is shows me the contents. What I would like to know is how can I make the ttilesheet window box load that tile sheet image? Do I need to name it tilesheet? (if so is there any support for switching between them without renaming?)

Lastly, related - I was looking at the assets/maps.json in VS Code and see a property for each map definition called "sheet" and all of them are empty strings. I tried specifying the "assets/Tilemappaddedv2.png" hoping that would do the trick but it didn't do anything. 

Any help here would be amazing (loving the whole system btw!)

(+1)

To use an image as a tilesheet, simply drag the image from the assets panel, onto the tilesheet panel. The map will now use this image as tilesheet. Note that a tilesheet needs to be arranged in a 16 by 16 grid of tile. Looking at your screencap, you will need to edit the image to remove the gaps between tiles, and rearrange the tiles in a 16 by 16 grid. Also, if the tile size is not 8 by 8 pixel, you can change that in the project settings.