Git Product home page Git Product logo

text-adventure's Introduction

Text Adventure

A parser-based game engine for interactive fiction (Zork-style text-based adventure) written in PHP. Partially motivated by a desire to learn how to write a classic syntax parser (for the game description file), and also a natural language parser (for user input).

Example of game syntax it can parse:

@object
    @name           computer
    @title          @a computer
    @tagline        On top of the desk sits a computer.
    @description    The computer looks pretty modern--there are two large 
					LCD monitors connected to it, side-by-side. It's turned
					on and there is a sticky note on the desktop: "finish
					game." You are a little puzzled.
    @nouns			computer
    @carry?         @no It's called a desktop for a reason.
    
@object
    @name           bed
    @title          @a bed
    @description    You're surprised to find such a large bed in a room 
					belonging to a college student.
    @nouns			bed
    @carry?         @no
    
@object
    @name           periodic_table
    @title          @a periodic table
    @tagline        There is a periodic table plastered on the wall.
    @description    It's a periodic table, alright. It's got everything from 
					hydrogen to radon, including all the made-up elements 
					such as lawrencium. This one is super shiny!
    @nouns			table
    @adjs			periodic
    @carry?         @yes You roll up the periodic table and stow it away in 
					your jeans.

@object
    @name           paper_shade
    @title          @a paper shade
    @description    It's a temporary shade. Nothing special about it, 
					really.
    @nouns			shade, blinds, blind
    @adjs			paper, temporary, window
    @carry?         @yes You shove the paper shade into your trousers.

text-adventure's People

Contributors

greyblue9 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.