Working with tiles - standard Tile size?

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

Post Reply
mattheweston
Chaos Rift Junior
Chaos Rift Junior
Posts: 200
Joined: Mon Feb 22, 2010 12:32 am
Current Project: Breakout clone, Unnamed 2D RPG
Favorite Gaming Platforms: PC, XBOX360
Programming Language of Choice: C#
Location: San Antonio,Texas
Contact:

Working with tiles - standard Tile size?

Post by mattheweston »

I know that tiles are best if their height and width are powers of two, but is there a standard size that is commonly used? Also, I have noticed some sprite sheets have big buildings and objects that are beyond the size of a normal tile. What is a good way to handle these? I would assume that one would just break these objects into multiple tiles.
Image
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Working with tiles - standard Tile size?

Post by dandymcgee »

mattheweston wrote:I know that tiles are best if their height and width are powers of two, but is there a standard size that is commonly used? Also, I have noticed some sprite sheets have big buildings and objects that are beyond the size of a normal tile.
Power of two is still a good idea for any texture. 32x32 is common, 16x16 for more detailed things such as pickup-able items.
mattheweston wrote:What is a good way to handle these? I would assume that one would just break these objects into multiple tiles.
Exactly.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
Van-B
Chaos Rift Regular
Chaos Rift Regular
Posts: 125
Joined: Tue Aug 10, 2010 7:17 am
Current Project: iPhone puzzle game
Favorite Gaming Platforms: All - Except Amiga
Programming Language of Choice: DBPro, ObjC++
Location: Scotland

Re: Working with tiles - standard Tile size?

Post by Van-B »

It can be tricky to layout the tiles neatly without practice. I suggest looking some tutorials. Anyway, I usually have blocks of 3x3 tiles, with the middle tile being one texture, and the surrounding tiles being another - say water in the middle, with sand on the other tiles, but blending in, like a little pond. I suggest making some base tiles first, basic textures like path, grass, sand, water, and make them tileable - so you can cover an area with them. It can get really complicated, but with some foresight and planning you shouldn't have too much trouble. Try and leave some extra space, as you might well discover that you need more tiles, and it can be a pain to try and squeeze them in. Also, with textures like grass, make a few variations to help break up the repeating pattern - a little foliage here and there can make all the difference.
Health, ammo.... and bacon and eggs.
mattheweston
Chaos Rift Junior
Chaos Rift Junior
Posts: 200
Joined: Mon Feb 22, 2010 12:32 am
Current Project: Breakout clone, Unnamed 2D RPG
Favorite Gaming Platforms: PC, XBOX360
Programming Language of Choice: C#
Location: San Antonio,Texas
Contact:

Re: Working with tiles - standard Tile size?

Post by mattheweston »

I probably won't be making my own tiles with the exception of crappy programmer art tiles. =) I'm just trying to figure out how to take a tilesheet and determine how to break it up into tiles and load it into an engine.

Something like thishttp://www.pixeljoint.com/pixelart/18885.htm seems easy and straight forward, but what if the tiles aren't divided up like they are here?

I may also be getting sprite sheets and tile sheets confused.
Image
User avatar
k1net1k
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 563
Joined: Sun Nov 07, 2010 2:58 pm
Contact:

Re: Working with tiles - standard Tile size?

Post by k1net1k »

texturepacker.com i think it was. it puts all your art into a tilesheet and then gives you an xml config with the locations of each sprite. of course you need to manage things yourself eg Image1 isnt very useful, but CharLeftAnim1 is a bit easier to follow
mattheweston
Chaos Rift Junior
Chaos Rift Junior
Posts: 200
Joined: Mon Feb 22, 2010 12:32 am
Current Project: Breakout clone, Unnamed 2D RPG
Favorite Gaming Platforms: PC, XBOX360
Programming Language of Choice: C#
Location: San Antonio,Texas
Contact:

Re: Working with tiles - standard Tile size?

Post by mattheweston »

I'll check it out. Is there support for XNA or can I just take the file it generates and copy the data ?
Image
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Working with tiles - standard Tile size?

Post by dandymcgee »

mattheweston wrote:I'll check it out. Is there support for XNA or can I just take the file it generates and copy the data ?
C# has libraries that can be used to parse XML into objects. It should be fairly easy to use output of texturepacker.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
Post Reply