Run your own WorldsAway server!
Presenting Chat Room world!
So here we go. Building on the code snippets we posted before, here is a sample chat server that talks the WorldsAway 2.x Interverse protocol written in PHP and using the ReactPHP framework.
As you can see, given a suitable framework, it's very quick and easy to code up a server for pretty much any application. Obviously, the more functions, the more complex things get. This server doesn't supply any images, relying on the default images within the client, and has absolutely no persistence: You don't get to choose or even name an avatar, but instead one is created randomly for you from the available defaults when you connect. The only actions it currently supports, after login, is to walk about and talk!
Installation instructions are in the readme. You'll need an environment that can run PHP7 and composer, which will install ReactPHP. The only other thing required is the data files created when you installed a version of the 2.x WorldsAway client - as we discussed before, the server looks at the client's data files to determine the necessary details of the protocol. The client, if you don't still have it, is available at the Internet Archive.
This should be considered minimal sample code, intended for personal education and enjoyment. It is being released under the BSD 2 clause licence, so you can do whatever you want with it as long as the copyright notices and licence are reproduced. Please download and/or fork the project if you are at all interested in using this.
I am sure there is much more than can be added to this; a bit more color would be nice, and these could be also selected randomly during avatar creation as a very simple enhancement, preferably as a choice from a range of fixed options. (Choosing 16 random colors for each avatar will look somewhat distressing..) Similarly, the floor and wall could be colored fairly easily. Turns, moods and actions are easy to add, simply reflecting the passed parameters back and to everybody else, just as the walk-to-here code does. I'll leave these suggestions as an exercise for the reader!
What you might consider the "Full Featured" server, that which is running the demo world at altaway.xyz, is still being worked on. Although it's fairly complete from a users' point of view, there is a lot more administrative stuff that needs working on. Not least, the Page Helper options and the helpers' necessary commands haven't yet been completed. Plus, several years of trial-and-error development has left a lot of spaghetti and redundant code that needs tidying up.
It IS my intention that the full server will be released at some point in the future. I am not yet sure on the licencing terms that will be under, yet: I didn't expect to make money out of this; it was initially written as a labor of love, to be a platform for the preservation of a 1990s virtual world that would otherwise be eventually forgotten, and a way to replay the locations and interactions held within some 22+ year old log files. It is, however, the result of many hours of work, off and on over several years.
I'm glad that people are finding the demo service fun, and a worthwhile place to be in it's own right. Having people in there actually using the software is a big help with debugging and, yes, securing the server against "hacking." Given people are already getting quite attached to it, I am now looking at options for the longer term survival of this tiny little world! Don't worry, though, it will always be free to access.
Comments
Post a Comment