How can I assemble a tileset?

I have not gotten one (a tileset) yet, but I am thinking of getting one to make a smaller game to improve my programming. I am postponing the larger one. I usually see a multitude of separated images, so would I just assemble it manually, put the data in a module, and call on it whenever it is needed?

Typically you use a tool like ‘Texuture Packer’ to make tile sheets *.  

*** Update: **You said tilesets, but that is a collection of discrete images and I think you meant tilesheet.

You don’t usually hand assemble them as that is inefficient, error prone, and a true waste of time.

An alternative may be Shoebox, but I can’t say much about it other than I still think this will be a lot for work compared to the AWESOME that is ‘Texuture Packer

I know… it’s not free, but remember.  Making games is not a free effort as much as folks would like it to be.  Between hardware and software it is reasonable to expect an investment of 1000’s of dollars and more.

One final note.  I don’t think it is necessary to mess with tilesheets in the early stages of any game.  It will just make development more challenging and slower.

I don’t usually collect images into sheets unless:

  1. I hit a performance snag that would warrant the significant effort involved in using them compared to discrete images.

  2. I’m making sprites which use sheets to animate.

Thanks for the info, as for the payment, I have already purchased 1 year worth of use for Texture Packer. But, could you please enlighten me on the whole subject of tile sheet, tile set, someone had said tile map, etc?

The graphics I have found are relatively cheap, yet still of pristine quality. And I believe, they come in the format of a “tileset?”.

Yes, there are definitely Tilesets. 

I don’t have a lot of time so I can’t really help you here, but I’ll try to get you started in your search for knowledge:

First, while it is unfortunate, it is a fact of life in game development that people (myself included) will incorrectly use one term to describe a concept when there is a better or more appropriate term.

Second, there are a number of terms you should search out and read about to get started:

  • tile
  • tile set or tileset
  • tilesheet tilesheet
  • atlas
  • tile map or tilemap
  • sprite
  • sprite sheet or spritesheet

You will find there is a lot of overlap in these terms and their definitions.

Third, the way I keep it straight is as follows

  1. Tiles are (to me) discrete images or images embedded with many other images in a single file.

  2. Tile sets are collections of discrete image files, usually related in theme and often purchased together.  

  3. The single file (from #1 above) can be referred to as a sheet, a tilesheet, a spritesheet, or perhaps an atlas (although) I don’t really use that term.

  4.  The implication of sheet or tilesheet is the images will be used to make non-animated objects. 

  5. The implication of spritesheet is that the images will be use to make animated objects.

  6. There are two basic ways to lay out images in a ‘sheet’:

   A. Uniformly in a grid.  

   B. Tightly such that the rectangular bounding box of each image in the sheet overlap NO OTHER images in the sheet.

(There is much more to it than this, but these are the basic layouts)

  1. Grid layouts are typically used for making non-animated objects because it makes locating the image in the sheet easy.

https://docs.coronalabs.com/api/library/display/newImageRect.html#image-sheet

  1. Tight layouts are typically used for animated objects and come with a script (Lua in our case) that does the job of indexing the images and giving their start position in the sheet, size, and other relevant details.

https://docs.coronalabs.com/api/library/display/newSprite.html

  1. 7 and 8 are not rules.  You can achieve animated and non-animated object creation with either basic style of sheet.

PS: Here is the link: http://www.gameart2d.com/tileset.html

What do you think about Tiled? 

http://www.mapeditor.org/

Tileset are used to theme games, normally on change of level.

If you purchase a tileset look for ones which have data definitions (like what Texture Packer would generate) to save a lot of time.

Now if the tileset is just rows and columns then you can load as an image sheet and index by ordinal.

Great thread, I’m going to pile on…

To me tiles are a physical world thing that you generally come in squares and you glue them to your floor or wall and they are generally in a grid. Using that metaphor in the game world, a tile would be a single image. A collection of them is a tile set. When they are glued together into a single file, it becomes a tile sheet.

Lets backup and do a little history with this. You generally want to build a map. Think about a top-down game like Zelda:

3ds-zelda-link-1024x614.jpg

where your game world is massive and you’re only seeing a small part of it at a time. Even today, to build this map out of a single image would blow past the texture size limits on mobile devices and back in the day, it was even worse. The fix for this was to create small “tiles” that represents different areas like a block of grass, paved roads, etc. and then use a map editor to drag each small image onto the big map to design the level.

From here, your engine can only show the tiles that are on screen, they stay small like 32x32 or 64x64 so you’re not hitting texture size limits and it keeps memory usage lower.

To build this you need a map editor that works with tiles, ergo Tiled from http://www.mapeditor.org/.  With this tool you can load in tilesets (generally works best with square tiles) and you can drag and drop the individual tiles on the map until you get  your level design done.

Tiles are not just for overhead maps, they can also be used to construct platform games like Super Mario Bros. These are the graphics you are looking at. It’s the same principle. You drag your ground, ramps, platforms and such to create the game level. Then in a different layer you can place objects like coins, monsters, doors, and your character.  

Tiled will then let you output the map, with the images into something you can drop into your Corona folder. However, Corona can’t read those tile map files directly. Instead you need to find a library that will do it for you. The community has taken care of you with this respect.

Search for Million Tile Engine (MTE) – don’t know if it’s still being developed or not, but it was pretty solid. Then there is Dusk Engine, which may be based on MTE and I don’t now if it’s still in development or not but a lot of people swear by it.

Where I would recommend you start is to look at the Sticker Knight template 

https://docs.coronalabs.com/guide/programming/index.html#sticker-knight-platformer

This is a modern sample app that you can use to start building a platformer on. @ponywolf has included his own Tiled map reader in it and getting the map on the screen is literally one line. 

Each engine probably expects layers to be named in particular ways, so there will be some learning to get it all working.

Rob

I’m pretty new too and have been playing with Sticker Knight for the last couple of days. It’s the single greatest Corona tutorial + cheatsheet I’ve found.

Here’s how to use Tiled:

https://www.youtube.com/watch?v=LPKrDwosYHM&t=421s (check the subsequent parts as well)

And you might need to check the importer (Tiled -> Corona) documentation:

https://github.com/ponywolf/ponytiled

PS: There are tons of free tilesets on opengameart.org that you can import into Tiled for practicing and prototyping.

Typically you use a tool like ‘Texuture Packer’ to make tile sheets *.  

*** Update: **You said tilesets, but that is a collection of discrete images and I think you meant tilesheet.

You don’t usually hand assemble them as that is inefficient, error prone, and a true waste of time.

An alternative may be Shoebox, but I can’t say much about it other than I still think this will be a lot for work compared to the AWESOME that is ‘Texuture Packer

I know… it’s not free, but remember.  Making games is not a free effort as much as folks would like it to be.  Between hardware and software it is reasonable to expect an investment of 1000’s of dollars and more.

One final note.  I don’t think it is necessary to mess with tilesheets in the early stages of any game.  It will just make development more challenging and slower.

I don’t usually collect images into sheets unless:

  1. I hit a performance snag that would warrant the significant effort involved in using them compared to discrete images.

  2. I’m making sprites which use sheets to animate.

Thanks for the info, as for the payment, I have already purchased 1 year worth of use for Texture Packer. But, could you please enlighten me on the whole subject of tile sheet, tile set, someone had said tile map, etc?

The graphics I have found are relatively cheap, yet still of pristine quality. And I believe, they come in the format of a “tileset?”.

Yes, there are definitely Tilesets. 

I don’t have a lot of time so I can’t really help you here, but I’ll try to get you started in your search for knowledge:

First, while it is unfortunate, it is a fact of life in game development that people (myself included) will incorrectly use one term to describe a concept when there is a better or more appropriate term.

Second, there are a number of terms you should search out and read about to get started:

  • tile
  • tile set or tileset
  • tilesheet tilesheet
  • atlas
  • tile map or tilemap
  • sprite
  • sprite sheet or spritesheet

You will find there is a lot of overlap in these terms and their definitions.

Third, the way I keep it straight is as follows

  1. Tiles are (to me) discrete images or images embedded with many other images in a single file.

  2. Tile sets are collections of discrete image files, usually related in theme and often purchased together.  

  3. The single file (from #1 above) can be referred to as a sheet, a tilesheet, a spritesheet, or perhaps an atlas (although) I don’t really use that term.

  4.  The implication of sheet or tilesheet is the images will be used to make non-animated objects. 

  5. The implication of spritesheet is that the images will be use to make animated objects.

  6. There are two basic ways to lay out images in a ‘sheet’:

   A. Uniformly in a grid.  

   B. Tightly such that the rectangular bounding box of each image in the sheet overlap NO OTHER images in the sheet.

(There is much more to it than this, but these are the basic layouts)

  1. Grid layouts are typically used for making non-animated objects because it makes locating the image in the sheet easy.

https://docs.coronalabs.com/api/library/display/newImageRect.html#image-sheet

  1. Tight layouts are typically used for animated objects and come with a script (Lua in our case) that does the job of indexing the images and giving their start position in the sheet, size, and other relevant details.

https://docs.coronalabs.com/api/library/display/newSprite.html

  1. 7 and 8 are not rules.  You can achieve animated and non-animated object creation with either basic style of sheet.

PS: Here is the link: http://www.gameart2d.com/tileset.html

What do you think about Tiled? 

http://www.mapeditor.org/