Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - jschomay/elm-narrative-engine: A tool for building interactive fiction style stories in Elm.

A tool for building interactive fiction style stories in Elm. - jschomay/elm-narrative-engine

Visit SiteGitHub - jschomay/elm-narrative-engine: A tool for building interactive fiction style stories in Elm.

GitHub - jschomay/elm-narrative-engine: A tool for building interactive fiction style stories in Elm.

A tool for building interactive fiction style stories in Elm. - jschomay/elm-narrative-engine

Powered by 0x5a.live ๐Ÿ’—

Elm Narrative Engine

A tool for building non-linear interactive story games.

Usage

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...
        ]


inventoryView =
    query "*.item.current_location=PLAYER" worldModel |> List.map item_view

Clone https://github.com/jschomay/elm-interactive-story-starter to get started.

See the visual editor to easily author you content and import it into your custom game.

Elm Resources

are all listed below.

Resources

listed to get explored on!!

Made with โค๏ธ

to provide different kinds of informations and resources.