[Cowlark Logo] cowlark.com

thickishstring

All Top-level Files

Files in the top-level directory in any check-in

  • .fossil-settings
  • client
  • doc
  • jstb
  • server
  • src
  • COPYING
  • Makefile
  • README

                            thickishstring v0.2
                            ===================

                        Copyright © 2013 David Given



INTRODUCTION
============

thickishstring is a text-based MMORPG engine with a lightweight web-browser
client.

The client uses Javascript/HTML with a WebSockets connection to the server
so it's fast and responsive --- if you're used to accessing AJAX websites
you'll be astounded at how fast it is. The server is written in Python using
SQLite as the database backend; it's fast, lightweight, and should be very
portable. 

Right now it's in an incredibly rough prototype stage, but there's enough here
to let you log in, move around, talk to other players, create your own realms
and let other players play them.



INSTALLATION
============

You will need:

 - The following Python modules:
 
      python-ws4py
      python-gevent
      python-greenlet
      python-anyjson
      python-ply



Step 1. Running the server
--------------------------

Currently there's no installation phase; the server is run directly from the
distribution.

    python server/main.py

This will launch the server. By default, it will listen on port 8086 and use
the file 'test.db' as the database. These can be changed using command line
options; try --help for the list.

If the database file does not exist, it will be created and initialised with
a very basic realm and one instance. The realm is owned by the user Thoth,
with default password 'testpassword'. You will want to change this. (The
option's in the 'Account' menu at the top right of the client screen.)

The server can be safely shut down by ^C-ing it.


Step 2. Configuring the web client
----------------------------------

The web client lives in the client directory. Copy the whole directory onto
your web server, then edit:

  client/scripts/main.js

Near the top of the file W.URL will be set to a websocket URL. Change this to
point at the machine you're running WebSockify on. The default setting is
port 8086 of the same machine the client is served from (the host is
autodetected).

Now if you load the web client in a browser, a connection should be set up and
you'll be presented with the thickishstring login screen. That means it's
working!



TROUBLESHOOTING
===============

If the client connects and then immediately disconnects, then check the
Javascript log. If you see a message like this:

WebSocket connection to 'ws://cowlark.com:8086/' failed:
Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch

...then that means that your copy of python-ws4py is too old and doesn't
support the current WebSocket standards. You'll have to upgrade it, I'm
afraid.



ADMINISTRATION
==============

Okay, er... there is no admin interface. In order to do things like change
other people's passwords, delete users, adjust server settings etc, you'll
need to directly manipulate the database using the sqlite3 command line tool.
This is unsatisfactory. Sorry.

There is one special user, Thoth, who owns the default instance and
The Hub. In all other respects Thoth is just an ordinary user. To
change the default instance, modify the 'defaultinstance' entry of
the 'variables' table to contain the id of the instance you want.
This is where new players will appear and where players go when they're
kicked out of an instance. For example:

    update variable set value=1234 where key='defaultinstance';

To change a user's password, modify the 'password' field in the
'players' table. The value is the hex SHA256 hash of the password.
This can be calculated with the following Python code:

    import hashlib
    print hashlib.sha256('new password').hexdigest()

The field can then be changed with:

    update players set password='hex digest here' where user='username';

It is safe to modify the database while the server is running.



MORE INFORMATION
================

thickishstring's home is at http://cowlark.com/thickishstring. There's
currently not much there except the source repository.



THE AUTHOR
==========

thickishstring was written by me, David Given. You may contact me at
dg@cowlark.com, or visit my website at http://www.cowlark.com. There may or may
not be anything interesting there.



LICENSING
=========

thickishstring is licensed under the Simplified BSD license. See COPYING for
the full text.

The Javascript client embeds copies of:

- jquery-json; MIT licensed, see https://code.google.com/p/jquery-json/
- jquery-scrollTo; MIT/GPL dual licensed, see http://flesler.blogspot.co.uk/2007/10/jqueryscrollto.html
- jquery-cookie: MIT licensed, see https://github.com/carhartl/jquery-cookie
- LESS; Apache 2 licensed, see http://lesscss.org/
- Yahoo's reset-min; BSD licensed, see http://developer.yahoo.com/yui/license.html
- jsprettify; Apache 2 licensed, see https://code.google.com/p/jsprettify.
- codemirror; MIT licensed; see http://codemirror.net/

The Python server embeds copies of:

- a modified version of unparse, which is one of the standard Python demo
  scripts; Python Software Foundation License 2, I assume.
  http://svn.python.org/projects/python/trunk/Demo/parser/unparse.py

Fossil version [66ee0beb9b] 2023-05-31 15:26:08 © 2008-2012 David Given, unless specified otherwise