Talk:DecouplingCyphesis

From WorldForgeWiki
Jump to: navigation, search

Regarding how the file system is laid out when cyphesis is installed, you have to remember that all unix applications must be installable in the root or any of the other available system "roots" (/usr, /usr/local, /opt and so on). This requires that the application conforms to the File System Hierarcy standard, which can be found here: http://www.pathname.com/fhs/ Therefore the rule sets must be installed in share/cyphesis/rulesets, because otherwise you would end up with a new root directory /rulesets which would violate the FHS. Anyway, great work you've been doing, both on this and the world creation article! --Erik 09:36, 9 September 2007 (CEST)

Atlas format

Regarding the Atlas format, we provide a couple of different serializers, where the xml format is just one. Cyphesis uses the xml format, but Indri for example uses the Bach format, as seen here. The different codecs available can be found here.--Erik 09:41, 9 September 2007 (CEST)

A note on File Systems

I agree: the file system should be completely portable. And I wanted to handle Windows installs as well (in case that ever happens).

My file structure was actually more portable than perhaps I made clear: I am assuming that the installation occur in an arbitrary parent directory. A user (game player) may have 10 different local cyphesis installations, each in their own subdirectory, each with their own directory structure within. One possible directory structure (with 3 different installations) could look like:

  game-directory
     worldforge-servers
        mason-original
           bin
           etc
           rulesets
              basic
              mason
           var
        mason-updated
           bin
           etc
           rulesets
              basic
              mason
              mason-updated
           var
        zanthar
           bin
           etc
           rulesets
              basic
              mason
              zanthar
           var

Does that make sense? A user could install a cyphesis directory structure anywhere in their file system (and they could install many different cyphesis installations sprinkled all over their filesystem), and each installation would only use its local copies of config files etc. So there is no root ruleset directory, and in fact there is no assumption about any root filesystem at all.

For games, I think this is very important. A world creator can package the versions of the binaries that work together, and then game players can pick up and install those game packages without having to worry about software versions. And they can install and uninstall game packages without worrying about side effects in root /etc directories or other places. --Tomva 04:07, 19 September 2007 (CEST)


XML/Atlas formats

Thanks for the Atlas codec links! That does make sense. So Atlas has a canonical internal representation, and you can use a number of codec-supported formats internally. The Bach structure looks pretty close to what I was coming up with!

But they all map 1-to-1 to each other (as they have to), and that means they have kept some of the idiosyncracies like explicit lists and maps, and bounding boxes are still weird ("weird" to my expectations, which doesn't mean much).

I still think this:

  id      wolf
  parent  character
  bbox {
      x0 -2.6
      y0 -1.6
      z0  0
      x1  2.5
      y1  1.6
      z1  2
  }

is preferable to this:

  id       wolf
  parents [
       character
  ]
  bbox [
       -2.6,
       -1.6,
        0,
        2.5,
        1.6,
        2
  ]

In the first case, you can have a list of parents (if you wanted) by just specifying more "parent foo" lines. And in the second case, the bounding box is specified with an assumption about ordering in the list, which strikes me as dangerous.

But not a big deal. The format is pretty straightforward and well-documented (source code!). --Tomva 04:09, 19 September 2007 (CEST)