PAiN logo. Virtual Reality Engine.
Current release:    PAiN Virtual World Engine 0.46

This is new alpha release of the PAiN Virtual World Engine project.
PAiN MUD codebase release (v0.46) consists of the following parts:

1) PAiN DB
    '/db' dir.
    'net.sourceforge.pain.db' package contains database engine PAiN MUD Codebase uses today.
    PainDB features: 
        1) PainDB is a main memory database. PainDB loads whole database file into memory 
           and converts file image into real Java objects during startup.
        2) Any access operation on any primitive or object field is a constant time operation
            (object is already in memory)
        3) PainDB is not OODB, it has no GC. User should manually delete objects.
            All references to removed object will be setted to 'null' automatically.
        4) PainDB supports all Java primitive types, strings, arrays, lists(Array and Linked 
            realizations), Sets of objects and Strings, and 3 types of maps: IntKeyMap and StringKeyMap
            and StringMap(String keys and values(cookies,properties)).
            Database provides transparent way to work with collections for user like
            with real Java objects (java.util.Map,Set,List)
        5) PainDB engine tracks any changes done to persistent object and saves them during flush method call.
        6) User could have several db instances opened during runtime.      
        7) Transactions and subtransactions are supported. (Note: all changes flushed to disk only 
           on 'flush' method call. We can ask PainDB to call flush every time commit is done or
           call it manually outside from transaction.
        8) PainDB is not thread safe. (PAiN Mud codebase doesn't  require PainDB to be thread safe)
        9) You will need to have 2 times more RAM memory to run DB as your database file size.
            (Example: all Anatolia maps converts in 15-20Mb PainDB file. So you will need about 35Mb
            RAM for db memory image(and all runtime db objects), 
            8-12Mb will use JVM ny itself, and about 5-10Mb all other runtime items(socials, commands..)
            So 60-70Mb for a fully functional version should be enough. 
            (Anatolia 3.0 needs about 15Mb to run with all maps loaded but has a less detailed 
            persistent world structure, more primitive db capablities
            and is written with C(lower mem usage) language but not with Java (GC overhead))

            Note: if you convert all Anatolia files into PAiN DB format
            resulting database size will reach 15-20Mb and server startup will take
            7-8 seconds (Cel-700). Note, that during project first start with all areas imported 
            initial reset upon all areas will done (6-7 secs for resets and 4-5sec to commit changes 
           (plus 8-10Mb to dbfile, thousands of new objects will be created)).
2) PAiN - codebase code.
    '/codebase' dir.
    Main part of the PAiN Server. Java source code, configuration files and build scripts.
        Static code: all packages in 'net.sourceforge.pain' except 'logic', 'plugin' and 'db' packages.
                This code is never reloaded, it handles telnet connections and class loaders. 
        Plugins: package 'plugins' -  every plugin could be reloaded separately. Plugin may use 
                any static layer code by direct references or to have direct references to 'superplugins' code,
                but should never use 'logic' code by static references (to support separate reloading for the logic code). 
                Plugin could create events which will be mapped by static core into logic code class. 
                Plugins used to keep large amount of data separate from 'logic' (ex: socials mapping, commands mapping)
                for faster 'logic' layer reloading. Also plugins could be unloaded (logic code is always 'lazy-loaded')
        Logic: package 'logic' - reloaded every time you ask it to reload or any plugin is reloaded.
                Classes in 'logic' package reloaded all at once, to allow static compilation and static references
                in code to each other. (see help for _reload command, make sure you have permissions (god, or grant))
                Logic package contains triggers code ('logic.trigger'), affects impls('logic.affect'), 
                boundary to system events handlers('logic.event') and base logic system functions('logic.fn').

        Note: All these tricks with classloaders and different reloading levels give us all
            benefits of static compilation with errors reporting in compilation time
            (script languages lacks of such level of compilation and inspection).
            Also it give us a full control for reloading (connections, persistent schema affects) and
            allows for JustInTime compiler(Hotspot) to generate more optimized code. 
            (Ex: paindb persistent objects classes should not be reloaded spontaneous)

    Compiled java source code supplied in 'classes' folder. 
    WARN: jdk1.4 required, also make sure that assertions support is enabled for compiler!

3) TinyLib : sample mudlib
	'/mudlibs/tinylib' dir.
	Sample mudlib impl over PAiN Mud Codebase.

4) PAiN GUI Tool
    '/gui' dir.
    To start PAiN GUI Tool enter 'gui' directory, modify 'runGui.bat', and run it.
    Basic codebase administration functionality is provided by 'gui_codebase_module' 
    that could be loaded with menu: Server->Modules
    Default login/password: root/root

    To start server:
    1) Use Ant to build modules 'db', 'codebase', 'mudlib', 'gui', 'gui_codebase_module' 
      (or type 'ant' to build all (with docs), or 'ant code' to avoid javadoc build).
      Ant ver1.6 or greater is required.
    2) Run 'mudlibs/tinylib/run.cmd' to start PAiN Mud Codebase server (with 'tinylib' mudlib code) 
       or 'gui/runGUI.bat' to start GUITool. To install 'gui_codebase_module' use Server->Modules
       menu option and provide full path to 'gtcodebase.jar' file.
       *) Linux users have to rewrite supplied *.bat files to meet the requirements 
        of active shell.
    3) To build tests you should modify 'build.xml' file to set 'junit_jar' 
       to valid path to JUnit library.

    Note: default PAiN Admin service login is 'root', password 'root', port 7775.
    Note: default PAiN User service login is 'god', password 'god', port 7777.
    Note: default PAiN GUITool account is default admin account. GUITool port: 5555.
    Note: Only 'god' has Builder role required to enable builder mode (use grant command..).
    Note: Only 'god' player has a 'grant' command initially 
    Note: 'help' is available for every command.
    Note: Only one area(Midgaard) from ROM (Anatolia) distribution is supplied with this release. 
          All other areas you can get directly from Anatolia site (
          To convert ROM areas into 'tinylib' world presentation use 'import_rom24' 
          command (type 'help import_rom24').


    Change Log:
    Version 0.46 (04-July-2004) new features and bugfixes:  
        1) PAiNDB: Collections could be saved separately from object image.
           This option should be used if collection is not the only field of
           dbobject, it has size of 20-40 items and dbobject fields are
           changed often. Saving collection separately will reduce flushing 
           and object backup time inside transactions.
        2) PAiNDB: DbObject.provideSchema() is now static method and required 
           for all non-abstract DBObject impls. This allows to import class
           schema into db without object instantiation.
        3) GUITool: fully rewritten, modules concept added.
        4) Codebase: more admin console commands.
        5) Tinylyb: roles removed: Reset, ResetGroup. SpaceGroup was renamed to Area.
        6) Tinylib: 'more' shell implemented(this shell should be used to show
           multipage output)
        7) Tinylib: online builder bugfixing.
        8) PAiNDB: fixed bug with error on objects removal with non-empty
           StringMap type fields.
        9) Tinylib: bugs in @build mode fixed. More complete visualization for
            array-type fields
        10) Tinylib: number of small enhancements.

    Version 0.45 (05-June-2004) new features and bugfixes:  
        1) Codebase classes separated from sample mudlib impl(called Tinyib).
           Special properties file is used to configure codebase to work with a 
           custom mudlib.
        2) GUITool: searching for primitive fields added: Player.login='Roland'
        3) Codebase: Admins console added. This will allow to restore server
           if critical error with code reloading occurs (codebase admin utils are not reloadable)
        4) TinyLib: Move/Go concepts separated.
        5) TinyLib: Site and players bans added (granted commands)
        6) TinyLib: Mobile role is merged with Creature role, Interative is not forced
           to be Receptive from now. IndexedSpace merged with Room role.
        7) Client properties added to roles (for faster new features prototyping).
        8) Minor fixes and improvements.

    Version 0.44 (29-Mar-2004) new features and bugfixes:  
        1) GUI Tool: initial impl for database browser.
        2) Affects framework introduced (Only one affect of the specified type
           could be applied to object at the same time. Affect is a bundle of 
           persistent image (AffectData) and dynamically reloaded affect code (Affect).
           Affect is assigned to specified object role and will be removed if role removed)
        3) Triggers framework change: new, more flexible way to add triggers to object
        4) Affects added (Immortality, Immobility(freeze command) - as examples of affects usage)
        5) Rom24 converter could be invoked by granted person in runtime (transactional safe).
        6) Minor bugfixing in PainDB.
        7) Workaround: support for Windows telnet.
        8) LogicReloadListener interface introduced. It's now possible to cache logic classes(performance).
        9) Script build files replaced with Ant's build.xml

    Version 0.43 (14-Dec-2003) new features and bugfixes:  
        1) Bugfix: fixed bug in network module: data flushing to client from pulse thread.
        2) GUI Tool: initial prototype version introduced. Network protocol
           and some basic commands implemeted (login/logout/change pass/server info)
        3) Triggers framework introduced. (Trigger is a bundle of persistent trigger data
           and dynamically reloaded trigger code. Trigger is assigned to the specified object role
           and will be removed if this role removed.
        4) Snoop command implemented (triggers API is used).
        5) Some small errors with logging system fixed.
        6) WeakExtentIterator added (allows ignore concurrent class extent modifications)
        7) More tests written for PAiN DB engine

    Version 0.42 (19-Oct-2003)  new features and bugfixes:  
        1) Bugfix: critical bugfix in PAiN DB engine.
        2) Backup, export to XML, import from XML ability for database engine. 
        3) Commands added: get, drop, give, inventory, backup.
        4) StringMap added to PainDB (could be used to keep cookies for
           of any context without needs of specialization of it's data structs
        5) 'onDelete' method is removed from PainDB interface. DbObject.delete could be overriden. 
        6) Equipped, Wear object types described. It's initial(experimental) version.
        7) Console is now keeps 'id' of Player object but not reference to Player.
           This will eliminate error with illegal(unrestored) field value after rollback.
        8) MessageOutFn gets new template interface. Old one is also supported.
           From now it's allowed to have any number( 0-9 :) ) of template params
           Example of template: '("$n3 gives $d2 to $n1", target, obj, giver)' 
        9) Exits description added.
        10) Number of tests in testbase increased

    Version 0.41 (16-Sep-2003)  new features and bugfixes:  
        1) Bugfix: critical bugfixes in PAiN DB engine .
        2) Commands added: grant, ungrant, reject, allow, password, showgrants, showrejects, exists, force
        3) Help command enhancements: tips by first command character
        4) DbStringSet added to PainDB. Code duplication in PAiN DB maps/sets realization cleared
        5) Command accessebility in command interface added (isAccessableCommand)
        6) Number of PAiN DB tests triples
        7) Bugfix: remove active player
        8) Player is now relocated into special place after exit
        9) Objects creation mechanism proposed: see GlobalFactory class.
        10) A number of minor improvemets   
    Version 0.4 (1-Sep-2003)  new features and bugfixes:    
        1) PAiN DB is now supports transactions and subtransactions (savepoints)
           Every logical action is now enveloped by transaction. If error
           occurs all changes done by this action will be safely rolled back.
           This is the only way to handle runtime errors without stopping program.
        2) Online builder mode added. Use '@build' command to enable builder mode.
           (only 'god' player has Builder role and can use this command today)  
        3) 'Help' added for any available command and for builder mode.
        4) With this release junit tests added into project. Look 'tests' folder.
           To compile and run tests you will need junit.jar library in classpath.
        5) Persistent world structure completely redesigned. 
           This time it's final redesign and next versions will brign only additional
        6) Internal logger enhancements: rolling by time or by size. Delayed flushing.
        7) Reload code enhanced.  Shutdown timer added.
        8) Console commands parsing code and command-to-event mapping is now reloadable. 
        9) More commands added (kill, destroy)
        10) StringKeyMap is supported by PAiN DB.
        11) Rom24ToPain converter fixups

    Version 0.35 (04-Apr-2003)  new features and bugfixes:  
        1) C++ database was replaced with Java realization.
           New realization is more powerfull and is not slower than old one.
           This is a first PAiN release you can run on Linux or Mac platform.
        2) FlushAct added (save,flush,commit console commands)
        3) Some small bug fixing and code enhancing.

    Version 0.34 (28-Oct-2002) new features and bugfixes:
        1) Prototypes redesigned. All Prototypes now are DynObject successors.
        2) Tick Plugin added: (RefreshAct and ResetAct instantiator)
           Reset Act resets thing resets only with this version;
           Refresh Act refreshes only MovePoints (there is no other parameters to exhaust today :( )
        3) WorldTime and WorldCalendar added. From this release every World has it's own TIME, saved in DB.
           One PAiN hour is about 114 seconds, One PAiN year is about 10 Earth days;
        4) TimeAct will show you cuurent Time('time' console command) and Date('date' console command)
        5) Many small modifications and improvements in Act classes 
           (ShoutAct, RangeOutAct added, TellAct modified, QuitAct clarified... :) )
        6) More complete impl of Console state transitions (documented in /doc/artifacts.mdl)
        7) /doc/artifacts.mdl is a Documentation file for some(not all) PAiN features, will be updated with every future release.
        8) Fixed some small bugs in paindb and paindll packages
        9) ShutdownAct added '_shutdown SERVER' command:)
        10) CreatureFactory is now system.CreateCreatureAct - it's code could be reloaded in runtime, 
            also CreateThingAct added (factory for Things)
    Version 0.32 (21-Oct-2002) new features and bugfixes:
        1) 'Plugins' concept added. 'Plugin'  is a small sub-application with dynamic reloading suport. 
           Plugin is loaded with different to Acts classloader. See SocialAct, SocialPlugin 
           to learn how to use plugins;
        2) 'Act' concept clarified: Act is a function, it could be reloaded many times in runtime - so
           act should not contain many static computations during class initilization. See SocialAct, 
           SocialPlugin to learn how Acts interacts with plugins to. Base Act class could not be preloaded.
        3) OutTagAct added. See 'qui' command description in /etc/command_mapping.cfg.
        4) GetCharWorld implemented. TellAct works via GetCharWorld now. more impls in ScanAct. LogoAct rewritten.
           ReloadAct now can reload Plugins. SocialAct divided into SocialAct and SocialPlugin(socials data container)
        5) Console.out() simplified. OutputText class removed.
        6) Fixed bug in paindb code (putting one element twice in map(or set) caused failure)
        7) Fixed bug with ExpiredConsoleAct (for logged players now calls QuitAct) - not heavily tested!
           and .. maybe new bugs added :)

    Version 0.31 (14-Oct-2002)
        1) Fixed some bugs with ConsoleOutAct, TellAct
        2) Fixed bugs with hardcoded urls in codebase
        3) EmoteAct, WhoAct, WhereAct added
        4) Fixed a few bugs in Text2ActProcessor

    Version 0.3 (5-Oct-2002)
        1) More clear Act framework : methods prepare and execute. 
           Act can be produced in prepared state in runtime or should implement prepare method 
           if it was instantiated from text command or other boundary to system interface
        2) Text output template support (see act.txt from Anatholia release located in /pain/doc folder)
           ConsoleOutAct supports all required outputs type! (actRoom(), actVictim(), actChar....)
        3) Colored text output (Ex: 'Hello {WWorld{x' '{W' means white color starts, 
          '{x' -  default color
        4) Anatolia-like socials format supported! (/pain/etc/socials.cfg, SocialAct) 
           About 300 new text commands!
        5) Dynamic act reloading ('_reload' command, 'ReloadAct') 
           All 'pain.act.Act' subclasses are loaded with different to system classloader 
           and could be reloaded any time  without server shutdown. 
           To pay its price we can call specified acts from other packages only by 
           its text name:
           Ex: CoreContext.createAct("pain.act.LookAct"), inside pain.act
               package we could have direct 
               instantiation: Ex: new LookAct();
        6) GetCharRoomAct implementation.
        7) Telnet implementation enhancements(better connection state monitoring);
        8) Player character left the room on player quit.

    Version 0.2 (24-Aug-2002)
        1) Import of Anatolia area files to PAiN format. 
        2) Character creation(regitration, login, quit commands). 
        3) Browsing the world(move command, look room)
        4) Look, say, tell commands impl.
        5) Framework to create new commands (Act files and command mapping)
        6) Transparent for developer persistent engine for '*' structs.
        7) Telnet IO implementation
        8) Flexible command name mapping to the code-files interface.
        9) Some bugs fixed in native db code and 'pain.persistence' package since previous release
        10) ReferenceSet and ReferenceMap(int keys) types database support

    Version 0.1 (04-Aug-2002)
        1) Database engine written in C++.
        2) JNI wrapper of database methods to Java.
        3) Implemented and ready to use 'pain.persistence' package. 

ToDo: (v0.4x)
        Bugfixing and small features impls..
ToDo: (v0.5)
        a) GUI management tool: Partial code integration into database.
        b) Some kind of open API to map different JVM languages with it.
        c) Mudlib testing framework.
        d) JSDK5 support

This code distributed AS IS and not tested heavily.
Distributed under the GPL licence.
Any help for this project in any area will be appreciated!

Mike Fursov, Russia, Novosibirsk.

<<back to the main page>>

Copyright © 2002-2006, Mike (fmike) Fursov <>

Vote for us! Logo