linktree Atrinik.org - Multiplayer Online Role Playing Game  >  Atrinik News  >  Developers' Corner
linktree Topic: Sub-layers and complex 3D structures
Pages: [1]   Go Down
  Print  
Author Topic: Sub-layers and complex 3D structures  (Read 5743 times)
0 Members and 1 Guest are viewing this topic. Bookmarked by 0 members.
Online Cleo
Developer
Alex Tokar

Posts: 580
Gender: Male
« on: September 29, 2011, 12:06:46 pm »

More "fake 3D" is now possible with the new sub-layers feature: see the attached screenshot. Previously this was nearly impossible to do, because layer 1 (floor) is always drawn first, along with layer 2 (floor masks) due to tilestretching and other effects. In order to allow structures such as bridges, as you can see in the attached screenshot, the sub-layer feature was added: "layer 1 sub_layer 1" will be drawn on top of "layer 1", and will not z-merge with nearby floor tiles that are not of the same sub-layer.

Another (perhaps more important feature, decor-wise) is the ability to have multiple fmasks (or other objects with the same layer) on the same tile, without using the "changing the layer" hack (such as one fmask on layer 2 and another on layer 3). Now, one fmask can be on "layer 2", and another on "layer 2 sub_layer 1", and even another on "layer 2 sub_layer 2" (rendered in the respective order).


* Atrinik-2011-09-16-04-10-32-429991.png (115.8 KB, 850x600 - viewed 391 times.)
 Logged
Offline Mamoru
Developer
Edwin Miltenburg

Posts: 625
Gender: Male
« Reply #1 on: September 29, 2011, 12:35:25 pm »

Great! Been waiting a looooong time for such a feature. Could you write a script that takes the layer 3 hack and changes it to layer 2 sub-layer 1? And another map-checker function for fmasks in any layer but 2?

M.
 Logged
Online Cleo
Developer
Alex Tokar

Posts: 580
Gender: Male
« Reply #2 on: September 29, 2011, 12:43:44 pm »

I can do the latter, but not the former.
 Logged
Online Cleo
Developer
Alex Tokar

Posts: 580
Gender: Male
« Reply #3 on: September 29, 2011, 12:52:35 pm »

How about a warning option "layer changed from the default value"? I could make it enabled by default, depending on how commonly used it is (for legitimate purposes, if those exist at all at this point).
 Logged
Offline Mamoru
Developer
Edwin Miltenburg

Posts: 625
Gender: Male
« Reply #4 on: September 29, 2011, 04:58:10 pm »

That's okay, it would just be a one-time script to save us from changing all the currently hacked fmasks manually.

As for the "layer changed from default value", this is commonly used for wall & item hacks too (example). Could it be possible to add a sub-layer to layer 5? This problem would then be solved and you could add that warning to the map-checker. Otherwise it would be better to just check for fmasks hack (which is used a lot at the moment).

M.
« Last Edit: September 29, 2011, 04:59:53 pm by Mamoru »  Logged
Online Cleo
Developer
Alex Tokar

Posts: 580
Gender: Male
« Reply #5 on: September 29, 2011, 05:08:36 pm »


That's okay, it would just be a one-time script to save us from changing all the currently hacked fmasks manually.


Like I said, not really possible. There's not that *many* hacked fmasks anyway.


As for the "layer changed from default value", this is commonly used for wall & item hacks too (example). Could it be possible to add a sub-layer to layer 5? This problem would then be solved and you could add that warning to the map-checker. Otherwise it would be better to just check for fmasks hack (which is used a lot at the moment).


Any layer can have up to 5 sub-layers (or maybe 4, I don't remember off the top of my head), except of course layer 0. That is partially the reason that in order to implement sub-layers, see-invisible had to be removed (invisible objects are still invisible, but permanently so, even if you can see invisible [except maybe in the below inventory]).
 Logged
Offline Mamoru
Developer
Edwin Miltenburg

Posts: 625
Gender: Male
« Reply #6 on: September 29, 2011, 05:15:40 pm »

Alright, a warning for unusual layers would be good to have enabled by default then. The sub-layers are really a great feature :D Just what I needed!

M.
 Logged
Online Cleo
Developer
Alex Tokar

Posts: 580
Gender: Male
« Reply #7 on: September 30, 2011, 03:04:29 pm »

2128 occurrences in the main branch maps... :lol:
 Logged
Online Cleo
Developer
Alex Tokar

Posts: 580
Gender: Male
« Reply #8 on: September 30, 2011, 03:59:26 pm »

It seems there are in fact legitimate uses of changing the layer - for the rendering order when doing things like putting items such as food (layer 3) on top of a table (which is layer 4). So the way to put a fish on top of the table would be to change it to layer 4 and set its sub-type to 1. Previously this was done by just changing the fish to layer 5.

So since there are legitimate uses, the warning will be disabled by default.
 Logged
Online Cleo
Developer
Alex Tokar

Posts: 580
Gender: Male
« Reply #9 on: September 30, 2011, 04:26:41 pm »

Wow, Incuna sure has a LOT of reed with "layer 3" even when there's no other fmasks... No wonder there's so many occurrences of the warning...
 Logged
Offline Mamoru
Developer
Edwin Miltenburg

Posts: 625
Gender: Male
« Reply #10 on: October 18, 2011, 04:15:54 pm »


Wow, Incuna sure has a LOT of reed with "layer 3" even when there's no other fmasks... No wonder there's so many occurrences of the warning...

Indeed, because it is used a lot along the shore. The water fmasks are in layer 2. Therefore, I put the reed in layer 3 by default (pickmap).

Edit: Of course, with sub-layers, this is no longer necessary.

M.
« Last Edit: October 18, 2011, 05:26:09 pm by Mamoru »  Logged
Pages: [1]   Go Up
  Print  
 
Jump to: