everything-else

schema/schlema

this post is mainly to get me back into the programming/posting about programming groove. ie.. it's void of content.

Code:
----------------------------------
robote/glyphnodes/Donkey.glyphnode

origin=new cli://gamebasis/code/GlyphNode()
{
   torso=new cli://gamebasis/code/GlyphNode()
   {
      hips=new cli://gamebasis/code/GlyphNode()
      {
      }
   }
}

-------------------------
robote/maps/fancyland.map

map=new cli://gamebasis/code/Map()
{
   GlyphNodes
   {
      terrain_0=new cli://gamebasis/code/GlyphNode()
      {
      }
   }
}


in c++ish

Code:

        Database^ database=gcnew Database("");
   {   
      Database^ robote=gcnew DatabaseDirectory("robote");
      robote->appendTo(database);
      {
         Database^ glyphnodes=gcnew DatabaseDirectory("glyphnodes");
         glyphnodes->appendTo(robote);
         {   
            Database^ Donkey_glyphnode=gcnew DatabaseFile("Donkey.glyphnode");
            glyphnodes->appendTo(glyphnodes);
            {
               GlyphNode^ origin=gcnew GlyphNode("origin");
               origin->appendTo(Donkey_glyphnode);
   
               GlyphNode^ torso=gcnew GlyphNode("torso");
               torso->appendTo(origin);   
               {
                  GlyphNode^ hips=gcnew GlyphNode("hips");
                  torso->appendTo(hips);
               }
            }
         }
         
         Database^ maps=gcnew DatabaseDirectory("maps");
         maps->appendTo(robote);
         {
            Database^ fancyland_map=gcnew DatabaseFile("fancyland.map");
            fancyland_map->appendTo(maps);
            {
               Map^ map=gcnew Map("map");
               map->appendTo(fancyland_map);
               {
                  GlyphNode^ terrain_0=gcnew GlyphNode("terrain_0");
                  terrain_0->appendTo(map->GlyphNodes);
               
               }
            }         
         }
         
      }
   }


you would probably never actually write that code (a slightly modified version it does compile), but this shows that the internal representation of the database will literally be whatever the fileformat says. the format is the schema you might say. you can't do whatever the hell you want because at some point you end up putting objects into containers that expect certain types objects (this is why it will actually run fast), but it is pretty damn flexible otherwise.

of course.. the question is whether that flexibility will be useful in the long run. while the old gbscript allowed you to create new objects types mapped to filepaths, the internal rep "forgot" paths in the parsing process. i really, really liked the gbs flexibility and this new stuff is looking even nicer/clean.