View Single Post
  #15  
Old 04-20-2009, 06:52 PM
DarkIceX DarkIceX is offline
(Developer)
Join Date: May 2002
Location: Canada
Posts: 125
DarkIceX is on a distinguished road
Quote:
Originally Posted by Inverness View Post
I've been wanting more customizable tile layers for forever and a more flexible layer system.

And I suppose a server option would be needed so nothing is broken.

Basically make it so layer 200+ is the GUI and everything below it can be in the level. Of course nobody will ever need that many but that just makes it similar to image indexes. With that you could put tiles on any layer from 0 to 199 and they would draw above or below the player depending on what layer the player is on.

Example: A Bridge
Layer 0: the whole of the level, including what is under the bridge. Players are here.
Layer 1: This overlayes the bridge over players. Players walk under this if on layer 0.
Layer 50: Shadows Morning
Layer 51: Shadows Noon
Layer 52: Shadows Afternoon

When a player is going to walk onto a bridge, a script switches his layer to 1. This makes the player draw on the bridge and above any players walking below it. Changing to layer 1 means the player is using that layer's tiletypes so even if there is water below the bridge it doesn't matter. A system script hides and shows the shadow layers depending on time of day.

I suppose a way to make it compatible with things as they are now would be to have a tilelayer variable. Tiles would be on layer -1. Putting anything else like the player on layer -1 makes it subject to the tilelayer variable, which controls the tile layer you walk on and such.
Pleasepleasepleaseplease Stefan!
__________________

Bloodvayne
Reply With Quote