Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Tilelayers (For Stefan!) (https://forums.graalonline.com/forums/showthread.php?t=84810)

Tigairius 03-24-2009 01:27 AM

Tilelayers (For Stefan!)
 
This is going to be my bump thread for tilelayers support. I know it's already been mentioned but I don't want Stefan to forget to add it. Feel free to contribute with suggestions for tilelayers.


Right now, tilelayers need

PHP Code:

tilelayers[tilelayer].layer 

Tilelayers need layers that can draw over player, under player, etc. This can make level editing pretty awesome.

I just want to make sure this (very necessary) functionality isn't left out of the new client. Tilelayers need to be able to draw over player!

I think it would be interesting to change the tilelayer that the player is on too although I'm not sure how well it would work. That way all other layers would be nonblocking. This would enable things like bridges, balconies, etc with no scripting required.

pooper200000 03-24-2009 01:30 AM

I support this because of the awesome abilities we could have for creating new levels!

Codein 03-24-2009 01:32 AM

I support this :)

Crono 03-24-2009 01:42 AM

Yes please, for convenience.

kia345 03-24-2009 01:53 AM

Bridges, trees, mountain ranges...

Pimmeh 03-24-2009 01:57 AM

Hell, I dont script and even I see the use in this! :O
BumperdieBUUUUMP

maximus_asinus 03-24-2009 01:59 AM

It would eliminate 30% of the images used online.

Luda 03-24-2009 03:33 AM

For the children Stefan, for the children.

MiniOne 03-24-2009 09:19 AM

Great Idea. :)

xXziroXx 03-24-2009 10:28 AM

Yes, please.

WanDaMan 03-24-2009 11:56 AM

If possible, instead of a scripting feature can't we infuse the script in to the editor as a built in component? I know you probably won't understand this, however; there are built in features already in the editor such as the flowers, there are 4 flowers on the tileset, the one top left of the tileset has a prominent part to change to the other tiles once used thus making it look like the flower is blowing in the wind. As a level designer I believe this would be easier and more efficent to add this advancement as a built in feature for everyone to use in a non difficult manner.

Crono 03-24-2009 02:46 PM

Quote:

Originally Posted by WanDaMan (Post 1477327)
If possible, instead of a scripting feature can't we infuse the script in to the editor as a built in component?.

Yeah but you know that Stefan will never update the Level Editor for some strange reason.

Tigairius 03-24-2009 05:44 PM

Quote:

Originally Posted by WanDaMan (Post 1477327)
If possible, instead of a scripting feature can't we infuse the script in to the editor as a built in component? I know you probably won't understand this, however; there are built in features already in the editor such as the flowers, there are 4 flowers on the tileset, the one top left of the tileset has a prominent part to change to the other tiles once used thus making it look like the flower is blowing in the wind. As a level designer I believe this would be easier and more efficent to add this advancement as a built in feature for everyone to use in a non difficult manner.

I have made an online level editor that already supports tile layers and is fully functional just like the offline editor. It doesn't save level updates yet though and it's not quite done.

I could perhaps show progress updates sometime, not sure.

Crow 03-24-2009 06:39 PM

Quote:

Originally Posted by Tigairius (Post 1477418)
I have made an online level editor that already supports tile layers and is fully functional just like the offline editor. It doesn't save level updates yet though and it's not quite done.

I could perhaps show progress updates sometime, not sure.

I can say one thing so far: it friggin rocks.

BlueMelon 03-24-2009 07:52 PM

This would be helpful

WanDaMan 03-24-2009 08:42 PM

Quote:

Originally Posted by Tigairius (Post 1477418)
I have made an online level editor that already supports tile layers and is fully functional just like the offline editor. It doesn't save level updates yet though and it's not quite done.

I could perhaps show progress updates sometime, not sure.

Oooh! That'd be fabulous! I'd love to see it :D

Tigairius 08-15-2010 10:23 AM

Shameless bump :(

Levels could also hold information like:
PHP Code:

DRAWTILELAYER tilelayer drawinglayer (for drawunderplayerfor same layer as player, and for drawoverplayer)
LAYERBLOCKTYPE tilelayer <0,1> (for blockingfor non-blocking

For example, inside of the level file it could hold:
PHP Code:

DRAWTILELAYER 1 2
LAYERBLOCKTYPE 1 1 

This would cause tilelayer 1 to draw over player and also to be non-blocking. This layer could be used for certain things like trees, etc.

Oh please oh please. Let's see this happen!

Crow 08-15-2010 12:30 PM

Quote:

Originally Posted by Tigairius (Post 1594195)
Oh please oh please. Let's see this happen!

Yes please! And congratulations to post #3400. Still working on your online editor?

Tigairius 08-15-2010 08:51 PM

Quote:

Originally Posted by Crow (Post 1594208)
Yes please! And congratulations to post #3400. Still working on your online editor?

I haven't worked on it for quite a while :( I'd like to finish it eventually still though.

DustyPorViva 08-15-2010 08:59 PM

Hmm, wouldn't it be better to have player's have a relative layer variable? That way we can change the layer the player is drawn on relative to tilelayers to get more useful effects. For example, if you have a bridge drawn on layer 3, all players with a relative layer under 3 would walk under the bridge, while players with a layer of >3 would walk OVER the bridge. This way we could allow our own player to have the bridge drawn over them without having the bridge also draw over players who are actually on it.

With your method it would be a lot like changing the layer of an image, and it just doesn't work when taking multiple players/NPCs into consideration.

I think if this suggestion were implemented, it shouldn't be related to current image layers, as tile layers can exceed 4.

Tigairius 08-15-2010 09:03 PM

Quote:

Originally Posted by DustyPorViva (Post 1594287)
Hmm, wouldn't it be better to have player's have a relative layer variable? That way we can change the layer the player is drawn on relative to tilelayers to get more useful effects. For example, if you have a bridge drawn on layer 3, all players with a relative layer under 3 would walk under the bridge, while players with a layer of >3 would walk OVER the bridge. This way we could allow our own player to have the bridge drawn over them without having the bridge also draw over players who are actually on it.

No, not really. If you just changed the players' layer, then if you wanted to go back later and make a new tilelayer that draws under the player, you would have to change all of your layers around to make sure all of them stay above the player correctly. With the method that I suggested, you can easily expand your levels later and not have to worry about what the player's layer is while still achieving the desired affect.

DustyPorViva 08-15-2010 09:14 PM

Quote:

Originally Posted by Tigairius (Post 1594290)
No, not really. If you just changed the players' layer, then if you wanted to go back later and make a new tilelayer that draws under the player, you would have to change all of your layers around to make sure all of them stay above the player correctly. With the method that I suggested, you can easily expand your levels later and not have to worry about what the player's layer is while still achieving the desired affect.

Then how would you create a bridge effect if the drawing of the layer is the only thing changing? Like I said, it'd be no different than the issues we currently have with images.

Tigairius 08-15-2010 09:17 PM

Quote:

Originally Posted by DustyPorViva (Post 1594292)
Then how would you create a bridge effect if the drawing of the layer is the only thing changing? Like I said, it'd be no different than the issues we currently have with images.

Hmm, I see what you mean... That's tough. Do you know if that's how other games handle it?

I think even if there was a player variable, there would still be the problem that I suggested with difficulty expanding things.

adam 08-15-2010 09:24 PM

Oh so necessary, oh so possible. Because nothing is impossible. Dusty is right, it's important to be able to do things like bridges with relative ease. Perhaps layer links, much the same way as level links, that alter the players layer as they pass through.

DustyPorViva 08-15-2010 09:28 PM

Quote:

Originally Posted by Tigairius (Post 1594293)
Hmm, I see what you mean... That's tough. Do you know if that's how other games handle it?

I think even if there was a player variable, there would still be the problem that I suggested with difficulty expanding things.

I know in LttP they forced the player to change their layer. This was usually done via interactions like stairs(hence why you lose control of the player and are forced up stairs when you touch them). Thus even though the player(Link) was on a bridge, the NPC's/baddies below the bridge would still be drawn under it.

As far as other games go I don't know. The only other editor I've used with layers was RPG maker and that was a LONG time ago. I believe layers were pretty much hardcoded, and you could'nt quite change anything with them. They were simply used to draw trees/houses and the such over the player, not exactly letting them do anything more complicated.

As for future expansion... well layers are going to be troublesome to expand regardless. But since it's a script you at least give scripters the chance to have better control over it, no? It would just take a little more planning. Try to plan layers out beforehand. Ideally if it was working like I suggestion, and if I started a new server to use layers, I'd at least designate 3 or 4 layers strictly for the ground. That'd give level editors more than enough room to play around and get creative. Then try to control and organize layers for things like trees/roofs/bridges. However, per level basis shouldn't be hard as like I said, it's a variable. You can put individual NPC's in levels to control the drawing on a per-level basis.

But yes, like I said layers are going to be troublesome regardless of how they're implemented. Graal wasn't created with layers in mind and tacking them on this later only makes it harder. They really aren't as fun to develop with as the outcome they offer.

Crow 08-15-2010 09:28 PM

Quote:

Originally Posted by adam (Post 1594294)
Perhaps layer links, much the same way as level links, that alter the players layer as they pass through.

You could just code those. Not a problem.

Tigairius 08-15-2010 09:34 PM

I see the light. I agree with you dusty, it would be nice to have a player.tilelayer variable. All players below that player's tilelayer would draw under the player, and all above would draw above, and all on the same layer would draw as they're drawn now.

That still leaves designating whether or not a layer should be blocking or non-blocking or if it should depend on which tiles are there. I personally would like all three of those options.

adam 08-15-2010 10:00 PM

Quote:

Originally Posted by Crow (Post 1594296)
You could just code those. Not a problem.

True, and you should be able to code it too, I was just thinking for simplicity for levelers to be able to make complex levels alone.

Crow 08-15-2010 10:04 PM

Quote:

Originally Posted by adam (Post 1594304)
True, and you should be able to code it too, I was just thinking for simplicity for levelers to be able to make complex levels alone.

You've got a point *nod*

DustyPorViva 08-15-2010 11:08 PM

Quote:

Originally Posted by Tigairius (Post 1594298)
I see the light. I agree with you dusty, it would be nice to have a player.tilelayer variable. All players below that player's tilelayer would draw under the player, and all above would draw above, and all on the same layer would draw as they're drawn now.

That still leaves designating whether or not a layer should be blocking or non-blocking or if it should depend on which tiles are there. I personally would like all three of those options.

This would probably be more accustomed to the earlier suggestions you made?
level.tilelayers[x].tilesblock = true/false
Which would designate whether the layer tile data is ignored or not. Either way this sort of thing needs to be expanded more as with custom scripts you can't even detect walls and such on layers higher than 0.

gravator 08-16-2010 04:33 AM

It may be something totally different, but something like this is already on graal classic, just check out the bridge to the right of futaids house.

Crow 08-16-2010 06:33 PM

Quote:

Originally Posted by gravator (Post 1594397)
It may be something totally different

It is.

MrOmega 08-16-2010 07:01 PM

I found a way to do this just simply setting a client.var when a player 'touchs' an npc (like going up a ladder or hill), basically it sets to a "layer" the player is on and the image detects what layer and adjusts what parts it blocks and is it drawn above or below the player.

Crow 08-16-2010 07:23 PM

Quote:

Originally Posted by MrOmega (Post 1594557)
I found a way to do this just simply setting a client.var when a player 'touchs' an npc (like going up a ladder or hill), basically it sets to a "layer" the player is on and the image detects what layer and adjusts what parts it blocks and is it drawn above or below the player.

Yes, that would indeed work. At least on the clientside. The troubles begin when there are more players around.

DustyPorViva 08-16-2010 07:35 PM

Quote:

Originally Posted by Crow (Post 1594559)
Yes, that would indeed work. At least on the clientside. The troubles begin when there are more players around.

Exactly. If you "drawoverplayer" to draw the bridge over yourself, then the bridge will draw over ALL players whether they're on the bridge or under it.

MrOmega 08-16-2010 09:44 PM

just a thought experiment, boat could you possibly make the bridge a gani and work with the layers from there or would the same problem arise as before in script?

MrOmega 08-19-2010 02:36 PM

Also wouldn't changing changing just changing a var like player.layer work the same?

-Ramirez- 08-19-2010 09:13 PM

Quote:

Originally Posted by MrOmega (Post 1595246)
changing changing just changing

Someone needs less chemicals.

xXziroXx 03-28-2012 01:15 AM

Bump! Come on Stefan, do want.

Ducati_Link 03-28-2012 04:55 AM

I agree! I'v heard of this LE in the making for to long! It would make life so much easier.


All times are GMT +2. The time now is 08:35 AM.

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