Suggestion 1) Was a WORLD item… giving nothin more to REGION
I guess, the world is simply world.nw that contains THE main region.
Sub-regions can be inside it, or on external files.
Suggestion 2) Make true layers
2.1) Holes: which means hole tiles, that you can fall down to layers under.
2.1.1) And you can fall in a hole, only to layers N-5 or less (like N-10).
2.2) Roof
Also, if you are on layer N, layer N+1 is a roof… roof for houses. So that interior of houses is invisible, but as soon you get in the house the full roof of the house disappear.
Edit1) Or maybe not all the roof should disappear, but only the roof of the room or corridor you are entering.
Need to think a bit more if it really can be done. /Edit1 See 3) Regions on how it could be done.
2.3) Thinghs under your feet
If you are on roof N, layer N-1 appears when you make explosions.
2.4) Change coordinate system
Now, the great change is to coordinates. Rather than being a 2D game il would become a simulated 3D game in 2D.
So, we need to change coordinates x,y to become x,y,layer.
That would affect LINKS old and new positions.
And Sign positions.
And NPC positions.
2.4.1) Coordinates could become local to regions… which would means that the new coordinate system would become:
region,x,y,layer … need a bit of thinking (seems to make it easier to move regions… is it worth it?)
2.4.1.1) Add a scale factor to a region, so that the interior of a house, could be defined with more details
- Add regions
Edit2: While thinking about roof of rooms that disappears, I thought about defining regions.
Rather than defining full level with BOARD, we could have named regions of a level. It would make it easier to have roof of room that disappear.
Well, just thinking. Of course we would have SCRIPTREGION and SCRIPTREGIONEND ! /Edit2
I begin to see that for the editor, objects are just small regions but single-layers, like a tree an object 2x2 of tiles.
So this open the door to is a region multi-layers, or single layers?
Can I choose which layers my regions have in it?
3.1) Regions can contains sub-regions
3.1.1) sub-regions can contains any set of layers, and overlap or occupy the same rectangle as an other (most likely with different layer set)
3.1.1.1) if both parent and child define the same layer region, child have priority. In case two childs define same region, greatest name (Z after A) region define the region.
3.2) Region can defined a default terrain tile… or default terrain generator, the initial idea was to fill a region with herb or dirt
The idea is also to define what is there on undefined regions?
3.3) Regions could be define in the same file, or defined in an other file
3.4) Also, could add some permissions to regions, to give house to some players.
3.4.1) Have canCopy permission, to allow a player to copy part of your region in his region
REGION regionName [layer-list] beginX beginY width height ! beginX and beginY just define local coordinates system, not where it is inserted in parent
REGIONCHILD regionName x y scaleFactor ! Repeat as needed, insert sub-region region name at x,y
MAINLAYER layerNum
TILESET fileName
SCRIPT nameScript
ENDSCRIPT
SCRIPT onRegionCreated
ENDSCRIPT
REGIONLINE lineNum layer base64DATA
ENDREGION