Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Feature request
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 03-05-2013, 06:31 AM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
Tile Layers - Commands & Functions

I know this doesn't get touched on as often as it should be, but it would be really nice to have a few more commands that can be used to manipulate tile layers.


Currently, the working commands I know of for gmaps are:

gmap.tilelayers[x].alpha = y;
gmap.tilelayers[x].red = y;
gmap.tilelayers[x].green = y;
gmap.tilelayers[x].blue = y;


And here are some other fun ones I would suggest that could be implemented later:

gmap.tilelayers[x].mode = y; (For additional color blending.)
gmap.tilelayers[x].zoom = y; (For the possibility of layer parallaxing in the future.)


But, we absolutely need the following:

gmap.tilelayers[x].dontblock();
gmap.tilelayers[x].drawoverplayer();
gmap.tilelayers[i].tiletype(tx,ty);



It would be nice to have these commands and others like them, because even though you can draw with multiple tile layers now, the tiles you lay down on the layer above will still block the player as if it were on the layer below.

The planks in these screenshots are on layer 1, while everything else is on layer 0. I made them kinda transparent so you can see the path below.

On the left is what we're currently stuck with, on the right is how it should work.



This is very impractical for those of us who want to make use of layers for masking things like paths or hidden rooms in maps, because any kind of blocking tile will mess things up. It has been a pain to deal with on literally every server since time immemorial, as things that are layered over players usually have to be made with half a dozen NPCs instead that serve no other purpose than to mask things on the tile layer below.

Improving tile layers could open a lot of new doors for developers, and I'm really surprised we don't have a way of doing this yet when we're so close to it working as it should.

If anyone else has suggestions for commands directly related to tilelayers, please feel free to suggest them.

Last edited by Draenin; 03-05-2013 at 04:09 PM..
Reply With Quote
  #2  
Old 03-05-2013, 12:16 PM
Gos_pira Gos_pira is offline
Registered Pirate Ghost
Gos_pira's Avatar
Join Date: Sep 2009
Location: Pirate Ghost Ship
Posts: 175
Gos_pira is a splendid one to beholdGos_pira is a splendid one to beholdGos_pira is a splendid one to beholdGos_pira is a splendid one to beholdGos_pira is a splendid one to behold
I approve of this.
Reply With Quote
  #3  
Old 03-05-2013, 02:19 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Gos_pira View Post
I approve of this.
Me too. Even the offline editor had support for layers. I don't remember if it was the Level Editor or Gonstruct that had the bug where you opened it and saved it and it removed the layers other then the default layer. so annoying.

Even with 1 layer the possibilities are endless to what people will be able to create.
Reply With Quote
  #4  
Old 03-05-2013, 02:25 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by scriptless View Post
Me too. Even the offline editor had support for layers. I don't remember if it was the Level Editor or Gonstruct that had the bug where you opened it and saved it and it removed the layers other then the default layer. so annoying.
That was the default level editor. I believe Gonstruct was mainly created to accommodate for this issue.
__________________
Reply With Quote
  #5  
Old 03-07-2013, 09:04 AM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
One thing in particular that's very nice about tilelayers already is that they are ostensibly the same as if you were using backpals, but you can manipulate them in so many more ways. The current commands allow you to control the color channels of a tileset via script, meaning you can make palette adjustments and possibly enrich the color quality of your environments without needing to actually modify your tilesets much.

Here, I've put all three channels in a timeout loop and set their values to random (0,1) along with changing the tileset's alpha to anything other than 1 to create the motion blur effect you see used on a lot more servers these days.

The result is pretty freakin' groovy.




As an added bonus, you can also set class objects to have the same RGB channel setup as the tilelayers, meaning that their palettes can change along with the palettes you designate on different gmaps.

So say that you have a tree as a class object, and you had it set to match the palette of the tileset that you've specified. When you drop the tree into a level, its color channels will be set to match the tileset's color channels, meaning that you could globally manipulate color channels for both objects and tilesets at the same time to ensure some consistency in color. This is a bit different from doing a seteffect, because it's not the same as simply colorizing the entire screen.

Last edited by Draenin; 03-07-2013 at 11:59 AM..
Reply With Quote
  #6  
Old 03-10-2013, 02:14 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Thought I might share this. It's just playing around with tile layers and what not. Nothing special really, but it's on-topic. It's a long video but it gets better near the end.
Reply With Quote
  #7  
Old 03-14-2013, 12:59 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Wait a second, I thought tile layers already had something similar to tiletype for layers? and there no point actually making layers above 1 blocking. u can use a blocking tile under it, and if you are using alpha on that layer you could just use 3 layers so u have a blocking, what ever u want to show it as, then the alpha layer.

Never was really a big deal to me, tho drawing over players is like the #1 most requested feature =/ and yet we still get ignored.
Reply With Quote
  #8  
Old 03-14-2013, 02:44 PM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
Quote:
Originally Posted by scriptless View Post
Wait a second, I thought tile layers already had something similar to tiletype for layers? and there no point actually making layers above 1 blocking. u can use a blocking tile under it, and if you are using alpha on that layer you could just use 3 layers so u have a blocking, what ever u want to show it as, then the alpha layer.
Actually, blocking could be useful on a 2nd layer if the first is being used as something like a parallax or scrolling background.

Unfortunately, we don't have support for those yet either, but I do think it is possible since objects on foreground layers already support parallax movement.
Reply With Quote
  #9  
Old 03-14-2013, 06:37 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Draenin View Post
Actually, blocking could be useful on a 2nd layer if the first is being used as something like a parallax or scrolling background.

Unfortunately, we don't have support for those yet either, but I do think it is possible since objects on foreground layers already support parallax movement.
I just realised, tile type would mean it could block. lol

But thats why I am saying, layer 1 = blocking information, layer 2 = the scrolling background.. it's esentially the same thing tho as what your saying except you would end up using less layers.
Reply With Quote
  #10  
Old 03-15-2013, 05:25 AM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
Quote:
Originally Posted by scriptless View Post
I just realised, tile type would mean it could block. lol

But thats why I am saying, layer 1 = blocking information, layer 2 = the scrolling background.. it's essentially the same thing tho as what your saying except you would end up using less layers.
For the purposes of parallaxing backgrounds, layer 1 would need to be the background layer, while layer 2 should ideally contain the tiletype information. As an example, if you wanted to make scrolling water or a world map that parallaxes beneath some floating islands, it would need to be on the layer underneath the one players normally walk on. There are lots of different things you could do with an extra layer underneath, as well as ones above the player as well.



I've actually been thinking a lot about layer structuring lately, and the best setup I can come up with so far is:

Layer 1: Background Layer (Parallaxing / Scrolling Optional)
Layer 2: Map Layer
Layer 3: Object Layer
Layer 4: Foreground Layer (Parallaxing / Scrolling Optional)
Layer 5: UI Layer


As you can see in this video, putting objects on layer 4 can allow you to do some parallax scrolling. Basically, objects on the layer above move in the opposite direction of you, proportional to your speed and other factors. The objects themselves are actually planted in levels in fixed locations, but applying certain image settings will create the effect.


Last edited by Draenin; 03-15-2013 at 06:05 AM..
Reply With Quote
  #11  
Old 03-15-2013, 08:37 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Draenin View Post
For the purposes of parallaxing backgrounds, layer 1 would need to be the background layer, while layer 2 should ideally contain the tiletype information. As an example, if you wanted to make scrolling water or a world map that parallaxes beneath some floating islands, it would need to be on the layer underneath the one players normally walk on. There are lots of different things you could do with an extra layer underneath, as well as ones above the player as well.



I've actually been thinking a lot about layer structuring lately, and the best setup I can come up with so far is:

Layer 1: Background Layer (Parallaxing / Scrolling Optional)
Layer 2: Map Layer
Layer 3: Object Layer
Layer 4: Foreground Layer (Parallaxing / Scrolling Optional)
Layer 5: UI Layer


As you can see in this video, putting objects on layer 4 can allow you to do some parallax scrolling. Basically, objects on the layer above move in the opposite direction of you, proportional to your speed and other factors. The objects themselves are actually planted in levels in fixed locations, but applying certain image settings will create the effect.

pretty cool video
Reply With Quote
  #12  
Old 01-23-2014, 07:35 AM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
Bringing
Up
My
Post

Again...


This needs to happen. Also, this.
Reply With Quote
  #13  
Old 01-30-2014, 03:28 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Draenin View Post
Bringing
Up
My
Post

Again...


This needs to happen. Also, this.
i feel those clouds should parallax slower.. or is it just me
Reply With Quote
  #14  
Old 06-01-2014, 07:16 AM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
Quote:
Originally Posted by scriptless View Post
i feel those clouds should parallax slower.. or is it just me
It's possible to do that with some minor adjustments, I believe.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.