forums

TNT Basic Forums > Programming Q&A
map layers?
< Last Thread     Next Thread >
Author
Thread        Post A Reply

01-27-2007 18:55

Posted by:
mikake

Location:
Maubeuge,France

Click Here to Email mikake   Find more posts by mikake

hi,
I saw this menu in the map editor of hieroglyph , "show layers window" ... I was happy , and first thought it allowed me to put some tiles over a sprite (such an house,you can't see the character when he goes behind it) but... nothing appears when I'm running my game!
I tried to add a tile,and to put it into a second layer I created, but I just don't see it..
so did I forget something?

and what's the use of these layers?

thanks!

mikael.

01-27-2007 20:39

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Good Question...

Layers in TNT maps are a bit of a grey area... TNT can only draw one layer at a time, which is why you can't see your other tiles. I imagine it was a feature Mark was planning to implement but never got round to (but if I'm wrong Mark, please feel free to correct me...).
The main use at the moment is for 'picking' the map, you can place hidden things like start locations, doors to different levels and other such things in a different layer, they are there but can't be seen. Another use of this is to draw elements such as buildings or trees for example (as you pointed out). You just 'pick' the map to see what needs to be drawn and then use a sprite to display it.

Well that's pretty much it. Layers can be useful, but not as useful as they could be...

Danny (nods)

01-28-2007 08:37

Posted by:
mikake

Location:
Maubeuge,France

Click Here to Email mikake   Find more posts by mikake

haemmm...sorry,but I didn't understand how to use layers...
what's the use of drawing some tiles in a layer,that can't be seen? and why especially things like start location or doors to different levels?
for the start location I'm using the object section of the map editor..and polygons!

and,for the second application,you mean to use "draw map section",and "copy image" to transform a part of a layer (yes,such a tree) into a sprite?....yeah,I thing it's the good way to do it..

01-28-2007 14:42

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

The short answer is that right now this feature is useless because incomplete. It does nothing you can't do in another way.

01-28-2007 21:25

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Yeah, they're pretty useless...

But they do have some (small) benefits. Have you ever tried to implement a 'hardness map'? This is a map of things that your character / sprite can or can't cross, it's a lot easier to put two types of sprite in an invisible layer (one that you can cross and one that you can't) rather than check each image against a range of values to see if it's passable or not.

I'm not defending maps here, I didn't write them so have no need to, but I'm suggesting uses for the limited functionality we have at the moment. They're not good, but not totally useless. If you think about it for a bit, they are actually more useful than objects on a map, you get a graphic representation of the 'object' (so you can tell what it is supposed to be!) and if you want to show the player all of the exits (for example) you just render the map using another layer...

Does anyone else have an opinion on the 'objects vs layers' issue? Which one do you use and why? They currently do pretty much the same thing so do we need both? If TNT rendered multiple layers at once, where would the sprites come if they laid 'in between' layers? All comments welcome...

Have your say here!

Danny (nods)

01-29-2007 00:07

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Well i think layers should be kept for what their name implies - having multiple visible layers of tiles, with different Z order. For better functionnality, objects should be improved.

Right now, i understand tiles in an invisible layer can be better than objects because you can set an actual picture and not just a color circle, and other similar use. But i still think we should favor improved objects over using map tiles for features they weren't meant to

01-29-2007 00:22

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

I agree

Maybe an additional parameter in the sprite call to indicate 'Z' depth? Or an addition where sprites added to a map viewport are depth sorted by their 'Y' value (sprites lower down the screen are rendered in front of sprites higher up?).
This is not as easy as it may at first sound though, as the height of sprites and tiles would come into play, and the collision area of higher level tiles (such as the leaves of trees, the player could walk 'under' them) would be a real pain... I can sort of see why Mark left these alone, it's a tricky subject!

Danny (nods)

01-29-2007 01:14

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

I don't see the problem really

As for the leaves of a tree - if you're doing a 2D mario-like platformer the tree will either be in front of you or behind you. If you're doing an isometric RPG, then it's oky the player appears under the leaves if he comes from behind - in this case collision needs to be done on the tile where the object is placed and not on the sprite itself

The thing is, it seems like you want to do trees with tiles. i would rather do it with objects - i would leave multiple tile levels for background stuff the player never has to play with, like parallax scrolling, etc.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.