Author Topic: zones regions maps sectors  (Read 1276 times)

ghoust

  • Wayfarer
  • *
  • Posts: 3
    • View Profile
zones regions maps sectors
« on: March 15, 2006, 09:02:34 pm »
Hi,

Can someone explaing the zone, region, sectors, map naming convention ? It seems to me the stuff is somehow used for similar objects. is a region a map ? a zone a sector or a region?
If I have this settled, where does the world file fit in ?
The max exporter creates just one file, this file can contain several zones/sectors.
Which part do I enter into the zoneinfo file ? To me the zone names in the zoneinfo file seem to be arbitrary, just the region map should correspond to the sectors found in the world file.
What gets loaded if I issue the loadmap command ?
Is there some documentation for this zoneinfo file around and a tutorial or two about creating sectors and levels than the stuff in the CS path ? To me it seems to lack some vital parts to bridge the gap to PS. (what is transitional for ?)
As is I have maps loaded on the server side but on teleporting me to the map I get ugly client side errors in zonehandler with my zones not being found in the zoneinfofile (Could not find zone info for sector 1_room1)
and a zone named zonewhereentitieshsouldbechached or so ..

Anybody who can help out and point me to a better art pipeline documentation ?

Tom

AryHann

  • Veteran
  • *
  • Posts: 1244
  • WonderWoman
    • View Profile
(No subject)
« Reply #1 on: March 16, 2006, 09:27:33 am »
OK, I am not familiar with all the concepts but at least part of them.
A map is intended in PS terminology to be a .zip file in /art/world. It is also the world file in this .zip.
The world file can contain one or more sectors.
A sector is a CS concept that is used to optimize the way you load the \"environment\". You can read more about this in CS documentation.
You can read something here: http://crystalspace3d.org/docs/online/manual/cs_4.8.8.1.php#4.8.8.1
There are other parts of the documentation that might interest you. Search for them.

A region is a \"connection\" of several maps that are loaded when you enter one of the maps. Basically, hydlaa_plaza and laanx belong to the same region, while hydlaa_plaza and magicshop don\'t.

I will probably say something wrong about the zones, but as far as I see them they are strictly related to the regions.

In the zoneinfo.xml file you should enter the map name, which is the name of the zip file you want connected in the same region.
this identifies a sector <- EDITED this (I wrote wrong!)

this instead identifies the map belonging to that region.

When you do \"loadmap npcroom\" you are loading the zip file. So, all the sectors in the world file within that zip are loaded as well.
So, if you would hypothetically load laanx you would get the sectors laanxentrance, laanxwell and laanx (or similar).

There is unfortunately no documentation available on PS side. I was having some hard time understanding it myself when I was creating Virtual Annel?v. Anyway, I think I got some grip over it.
The only documentation available is the CS one, which explains how a sector is structured and when use it.
I started to understand things from a CS perspective. So, before getting things done in PS I was using walktest and trying to learn from that the main concepts.

You need to add the sector as well to sectors.sql in the database. If after this attempt of explanation you still have troubles teleporting yourself, please, show us your zoneinfo.xml
« Last Edit: March 16, 2006, 12:04:32 pm by AryHann »
AryHann

http://www.reflex.lth.se/culture/annelov - Virtual Annelöv -
Engine Dep. - One of Talad's Angels - Aka ww & Ahrijani's Goddess

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
(No subject)
« Reply #2 on: March 16, 2006, 11:41:54 am »
I\'m not authority here, all I write below is result of my experiences and deduction, so it can be totally wrong ;)

zone is a part of game world, which must reside in the computer memory (physical or virtual) as a whole; all parts of the zone are accessible without the need of loading of additional regions. Player is always in a sector named in zone opening tag. When player crosses to other sector, he moves to other zone, game engine checks if additional regions should be loaded to make all adjacent sectors accessible. Some regions can be also unloaded to save memory.

region is a part of the game world which must be loaded into memory to make zone complete. Region contains geometical elements (like mesh objects), textures, materials, sectors, triggers and many other elements possible to define in world file. Since You can not load single sector (or only particular textures etc.), whole map is loaded, which of course makes all needed elements accessible. Sometimes it is little waste of memory, but usually it helps in seamless crossing between sectors (a kind of \"keep maps loaded\" option).

map - basically: map = world file, but map also contains elements like textures, libraries... In Planeshift \"name of a map\" = \"name of zip file containing map\" (excluding \".zip\" ).

sector is the only part of the game world visible to a player at given moment of time. You can see other sectors only through (warping) portals. Sectors are defined in world file by tags > and .

If You want to add Your map to PS, You must add some entries to zoneinfo.xml too. For every sector defined in world file you must add zone definition. If Your map file is named \"mymap01.zip\" and you have two sectors defined in world file \"1_room1\" and \"1_room2\" the minimum to add is:

Code: [Select]

 
   
 

 
   
 



Maps for Planeshift should contain one start point (defined between tags ...) named \"Camera01\", placed in sector of your choice. When you use syntax \"/teleport map \" player is telported to zone, of which \"central point\" is sector containing Camera01. Without defined start point You must use syntax \"/teleport map \".
« Last Edit: March 16, 2006, 11:44:51 am by Wired_Crawler »
"Close the world, txEn eht nepO."

ghoust

  • Wayfarer
  • *
  • Posts: 3
    • View Profile
(No subject)
« Reply #3 on: March 18, 2006, 03:42:37 pm »
Thanx a lot !

That helped a lot to get my exported map running ! The critical thing for me was that every sector must be mentioned, even if it is in the same file.

Another question: Is it possible to have sectors which are connected by portals to be in two different world files ?

Tom

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
(No subject)
« Reply #4 on: March 18, 2006, 06:28:29 pm »
Quote
Another question: Is it possible to have sectors which are connected by portals to be in two different world files ?
Of course, on the condition, that two maps (regions) containing those sectors are loaded into memory (i.e. they are parts of the same zone). Take a look at zoneinfo.xml one more time - what do you think, how are you able to enter the tavern from the city? Those two areas are two different maps... :) To test this in walktest just give filenames of all required maps in command line.
Note: if one region uses the elements defined in the other region, the order of specifying them in zoneinfo (or command line) is important.
"Close the world, txEn eht nepO."