The Game/Adventure DSL: Unterschied zwischen den Versionen

aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springen
(Die Seite wurde neu angelegt: „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. <code> Room "door" Image "door.jpg" …“)
 
Zeile 24: Zeile 24:
 
       Action "open"
 
       Action "open"
 
         door.metalock.visitor_mode == true
 
         door.metalock.visitor_mode == true
 +
 
       Button "Bell"
 
       Button "Bell"
 
         Action "ring"
 
         Action "ring"
Zeile 30: Zeile 31:
 
       Event lockpicking
 
       Event lockpicking
 
         # Jemand öffnet die Tür und bla bla
 
         # Jemand öffnet die Tür und bla bla
 +
 
       Button "Handle"
 
       Button "Handle"
  
Zeile 41: Zeile 43:
 
             dialog emergency
 
             dialog emergency
 
       Dialog emergency
 
       Dialog emergency
 +
        Image "dialog_emergency.jpg" # Yeah, Bildtelefonie :)
 
         get "Hier Notruf"
 
         get "Hier Notruf"
 
         if library.status.fire
 
         if library.status.fire
Zeile 49: Zeile 52:
 
           put "Aliens wollen mich entführen!"
 
           put "Aliens wollen mich entführen!"
 
           get "Unsere neuen Alienoverlords sind doch unsere Freunde!"
 
           get "Unsere neuen Alienoverlords sind doch unsere Freunde!"
 +
            Image "dialog_emergency_aliens.jpg"
 
             put "Aber die wollen mir eine Analsonde einpflanzen"
 
             put "Aber die wollen mir eine Analsonde einpflanzen"
 
               get "Braballalaalla"
 
               get "Braballalaalla"
Zeile 70: Zeile 74:
 
     Status "fire"
 
     Status "fire"
 
       Image "library_fire.png", 0, 0
 
       Image "library_fire.png", 0, 0
 +
 
</code>
 
</code>

Version vom 1. März 2011, 10:35 Uhr

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