This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
We were not able to find the expected elm-package.json file at this tag.
Tag 6.0.0
Committed At 2020-05-10 18:44:01 UTC

Modules

    README

    Elm Narrative Engine

    A tool for building interactive story games.

    Example:

    worldModel =
        parseWorldModel
            [ entity "PLAYER.fear=1"
            , entity "TORCH.item.illumination=7.current_location=PLAYER"
            , entity "CAVE.location.dark"
    
            -- etc...
            ]
    
    
    rules =
        parseRules
            [ rule "entering dark places"
                """
                ON: *.location.dark
                """
                "It's too dark to go in there!"
            , rule "entering the cave with a light source"
                """
                ON: CAVE
                IF: *.item.illumination>5.current_location=PLAYER
                DO: PLAYER.current_location=CAVE.fear+2
                """
                "You enter the cave, {PLAYER.fear>4? your heart pounding | bravely}..."
    
            -- etc...
            ]
    
    

    Try it out in a live sandbox at https://ellie-app.com/7QdZzstKG6Fa1.

    You can also clone https://github.com/jschomay/elm-interactive-story-starter to play with it locally.

    Features

    • "Schemaless" world model - define your world any way you like
    • "Salience-based" and "quality-based" rule matching system - craft immersive and reactive stories
    • "View agnostic" - build your views however you want

    Additional features:

    • Import all data from external sources (like a spreadsheet)
    • Simple and intuitive authoring syntax
    • Advanced querying system
    • Embeddable in a larger code base
    • Designed with the Entity-Component-System pattern

    Usage

    The engine has two main parts: the world model, and the rules. You can use the authoring syntax shown above to define both of these.

    From there, you can query the world model as needed to build your view, and you can find the best matching rule when a player interacts with an entity given the current state of the world, to update the world and show side effects like story text.

    See the example link above for more context.

    More information

    Read the dev blog

    Play sample stories made with the Elm Narrative Engine