Coder Social home page Coder Social logo

paradise's Introduction

Paradise

Paradise plays like an interactive fiction novel, in an ever-changing world where you are not an avatar but a force acting upon words - moving around and into your other selves, threading through chaos.

“I have always imagined that Paradise will be a kind of library.” — Jorge Luis Borges

Install

You can use paradise directly in your browser.

Cli/Desktop

Move to either /desktop, or /cli and run:

npm install
npm start

Actions

There are 16 base actions, you can queue multiple actions using the & character, for example create a teapot & enter the teapot. To see the action documention from within Paradise, use learn to create.

  • create: Create a new vessel at your current location.
  • enter: Enter a visible vessel.
  • leave: Exit the parent vessel.
  • become: Become a visible vessel.
  • take: Move a visible vessel into a child vessel.
  • drop: Move a child vessel into the parent vessel.
  • warp: Move to a distant vessel.
  • note: Add a description to the current parent vessel.
  • pass: Add a passive note to the current parent vessel.
  • program: Add an automation program to a vessel, making it available to the use command.
  • learn: Read documentation for each action, or see a list of action.
  • use: Trigger a vessel's program.
  • transform: Change your current vessel name.
  • move: Move a visible vessel into another visible vessel.

Scripting

Paradise has a small lisp dialect that allows for basic scripting, you can find the list of functions here. If you would like to display the name of acting vessel for example.

note you are the (host) in the (host:parent). # you are the ghost in the house.

You can access class methods like this:

note you carry (len (host:inventory)) items.

You can also do basic math like:

note (mul 4 (add 2 1))

Extras

  • This application supports the Ecosystem Theme.
  • Support this project through Patreon.
  • See the License file for license rights and limitations (MIT).
  • Pull Requests are welcome!

paradise's People

Contributors

g0zar avatar maxdeviant avatar microlith57 avatar neauoire avatar rekkabell avatar tangentfoxy avatar tekgo avatar xvw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paradise's Issues

Unmatched bracket crash

Paradise crashes if brackets in WildcardLISP evaluations are unmatched.

Steps:

echo @(

This causes a crash with a lot of repeated TypeErrors (that unfortunately I cannot copy/paste because of limitations with Blessed).

[Suggestion] Unsafe mode that allows external/native API access

It'd be interesting to have a Paradise version/mode with a special command for doing things on a "host" OS, since Parade doesn't exist yet as far as I can tell. Obviously, since this sort of breaks the dream world out of being sandboxed, which is an intention as far as I can tell, it'd include plenty of warnings, but being able to touch the outside world would be...interesting, to say the least.

Passive notes do not allow code

Not sure if intentional or not, but I noticed on the web version just now that pass Hello (host) just prints that raw instead of doing my intent, having it welcome the possessed vessel by name.

Client ID does not persist

When saving the world, the ID of the client is not saved.

Steps:

  1. Run Paradise Desktop client
  2. create teapot
  3. become teapot
  4. Close the desktop client
  5. Reopen the desktop client
  6. You are now the ghost - you should be the chair

Suggested fix:

  • Store the Client ID with the world.
  • When multiplayer is implemented, store this as an object {client: ID}

`Inventory` command doesn't seem to work

Specifications:

  • Running from latest source (on my fork)
  • OS: Ubuntu 18.04
  • Running using CLI and Desktop

Issue description:
When I type inventory, an 'unknown action' error displays. This occurs with both CLI and Desktop.
Furthermore, using the default world (with a map), no inventory UI appears.

I have noticed that, despite the historical addition (via PR) of such a command, no inventory.js file exists. Furthermore, no inventory UI code seems to exist either.

A terminal-cast of the CLI issue is available here.

I am currently in the process of attempting to recreate the missing command.

Crashes caused by @( query )

Steps:

create button
enter button
trigger say You said: @( query )
leave
say @( query )

Upon say @( query ), Paradise hangs.

This is because when evaluating the WildcardLISP, Paradise evaluates @( query ) to say @( query ), which causes recursion, and would eventually crash.

Desktop client forces export to .grid filetype

Hi there!

I have discovered a bug (that I fixed when introducing YAML, but that is out of scope so I removed it) regarding file exports. It results in .grid being appended to all exported teapot files.

Specifically, when exporting a file, the following code runs: (desktop/sources/scripts/browser.js)

101   this.export = function () {
102     dialog.showSaveDialog({ title: 'Save World', filters: [{ name: 'Teapot Format', extensions: ['teapot'] }] }, (fileName) => {
103       if (fileName === undefined) { return }
104       fileName = fileName.substr(-5, 5) != '.grid' ? fileName + '.grid' : fileName
105       fs.writeFileSync(fileName, paradise.export())
106     })
107   }

This function first shows a dialog (line 102) with the only available extension being .teapot. This is fine, as Electron (I believe) will always output a filename from this that ends with .teapot.

However, line 104 then immediately appends .grid to the filename. Is this intended?
The bug here is either that .grid is appended in the first place, or that the import function does not accept .grid files.

A fix is available in PR #11

can't use themes

When dropping a theme file in the app, I get the following error:

Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    import https://hundredrabbits.github.io/Paradise/scripts/paradise.js:41

How to make variables?

Hi there!

When continuing to overhaul the WildcardLisp files for my PR #9 (and possible other PRs), I found that there seem to already be lists, lambdas, and let statements. However, I am unsure as to how these are done.

  • Firstly, how are lists created? Should I add a list a b c ... wildcard?
  • Secondly, how are variables defined? It looks like you need to make a list with let as the first element, but I'm not sure.
  • Thirdly, how are lambdas defined? Again, it looks like it is done with lambda as the first element of a list, but I'm not sure.

Maybe some documentation is necessary?

Thanks!

Convert `learn` images to SVG

Because the desktop version of Paradise supports themes, the colour scheme can change. However, the images of the learn action are bitmap, so have little contrast against dark backgrounds:

Paradise Noir Theme

This could be fixed by converting them to SVG (eg. with Inkscape/Blender) and changing the stroke colour.

I would be happy to implement this :)

Unknown actions always return You said "undefined"

On the web version, when attempting to do something the interpreter doesn't understand, it just gives you You said "undefined"

Is this meant to say what the user input? Making talking to the environment some sort of default action? Or have things gone more wrong than expected?

Errors display incorrectly in desktop client

Whoops - I broke this.

We need to check if the response is an error and if so return its text.
I have this in the CLI, but not the desktop client (silly me).

I will fix this.

[Suggestion] Potential Multiplayer Implementation

Possible steps for a multiplayer implementation:

  • Store 'possessed' vessels in client data / cookies, like the world is in the desktop client
  • Move away from using paradise.ghost() and paradise.client and instead use client list, host, etc.
    • How to do this if the client controls possession?
    • Do we need these methods at all?
  • Use methods like vessel.is_host()
  • Potentially when a client joins a world, they immediately become a newly created vessel
    • This vessel could be a copy of a template vessel, potentially existing as a paradox of itself at ID 0.
    • When the template is copied, the new vessel is moved inside its owner (the library by default).
    • Before this, its program is run (if present)
    • This would allow for unlimited creation of arbitrary clients, and would still allow for configuration / customisation
    • Potentially need some method of auto-deletion when a client leaves a large server

Edit: change Store clients and associated vessels in world files (re: #29) to Store 'possessed' vessels in client data / cookies, like the world is in the desktop client

Missing image for `learn` action

Reproduction steps:

  • learn to learn
  • Observe broken image

Suggested fix:

  1. Add learn.png image that is one of the following:
  2. (optional) Test for lack of image, and automatically use default.png instead.

I have some partial solutions to this problem, and would be happy to open a PR for whichever image you prefer. I am also working on an automatic default.png fallback.

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.