Hello Guest

Author Topic: Purpose of Tile Maps  (Read 6880 times)

mike2d

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 63
    • View Profile
Purpose of Tile Maps
« on: June 28, 2012, 08:41:12 am »
hi,

yeah, well, everything's in the title i guess :)

Tile Maps is in beta but i'm not sure of its purpose. I'm using it as a way of drawing sprites which take part of the set (background, platforms etc...), well everything that repeats actually.

am i right ?
« Last Edit: June 28, 2012, 08:43:08 am by mike2d »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Purpose of Tile Maps
« Reply #1 on: June 28, 2012, 11:39:45 am »
Yup thats more or less what tilemaps are used for.

mike2d

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 63
    • View Profile
Re: Purpose of Tile Maps
« Reply #2 on: June 29, 2012, 09:45:19 am »
interesting, could you be more precise ?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Purpose of Tile Maps
« Reply #3 on: July 01, 2012, 02:19:45 pm »
Hi mike,

I must've missed your post here.

A tilemap is at its core a method of data compression - building larger world out of smaller tiles, instead of painting in unique image. You can use it in any situation where you need to position sprites at regularly spaced intervals. In 2D Toolkit, each tile is a sprite, and you can use all the features supported by sprites in there, for example custom polygon colliders, custom sprite shapes, to get a very optimal final mesh from the tilemap.

Platform games (2D Mario, etc) are often built using tilemaps, as are old RPGs (Final Fantasy, etc). With the limited memory available on those platforms there wasn't really any other choice apart from building the world out of tiles.

mike2d

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 63
    • View Profile
Re: Purpose of Tile Maps
« Reply #4 on: July 03, 2012, 05:09:37 pm »
hi,

no pb :)

is the quality of tiles less than normal sprites or original image file ?

if i get you, the purpose is to spare memory AND paint instances of sprite on the same map thus reducing draw calls ?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Purpose of Tile Maps
« Reply #5 on: July 03, 2012, 05:25:19 pm »
Hi,

The quality depends on how good the art is :) There are amazing looking games using both types of tech.

Its mainly to spare memory as the data can be generated on the fly as necessary. This isn't necessarily true in modern games - in 2D Toolkit the meshes are pre-generated right now, so you don't get any memory saving there. Its more of a means to get that tile mapped look than any particular optimization here.