Not logged inOpenClonk Forum
Up Topic Layers (Planes?)

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Günther
Okay, here's more detail about how I think this could work:
We have a bunch of layers, let's say 70, ordered like this:
(-10)-(-1): Background objects
0: The landscape. No object has this layer so we can use the zero as a layer-not-yet-set marker
1-5: Deco objects.
6: Castles
7-9: Stuff in castles
10: Buildings
11-15: Stuff in front of buildings
16-19: Stuff behind vehicles
20: vehicles
21-25: Stuff in front of vehicles
26: Stuff behind large animals
27: The Dragon (and other large animals)
28: Stuff in front of The Dragon
29: Stuff behind animals
30: Clonks
31: Stuff in front of Clonks (old-style shields would be an example)
32: Stuff behind small animals
33: Small animals - Wipfs and anything else that's smaller than a Clonk
34-35: Stuff in front of animals
36-39: Stuff behind objects
40: Flints, rocks, and similar stuff
41-45: Stuff in front of objects
46-49: The empty space between the game and the GUI
50-59: GUI objects

All numbers subject to change, of course. We will have to strike a balance between reserving enough layers for unforeseen uses and small, easy-to-remember numbers. 70 layers is probably on the lower end.

With this design, the blastwave example could move objects in layers 9 to 45. (Assuming that moving buildings a little bit is okay. If not, 16-49.) If something unforeseen comes along and requires a game object to escape explosions to the front, it could use the empty space, but a don't-blast-me opt-out query might work better.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill