Getting Started

  • The default experience manager is written in Java, so make sure you have Java installed and on your path. Camelot does not require Java to run, but the default experience manager does. If you don't have or don't want Java, skip ahead to the next section about using other experience managers.
  • Download Camelot for your platform (Windows or Mac).
  • Unzip the file you downloaded and start Camelot.
    • For Windows, double click on Camelot.exe.
    • For Mac, double click Camelot.app.
  • The default experience manager allows you to type Camelot commands by hand and see their effect. Type these commands one at a time, pressing the ENTER key after each one:
    CreatePlace(BobsHouse, Cottage)
    CreateCharacter(Bob, M, 25)
    ChangeClothing(Bob, Peasant)
    SetPosition(Bob, BobsHouse.Door)
    Game
  • Go back to the Camelot window and click the Start button.
  • Wait until you see this message in the experience manager:
    RECEIVED: input Selected Start
    Then type these commands into the experience manager:
    SetCameraFocus(Bob)
    EnableInput()
  • Now you should be in control of Bob and able to walk around his house using the W, A, S, and D keys.
  • The default experience manager is a very simple program. All it does it prepend the string "start " to whatever you type and send the string to Camelot via standard output. It also shows you Camelot's responses. This experience manager can be helpful when debugging.

How Experience Managers Work

  • An experience manager controls what happens in Camelot. It sends messages to Camelot via standard output (e.g. System.out.println(String) in Java or print(string) in Python) and receives messages from Camelot via standard input.
  • By default, Camelot will use StartExperienceManager.bat (or StartExperienceManager.sh in Mac).
  • To run Camelot with a different experience manager, you can modify the default shell script files or open a console window and run Camelot.exe (or Camelot.app) with the command line argument "-em_path". For example:
    Camelot.exe -em_path "C:\XP\run.bat"
  • To start an action, send a message in this format over standard output:
    start [ActionName]([Action Arguments])
    For the arguments, double quotation is only necessary if the string includes empty spaces.
  • After the action starts, Camelot responds with a message in this format:
    started [ActionName]([Action Arguments])
    Remember to only use double quotations in your strings.
  • Camelot leaves the loading screen and shows the Start button after it receives this command:
    start Game
    After the player presses the start button, Camelot responds with:
    input Selected Start
  • You can use this command to reset Camelot without restarting the experience manager:
    start Quit()
    After resetting is complete, Camelot responds with:
    input Reset
  • When an action succeeds, Camelot sends a message in format:
    succeeded [ActionName]([Action Arguments])
  • When an action fails, Camelot sends a message in format:
    failed [ActionName]([Action Arguments])
  • An action that has not succeeded or failed yet can be stopped using:
    stop [ActionName]([Action Arguments])
    Everything currently executed by that action is reversed.

Creating a Custom Experience Manager in Python

  • First, make sure Python is installed. This example will use Python 3.
  • Create a new text file named em.py and copy and paste this code into it:
    # Send a command to Camelot.
    def action(command):
        print('start ' + command)
    
    # Set up a small house with a door.
    action('CreatePlace(BobsHouse, Cottage)')
    action('CreateCharacter(Bob, M, 25)')
    action('ChangeClothing(Bob, Peasant)')
    action('SetPosition(Bob, BobsHouse.Door)')
    action('EnableIcon("Open_Door", Open, BobsHouse.Door, "Leave the house", true)')
    action('Game')
    
    # Respond to input.
    while(True):
        i = input()
        if(i == 'input Selected Start'):
            action('SetCameraFocus(Bob)')
            action('EnableInput()')
        elif(i == 'input "Open_Door" BobsHouse.Door'):
            action('SetNarration("The door is locked!")')
            action('ShowNarration()')
        elif(i == 'input Key Cancel'):
            action('HideNarration()')
  • Now open the file named StartExperienceManager.bat (or StartExperienceManager.sh on Mac) in a text editor and replace its contents with this:
    python em.py
  • Now simply double click on Camelot.exe (or Camelot.app), and you should now have a working Python experience manager!

Important Commands

Character and Player Commands

Interacting with Entities

  • Items are small, portable things that can be held in a character's hand.
  • Furniture are large, immovable things that are part of places.
  • You can enable icons on entities such as characters, items, and furniture.
  • When something has at least one icon enabled, the player can left click on it to perform a default action (that you specify) or right click to see a radial menu of possible actions based on which icons you have enabled.

Player Input

  • After the player interacts with an entity, Camelot sends a message in this format:
    input [Action name] [Entity name]
  • When the player gets close to an entity, Camelot sends a message in this format:
    input arrived [Character name] position [Entity name]
    This is important for place exits that do not include a door and only send an arrived message.
  • When the player leaves a position, Camelot sends a message in this format:
    exited Player position [Entity name]
  • Camelot captures keyboard key presses for the "I" and "E" keys. When these happen, Camelot sends a message in this format:
    input Key Inventory
    and
    input Key Interact

Other Commands