Giter Site home page Giter Site logo

rhizome's Introduction

rhizome

A text based adventure game

API

The primary endpoint for the API is at /api/action.php. This currently accepts a url parameter called string that should contain the URL encoded action sent from the client. Note that this will eventually be a POST action.

API requests return a JSON string.

All requests, regardless of game state, will return a prompt property that should be printed to the screen. Often, an array of choices will also be sent.

Battle Stuff

Just some notes to remember for later.

Basic stats: Strength, Defense, Intelligence, Agility

Entities have "types" for initialization, each type correlates to a basic stat, and stats are built with modifiers based on type.

HP = (.5STR + .75DEF) * 2 + 5

MP = INT * 2 + 3

Stats are built based on: (1 + (DIFFICULTY / 20) + modifier) * LEVEL + RN(-1,1)

Attack Rate: 75 * (AGILITY / ENEMY_AGILITY) + 10

Formatting

When sending data to the client, you can format it in a number of ways using a BBCode like format.

[b]Bold text goes here[/b] [i]Italic text goes here[/i] [u]Underlined text goes here[/u] [q]Quoted text goes here[/q]

You can also set colors with the same type of format.

[c1]This will be red text[/c1]

You can use 1-7 to set colors according to ANSI escape code colors.

1 - Red 2 - Green 3 - Yellow 4 - Blue 5 - Magenta 6 - Cyan 7 - Gray 8 - Orange

New lines can be sent in a number of difference ways. The recommended way is to use a "\n" to denote a new line (which will be turned into "
" on the client). You also have the option of sending back your prompt as an array. Each element will be turned into its own line.

rhizome's People

Contributors

snollygolly avatar

Stargazers

 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.