Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Level Design (https://forums.graalonline.com/forums/forumdisplay.php?f=6)
-   -   A demonstration of tilelayers and their strengths (https://forums.graalonline.com/forums/showthread.php?t=134266558)

xXziroXx 06-02-2012 01:47 AM

A demonstration of tilelayers and their strengths
 
7 Attachment(s)
Hi there!

I spent the majority of today putting together a tileset composed out of graphics that had either been released as free-for-use on the forums or been used on Maloria in the past. That was the easy part though, making most of the tileset transparent, giving all the shadows 50% transparency and generally fiddling around with it was annoying parts.

In any case, once the tileset was ready, I set out to make an example level with it. I really wanted to get back into making levels again, I think it's been around 5 years since I last gave it a serious attempt. I also wanted to show the community why they should give layers and Gonstruct (unofficial level editor with layer support) way more attention, because right now barely anyone uses either of it.

The result?

Attachment 54790

I ended up using a total of 6 layers for it.

Layer 0: Basic grass and background for the stream.
Layer 1: Stone path, cliffs and the water covered chest.
Layer 2: Trees, bushes, grass variations, graves, mushrooms, flowers and swamp.
Layer 3: The fence, the cathedral and the bridge.
Layer 4: The sign. I had to have it show above the cathedral. I could've put it on Layer 5, but I found it more organized to leave that for the leafy parts.
Layer 5: Leafy stuff.

Attachment 54785Attachment 54786Attachment 54787Attachment 54788Attachment 54789Attachment 54790

Credit goes too Dusty, for the huge amount of graphics he's released to the community. You're making Graal better as a whole just by being around! Sage, for making some great additions that fits very nicely with Dusty's stuff. Graal would be a better place if you would just be more committed to your work. And finally, Aeko, for the leafy stuff. Hopefully you won't mind me using it, haven't had the chance to ask you in private yet though.

I attached the tileset I made. No, you may not use it on your server without the consent of me, Sage and Aeko. Yes, all three of us. You may however use it freely for personal use.

Attachment 54784

I'd love to hear your thoughts on the level as a whole. Could I have done anything better?

As closing words, I'd like to say this: Stefan, imagine how awesome this level would be to play on, if a tilelayer could be drawn above players/npcs. I'd be able to walk under the leafy edges, create fish npcs that swim below the water, and much more. Pretty please make it happen? :)

DrakilorP2P 06-02-2012 02:00 AM

Underwater chest looks neat. Are the leafy parts blocking?

xXziroXx 06-02-2012 02:02 AM

Quote:

Originally Posted by DrakilorP2P (Post 1696157)
Underwater chest looks neat. Are the leafy parts blocking?

Sadly, yes. Can't get around it until there's support for drawing tilelayers above players/npcs.

MattKan 06-02-2012 02:17 AM

Looks so nice, can't wait to see (and make) some of the Maloria levels!

DustyPorViva 06-02-2012 02:38 AM

Quote:

Originally Posted by xXziroXx (Post 1696159)
Sadly, yes. Can't get around it until there's support for drawing tilelayers above players/npcs.

So this is an unpractical level? Still cool, but it's been a while since I've played with tile layers.

I wish that Stefan would either just make tile layer 0 definitions used(that way we could hide layer 0 and make it a collision map) and add proper onwall/tiles functions for each layer.

xXziroXx 06-02-2012 02:49 AM

Quote:

Originally Posted by DustyPorViva (Post 1696166)
So this is an unpractical level?

Yeah. I could change the leafy stuff to open up more of the level to make it somewhat practical though.

Hezzy002 06-02-2012 04:55 AM

You shouldn't use too many layers, it can get expensive from a rendering perspective. Graal allocates a buffer to render to for each layer, because when you don't move, tiles are not rendered as polygons, but as a pixel buffer. When you move, the pixel buffer is shifted and only the edges redrawn.

While this technique sounds like a good idea, there's a few drawbacks. It saves rendering time, but is expensive on VRAM. When VRAM budgets are exceeded, Graal is forced to perform deallocations. Deallocations are quick, but loading the images back into memory is slow and runs on the same thread in Graal, so it blocks. Since you're taking up parts of VRAM with the buffer each tile layer draws to, Graal, especially on mobile devices, is going to be forced to deallocate images frequently, which isn't so bad, but it means that it's going to have to reload them from file way more frequently now, which can take several seconds of freezing on an iDevice.

Now the real kicker is that allocating 7 buffers for 7 layers on a touch device will cost 7 MB of VRAM. Now, when I says VRAM, it's a slot of 24 MB in RAM reserved for video. Exceeding that budget will force the VRAM sector to move memory around between the other sectors, causing significant performance hits.

This applies super hard on lower end devices. And be thankful that Graal doesn't run at retina resolutions. If it did, it would cost 49 MB for 7 layers.

Clockwork 06-02-2012 05:00 AM

Fyi, no one needs to ask me for permission, it's a couple of tiles I dont care at all about o-o...

Hezzy002 06-02-2012 05:11 AM

Forget about my post.. I thought I was on Graalians. That really only applies to mobile devices, unless someone has a really, really bad PC.

maximus_asinus 06-02-2012 07:57 AM

Good work, I've been trying to push for greater layer support for some time and dropping Dusty's name as much as possible because he made an unfinished layer tileset a while ago.

callimuc 06-02-2012 01:01 PM

I love it

DrakilorP2P 06-02-2012 07:02 PM

Quote:

Originally Posted by Hezzy002 (Post 1696180)
Forget about my post.. I thought I was on Graalians. That really only applies to mobile devices, unless someone has a really, really bad PC.

Can you still cite sources for the first paragraph about how Graal renders layers? This is the first time I've heard anything of it.

Hezzy002 06-02-2012 07:34 PM

Quote:

Originally Posted by DrakilorP2P (Post 1696253)
Can you still cite sources for the first paragraph about how Graal renders layers? This is the first time I've heard anything of it.

If you move large amounts quickly, sometimes the rendering will break up and you get black areas on the level, even when the level data is available. It's only happened with scripts I've made specifically designed to do this, and on gmaps where the area was large enough to actually facilitate this type of error. If it was rasterizing to the screen every frame, then those black areas would disappear after the first frame. Instead, they only clear when you move past the bounds of the screen.

Sometimes you can make the artifacts appear so that the black area is the entirety of the screen and you can watch as the tiles draw onto the buffer.

This is complete conjecture, obviously, as I don't have access to the source of Graal, but those artifacts are telltale of that type of rendering technique being used. There isn't any other way to explain them.

xXziroXx 09-14-2012 04:13 AM

The final version ended up looking like this after an excellent shadow suggestion by Dusty:

http://i.imgur.com/7CFmZ.png

maximus_asinus 09-14-2012 04:25 AM

I never noticed until now, but the layering with the water and cliff tiles as it is now makes the water look extremely shallow and that if the chest had a lid it would not be submerged. Was this intentional?


All times are GMT +2. The time now is 03:24 PM.

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