The Game/Adventure DSL

aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springen

Still a draft with no DSL to execute it, yet. But it's very rspec-ish.

Must be easy to read and writeable by anyone.

 Room "door"
   Image "door.jpg"
   Object "metalock"
     Image: "metalock_blink.gif", 30, 50
     Button "visitor_mode"
       Status "off"
         Image: "metalock_visitor_off.jpg", 50, 50
       Status "on"
         Image: "metalock_visitor_on.jpg", 50, 50
   Exit "vorraum", "outside"
   Status "open"
     button.visitor_mode == 'on'
 Room "outside"
   Exit "door"
     if door.status.open
   Object "door"
     Action "open"
       door.metalock.visitor_mode == true
     Button "Bell"
       Action "ring"
         if door.metalock.visitor_mode
           start Event :lockpicking
     Event lockpicking
       # Jemand öffnet die Tür und bla bla
     Button "Handle"
 Room "Phonebooth"
   exit "Hauptraum"
   Object "Phone"
     Input "Number"
       Action "dial"
         switch number
         case 911
           dialog emergency
     Dialog emergency
       Image "dialog_emergency.jpg" # Yeah, Bildtelefonie :)
       get "Hier Notruf"
       if library.status.fire
         put "Das metalab brennt"
         get "OK wir schicken die Feuerwehr"
         put "Danke"
       if hauptraum.status.aliens
         put "Aliens wollen mich entführen!"
         get "Unsere neuen Alienoverlords sind doch unsere Freunde!"
           Image "dialog_emergency_aliens.jpg"
           put "Aber die wollen mir eine Analsonde einpflanzen"
             get "Braballalaalla"
           put "Danke für das Gespräch"
       put "Oh, tut mir leid ich hab mich verwählt"
 Room "Hauptraum"
   Button "Pony"
     Description "Ein schönes Pony an der Decke"
     start Minigame.ponyreiten
   Object "Feuerzeug", :inventory
     With "Papier" status.fire
 Room "Library"
   Object "Papier", :inventory
     Status "fire"
       With "Library" status.fire
 Room "Library"
   Image "library.png"
   Status "fire"
     Image "library_fire.png", 0, 0