PDA

View Full Version : layers?


Zulithe
05-15-2001, 11:47 PM
I don't understand why Graal only has one layer for graphics

Why not multiple layers? It would make it slightly harder to make levels but it would be easier to make really cool levels. Like this for example. How about each Graal Level is made up of 3 layers:

layer 1: the background layer. drawn beneath the layer where the player walks. say you were on a very high mountain and there is a forest behind it, the forest would scroll as you walk to give a more realistic feeling of movement

layer 2: this is the layer that the 'ground' is drawn on, where the player walks

layer 3: this is the layer where obstacles go where a player can't walk. like posts or the trunk of a tree

layer 4: this is the topmost layer, drawn above everyting. this would be good for clouds, the tops of trees, etc.

Graal kinda has its own layer system build in but it would also be cool if it was like this. Sure, it probably will NEVER be like this but it is kinda a neat idea.

Kaimetsu
05-16-2001, 12:19 AM
We've got everything except the first one, but even that's technically possible. It'd need some relatively difficult scripting but I think it could be done. Still, it'd probably be very slow.

Tyhm
05-16-2001, 07:42 AM
A background layer would be kinda spiffy, but the tiling would be murderous...you'd have to make another tile for each edge with the background "color", or at least, you'd have to make a tile for the mountain that has the background channel in place of grass...

I think it probably COULD just be scripted, if you use showimgs for the edge of the mountain and lower layer showimgs for the background pieces, use a lot of showimg, hideimg and changeimgvis...

vergil
05-16-2001, 07:51 AM
...and a lot of lag? ;)

Kaimetsu
05-18-2001, 11:42 PM
Tyhm's right, it's possible. But all those shown imgs would slow Graal down pretty danged much and rather spoil the effect. There wouldn't be much lag as such (not internet lag anyway) because it could be drawn clientside.

Psyker
05-19-2001, 11:36 AM
I thought of layer one before, and I tried making different images move, but I gave up.

aran_lesai
05-24-2001, 05:44 PM
There need to be a few more layers. I am making a level with several overlapping npcs. One is just a ceiling and doesn't do anything, except drawoverplayer, but then there is a gate that raises (supposed to look like it raises under the ceiling), but how am i supposed to make it stay "under" the ceiling so it isn't visible when it raises? It goes over the player, so I can't use drawunderplayer, so would drawaslight be an option for the ceiling? I do agree that there should be more layers, but not a background layer. Say 4 vertical layers, to add more depth to the picture. It's kinda like the game "doom" where it looks 3D, but you can only build the levels in 2D (no rooms in the same place at different heights). It wouldn't look 3D, but the vertical axis (z) should be included, for stuff like bouncing balls, when riding horses, trees, etc. That would make a nearly infinite number of "layers" so height could be added. This would be especially good for stacked NPCs that take the same position on X and Y axes. Then their positions would be different if the Z axis was added. That would take a whole lot of work, and would probably be unecessary except on Graal 3D, but it is still something to be thought about. At this point, though, it would be too drastic of a change to Graal. I wonder if they do this on Graal 3D? BTW, NE1 know where can I get G3D??

WhoopA
05-25-2001, 02:26 AM
It's not that expensive computationally to do multiple layers - I have done something similar to this before. I have a system that uses three layers:

* Background
* Foreground
* Objects

Tiles can be placed in the foreground and background: background is always non blocking. Background and foreground scroll together. To simulate a forest, you can have a tree in the background next to a tree in the foreground and set the player between the two layers. This way, it looks like the player's walking between trees. As for speed, it's alright - although the game's on a 60FPS lock, I can still get around 30 on an older system (200Mhz).

Kaimetsu
05-25-2001, 02:40 AM
Originally posted by WhoopA
It's not that expensive computationally to do multiple layers - I have done something similar to this before. I have a system that uses three layers:

* Background
* Foreground
* Objects

Tiles can be placed in the foreground and background: background is always non blocking. Background and foreground scroll together. To simulate a forest, you can have a tree in the background next to a tree in the foreground and set the player between the two layers. This way, it looks like the player's walking between trees. As for speed, it's alright - although the game's on a 60FPS lock, I can still get around 30 on an older system (200Mhz).

Sure, it's possible but why bother? Graal does it already with drawovereverything images, and that does a pretty good simulation of layers. If there was a top layer than it wouldn't work with the current tiles so it'd be lots of work to put lots of transparency bits in all over the place. We can do all we need to right now anyway.