~dustin github email rss

Tilde world

Tilde world (~world) is a flat-file, community powered, text adventure game intended to be run on tilde servers.

Source code: https://github.com/0xdstn/tilde-world

~town map: http://tilde.town/~dustin/world/

  1. Description
  2. Creating rooms
  3. Objects
  4. Props and actions
  5. Action instructions
  6. Game commands
  7. Future plans
  8. Release notes

Description

Tilde world can be run on tilde.town by running ~dustin/projects/tilde-world/world.py. When you first run it it will welcome you and ask your character's name and description.

When you finish the setup it will create a ~/.world directory with some configuration files and a rooms directory where you can create your own rooms (see below).

Your name and description is saved in ~/.world/config.

When the game is looking for a room at a coordinate, it will loop through all of the users on the server and check for that coordinate in their .world/rooms directory. The first one found is used, if there are duplicates (try not to step on each other's toes please).

Your current position is saved in ~/.world/loc in the format x,y.

Your inventory is saved in ~/.world/inventory. Each item goes on one line in the format key : x,y. The x,y is the room the object came from so we can reference it's data again.

The state for props are saved in `~/.world/state`. It saves in the format object_prop.txt. As props change via user interaction, these files are updated. They are created upon entering a room with an object that has a prop.

Creating rooms

You can create your own rooms by placing files in the ~/.world/rooms directory.

The files are named for their coordinates in the format x_y. Negative coordinates use an "n" instead of "-". So a room at coordinate -1 0 would be a file named n1_0.

A basic room looks like this:

NAME : Landing room
DESC : An ordinary room

Rooms have the following properties available:

Objects

A room can contain multiple objects. A room with objects would look like this:

NAME : Landing room
DESC : An ordinary room
OBJECTS
-
ID : sword
NAME : wooden sword
GRAB : true
DESC : A wooden sword in good condition
-
ID : shield
NAME : wooden shield
GRAB : true
DESC : A wooden shield in good condition

Objects have the following properties available:

Props and actions

Objects can have props and actions.

Props are key/value pairs. They will be stored in a file specific to the room/prop and the user. That means that whatever state a room and it's objects are in for one user does not affect it for another user.

Actions are a list of triggers and a list of instructions.

Here is an object with a prop and an action:

  -
ID : lamp
NAME : ordinary lamp
GRAB : false
DESC : A lamp with a switch. It is currently [power].
PROPS
power=off
ACTIONS
turn|switch|push|pull
IF power=on
SET power=off
ECHO You turn off the lamp
ELSE
SET power=on
ECHO You turn on the lamp
ENDIF

When the user runs turn lamp it will either turn the power prop on or off depending on if it is currently set to on or off.

Action instructions

Actions currently support the following:

Game commands

As a user of the game you can run the following commands:

Future plans

Release notes