Map Layers

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

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:

Map Layers

Post by mattheweston »

What would you guys suggest for layers for a map?

I'm thinking at least a Base Layer, Object Layer, and a transition layer, but what else am I not thinking of?
Image
User avatar
GroundUpEngine
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 835
Joined: Sun Nov 08, 2009 2:01 pm
Current Project: mixture
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: UK

Re: Map Layers

Post by GroundUpEngine »

Collision layer?
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: Map Layers

Post by mattheweston »

yeah I forgot to include that. Anything else?
Image
User avatar
MrDeathNote
ES Beta Backer
ES Beta Backer
Posts: 594
Joined: Sun Oct 11, 2009 9:57 am
Current Project: cocos2d-x project
Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
Programming Language of Choice: C/++
Location: Belfast, Ireland
Contact:

Re: Map Layers

Post by MrDeathNote »

mattheweston wrote:yeah I forgot to include that. Anything else?
You may want to have 2 object layers, it gives you more flexibility.
http://www.youtube.com/user/MrDeathNote1988

Image
Image

"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
User avatar
xiphirx
Chaos Rift Junior
Chaos Rift Junior
Posts: 324
Joined: Mon Mar 22, 2010 3:15 pm
Current Project: ******** (Unkown for the time being)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

Re: Map Layers

Post by xiphirx »

I believe that you would want 2 tile layers, for trees and other things that are above a characters head...
StarCraft II Zerg Strategy, open to all levels of players!

Looking for paid work :< Contact me if you are interested in creating a website, need a web design, or anything else you think I'm capable of :)
XianForce
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 767
Joined: Wed Oct 29, 2008 8:36 pm

Re: Map Layers

Post by XianForce »

Well how I usually do it is something along the lines of:

Tile layer
Object layer 1
Item layer

Object layer 2

Where the first three are rendered before other sprites are rendered, and the last one is rendered after everything else.
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: Map Layers

Post by avansc »

there a reason you have to have it be a set number of layers?
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
K-Bal
ES Beta Backer
ES Beta Backer
Posts: 701
Joined: Sun Mar 15, 2009 3:21 pm
Location: Germany, Aachen
Contact:

Re: Map Layers

Post by K-Bal »

You should make a decision based on what your game idea needs.
User avatar
MrDeathNote
ES Beta Backer
ES Beta Backer
Posts: 594
Joined: Sun Oct 11, 2009 9:57 am
Current Project: cocos2d-x project
Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
Programming Language of Choice: C/++
Location: Belfast, Ireland
Contact:

Re: Map Layers

Post by MrDeathNote »

avansc wrote:there a reason you have to have it be a set number of layers?
None at all, it's completely a design choice i just find that in a tile based game, theres very little point having more than 1 tile layer because they contain no transparency and an extra object layer gives you more flexibility. But your right its completely personal, dont add layers you wont use.
http://www.youtube.com/user/MrDeathNote1988

Image
Image

"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: Map Layers

Post by Falco Girgis »

K-Bal wrote:You should make a decision based on what your game idea needs.
YES.

People need to quit asking questions around here that are 100% subjective to a particular game/application.
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Map Layers

Post by eatcomics »

For my next project... It won't be 2D, but I"m going to have 3 layers at least. One for tiles, one for enemies, and one for items :D
Image
Post Reply