Giter VIP home page Giter VIP logo

advent's Introduction

Advent Game and Game Engine

This project is meant to become a tool that can be used both to play a clone of the classic interactive fiction (IF) game, Adventure, AKA ADVENT, as well as an abstractable (eventual second project) IF game engine.

So far...

  • A loop that prints a prompt, reads a text command, parses it, and attempts to execute an interpreted command.
  • Classes representing verb-actions, world-objects to be acted on, and commands.
  • World-object subclasses representing the player, rooms, and specific types of objects.
  • Modules providing behavior for common object traits, such as being a container, movability, breakability.
  • Common actions such as look, take, move between rooms, inventory, special exit command which exits the game.
  • A lexicon is a collection of understood terms, which can mostly represent command verbs, but can also be other parts of speech, such as implicit nouns that are not defined as world-objects.
  • A game is a class representing the current game-state in terms of the existing objects and the container-contents graph.
  • Rooms with descriptions, exits and objects pulled from Z-Code rewrite of Advent.
  • Compass-directions and exits with capability for obstructions.

To run:

ruby advent.rb

To play:

  • Try typing common one or two word commands such as look, look object, take object
  • And try directions: north, south, east, west, up, down.

To create a game:

  • Subclass Game.
  • Create room objects and link them with the exit function.
  • Create objects and place them into rooms.

TODO:

  • Continue fleshing out the Advent game world and then, as necessary...
  • Create a lot more built-in objects, maybe as modules that other objects can include.
  • Create a lot more built-in verbs in the lexicon and create sensible default actions for verbs and objects.
  • More tests, including some transcripts of commands and expected output, making use of parameterized $stdin and $stdout.
  • More robust object interaction, including lamp-light, keys and locks, etc.
  • PARSER: better semantic net parsing to accept helper words (look at obj instead of look obj, e.g.)
  • Allow multiple synonyms for objects and multi-word noun names.
  • Prompt for incomplete command info ("with what?")

advent's People

Contributors

jcrivera avatar groddeck avatar

Stargazers

 avatar

Watchers

 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.