* index.dox, common/BaseWorld.cpp, common/BaseWorld.h,
common/PropertyFactory.h, common/PropertyManager.h, common/const.h,
rulesets/ActivePropertyFactory.h, rulesets/Entity.h,
rulesets/Py_Vector3D.h, rulesets/Py_World.h, rulesets/Py_WorldTime.h,
rulesets/PythonMindScript.cpp, rulesets/PythonMindScript.h,
rulesets/PythonScript.h,
rulesets/PythonThingScript.h, rulesets/PythonWrapper.cpp,
rulesets/PythonWrapper.h, rulesets/Script.cpp, rulesets/Script.h,
server/ArithmeticFactory.h, server/CommServer.h, server/CommSocket.h,
server/ScriptFactory.cpp, server/TaskFactory.cpp,
server/TaskFactory.h, server/WorldRouter.cpp, tools/AdminClient.h,
tools/cyaddrules.cpp, tools/cycmd.cpp, tools/cyconfig.cpp,
tools/cydumprules.cpp, tools/cyloadrules.cpp:
Add a truck load of inline docs.
* tools/cywatchdog.cpp: Mark obsolete file as removed from the build.
* tools/cyloadrules.cpp, tools/cyconfig.cpp, tools/cyaddrules.cpp:
Rename some overly generic types so they have more indicative
and unique names.
* FIXME, server/ScriptFactory.cpp, server/TaskFactory.h: Add a couple
of formal FIXMEs to sort out the code for loading modules and
classes.
* rulesets/PythonThingScript.h: Remove some commented out code.
* server/Idle.h, server/Idle.cpp: Rename reference to CommServer
so there is no ambiguity in classes which inherit from Idle
and CommSocket.
* server/CommServer.h, server/CommServer.cpp: Store the current
time, and a flag indicating if the server is currently handling
client traffic. Modify idle handlers so they are only
called if the server is not busy with internal traffic, or traffic
from clients. Check for errors returned by epoll().
* server/CommUnixListener.cpp, server/CommListener.cpp,
server/CommClient.h, server/CommClient.cpp: Make CommClient an
idler, and use it to track clients which connect but don't
negotiate, disconnecting them after a timeout.
* common/utility.cpp: Add a FIXME note about more correctly
converting a message to an op.
* server/CommClient.h, server/CommClient.cpp: Call new shutdown()
method in skstream instead of close when disconnecting or
timing out, so that the socket is still valid. Otherwise
there is no reliable way to detect that the socket is no longer
connected.
* server/CommClient.h, server/CommClient.cpp, server/Account.cpp,
server/Connection.h, server/Connection.cpp: Rename close() to
disconect() to more accuratly reflect its function.
* server/CommServer.h, server/CommServer.cpp: Add an implementation
based on epoll which is used if available. Much more efficient
and scalable.
* tools/cycmd.cpp: Fix a couple of memory leaks.
* server/CommListener.cpp,
server/CommMetaClient.cpp, server/CommMetaClient.h,
server/CommPSQLSocket.cpp, server/CommPSQLSocket.h
server/CommServer.cpp, server/CommServer.h,
server/CommUnixListener.cpp, server/server.cpp:
Replace CommIdleSocket with pure virtual inferface Idle,
and use multiple inheritance in classes which are both sockets
and idlers. Rename add() in CommServer to make its function cleaner,
and move its implementation into the cpp file in preparation for
a more powerful CommServer implementation.
* server/CommServer.h: Add a method to remove CommIdleSocket
objects.
* server/CommIdleSocket.cpp: Automatically remove this object
from the server when its destroyed.
* server/CommPSQLSocket.cpp: Return an error if we get an error
reading from the RDBMS socket. This seems to indicate that the
connection is lost. Losing connection to database should not now
cause this code to segfault.
* rulesets/Entity.cpp, rulesets/MemMap.cpp: Modify FIXME text so
its clearer which ones are part of the same problem.
* rulesets/Thing.cpp: Use a Delete pointer for a Delete operation.
* server/CommServer.cpp, server/CommServer.h: Change references
to clients into sockets. Remove unused version of removeSocket()
which takes an error message.
* common/FormattedXMLWriter.h: Add some notes about converting this
class for use with any Atlas codec.
* server/CommClient.h, server/CommIdleSocket.h, server/CommServer.cpp,
server/CommServer.h, server/CommSocket.h, server/ServerRouting.h,
server/WorldRouter.cpp:
Improve the names of some typedefs and clean up some comments.
* server/WorldRouter.h: Remove declaration of obsolete unimplemented
setSerialno() member function.
* common/BaseWorld.h, server/CommServer.cpp, server/CommServer.h,
server/ServerRouting.cpp, server/ServerRouting.h,
server/ServerRouting_methods.h, server/WorldRouter.cpp,
server/WorldRouter.h: Modify idle to return if there are ops due
so that select can be called with zero timeout. Server now processes
op as quickly as possible and hopefully is still responsive.
* common/Database.h: Declaration for register relations.
* server/Account.cpp, server/Account.h, server/Admin.cpp,
server/Admin.h, server/Connection.cpp, server/Player.cpp,
server/Player.h, server/ServerRouting.cpp,
server/ServerRouting.h: Properlly separate username and id from
account, and use the database code to assign numerical ids to
account objects. Eliminate extraneous member variables in account.
* server/CommClient.cpp, server/CommServer.cpp,
server/CommServer.h, server/server.cpp:
Eliminate storing server name string twice.
* common/BaseEntity.cpp, common/BaseEntity.h, rulesets/Character.cpp,
rulesets/Food.cpp, rulesets/Thing.cpp, rulesets/World.cpp:
Add arg to error method specifying where the error should go. Use
this arg to ensure that errors don't get broadcast.
* common/Database.cpp, common/Database.h, common/const.cpp,
server/Persistor.cpp, server/Restoration.cpp,
server/WorldRouter.cpp
Change id and loc column in entity tables to integer for
performance. Add id generator sequence to database
* common/Database.cpp, common/Database.h, server/Persistance.cpp,
server/Persistance.h: Remove old legacy world, mind and server
tables as they are no longer used.
* common/BaseEntity.cpp, common/Load.h, common/Save.h,
common/custom.cpp, common/op_switch.h, common/operations.cpp,
common/operations.h, common/types.h, rulesets/BaseMind.cpp,
rulesets/BaseMind.h, rulesets/Character.cpp, rulesets/Character.h,
server/Admin.cpp, server/Admin.h, server/server.cpp,
tools/cycmd.cpp: Remove Load and Save ops.
* rulesets/Area.cpp, rulesets/Character.cpp, rulesets/Line.cpp,
rulesets/Plant.cpp: Fix != to |= when setting update flags.
* server/CommMetaClient.cpp, server/CommMetaClient.h,
server/CommServer.cpp, server/CommServer.h, server/server.cpp:
Add mechanism for sockets to be called whenever the server
is idle, so that they do period things. Use this mechanis,
to handle sending periodic packets to the metaserver, removing
special case code from CommServer.
* server/CommClient.cpp, server/CommServer.cpp, server/CommServer.h,
server/ServerRouting.cpp, server/ServerRouting.h,
server/server.cpp: Change the way main server object are created
to be more logical.
* Increment to devel version 0.3, and start breaking things.
* server/CommClient.cpp, server/CommClient.h, server/CommServer.cpp,
server/CommServer.h, server/server.cpp, server/CommListener.cpp,
server/CommListener.h, server/CommMetaClient.cpp,
server/CommMetaClient.h, server/CommSocket.cpp, server/CommSocket.h:
Refactor network code so metaserver and listen socket are no longer
special cases, opening up the way for a database connection handler.
* server/CommServer.h, server/CommClient.h, server/CommServer.cpp,
server/CommClient.cpp: Re-factor the way client connections are
handled, so closed and blocked connections are disposed of more
cleanly.
rulesets/EntityFactory.cpp, rulesets/MindFactory.cpp,
rulesets/Stackable.cpp, server/Account.cpp, server/Admin.cpp,
server/CommClient.h, server/CommServer.cpp, server/CommServer.h,
server/Connection.cpp, server/ExternalMind.cpp,
server/Persistance.cpp, server/Persistance.h,
server/ServerRouting.cpp, server/WorldRouter.cpp,
server/server.cpp: Removed unused includes and code. Added some
FIXMEs.
* rulesets/Thing.cpp: Added TO and FROM to faked Sight(Create()) ops.
* server/OOG_Thing.cpp, server/OOG_Thing.h: Marked files as removed.
Al Riddoch <alriddoch@zepler.org>
files. Cleaned up debugging output.
* rulesets/EntityFactory.h, server/CommServer.h: Fixed headers so
the required ones are included.
* server/Persistance.cpp: Re-wrote shutdown method so it deletes
the class instance.
Al Riddoch <alriddoch@zepler.org>
atlas object inheritance tree.
* server/Connection.cpp: Added code to allow client to query
atlas object inheritance using get ops.
* example/client/InheritanceClient.*: Added example client which
queries the inheritance tree of the server.
* rulesets/MemMap.h, rulesets/Py_Map.cpp: Made hooks lists private,
and added methods to access them.
* server/Account.cpp, server/Lobby.h: Added correct handling of OOG
look ops when looking at own characters, other accounts, or the
lobby.
* server/ServerRouting.h: Added function to generate serial numbers
for operations.
* server/WorldRouter.cpp: Assign genuine serial number to all
in game operations as they are pulled off the queue.
* Cleaned up header file multiple inclusion checks for uniqueness,
and made sure of ISO compliant use of std::string.
Al Riddoch <alriddoch@zepler.org>
server/CommServer.h: Added support for server "name" which
defaults to the hostname of the server machine, but is
customisable in the config. This can be used in preference to
IP address when doing lookups with the metaserver.
* server/Lobby.h, server/ServerRouting.h, server/Account.h,
server/Account.cpp, rulesets/Stackable.h, rulesets/Stackable.cpp,
rulesets/Python_API.cpp, rulesets/Py_Object.cpp, rulesets/Plant.cpp,
rulesets/Pedestrian.cpp, rulesets/Entity.h, rulesets/Entity.cpp,
rulesets/Character.h, rulesets/Character.cpp, common/BaseEntity.h,
common/BaseEntity.cpp: Modied asObect() and addToObject()
methods to make them more efficient.
* modules/Location.h, modules/Location.cpp: Removed old obsolete
Message::Object based addToObject() method.
* rulesets/Thing.cpp: Optimised apperance/disappearance code.
Al Riddoch <alriddoch@zepler.org>
* rulesets/BaseMind.cpp, rulesets/MemMap.h, rulesets/MemMap.cpp:
Add code to flush a characters memory as its mind is
deleted.
* rulsets/Character.cpp: Delete movement class associated with
character when character is deleted.
* rulesets/EntityFactory.h, rulesets/EntityFactory.cpp: Delete
all the entity factories when the server shuts down.
* rulesets/PythonScript.cpp: Decrease reference of and thereby
delete the python script at delete time.
* server/ServerRouting.cpp: Delete all the objects in idDict,
which should include all in game objects, and all explicitly
out of game objects, like accounts.
* server/WorldRouter.cpp: Delete all pending operations, gameWorld
object. Ensure that an object is deleted from ServerRouting's
idDict when it is deleted from the world.
* server/CommServer.h, server/server.cpp: Added CommServer destructor
which deletes all client objects and the server object.
* server/server.cpp: Delete the database persistant object and the
entity factory at shutdown.
Al Riddoch <alriddoch@zepler.org>
make server operation customisable. Added comments.
* server/server.cpp, server/CommServer.h: Changed methods which
return int to returning bool if they are success/faul results.
* server/WorldRouter.cpp: Removed some unused debugging code.
Optimised heavily used code. Changed error message on
sending to a non-existant entity so that it is no longer
reported as a critical error.
* server/ServerRouting.h, server/Connection.h,
server/Connection_methods.h: inlined simple methods.
* server/Connection.cpp: Optimised frequently used code.
* server/CommClient.h: Simplified read method so it no
longer checks status redundantly.
* common/BaseEntity.h, rulesets/Thing.h, rulesets/Entity.h: Added
comments explaing purpose of classes.
* rulesets/Thing.cpp: Added detailed comments, and removed unnecessary
initialisation of some attributes.
* rulesets/PythonMindScript.cpp: Removed redundant NULL check.
* rulesets/MemMap.h: Added inlines for inlined methods.
* rulesets/Entity.h, common/BaseEntity.h: Moved seq from BaseEntity
to Entity as it does not apply to Out Of Game objects.
* rulesets/Entity.cpp: Added in stamp/seq attribute. Nade name
attribute optional.
* rulesets/Character.cpp: Simplified some op handling code
to make it more readable and hopefully faster. Added comments
explaining movement, removed unused commented out code, and
removed some unnecessary debugging code.
* common/operations.h: Explanatory comments.
* common/*.h: Re-wrote extended operations to fit in
with Atlas-C++ 0.4.2 conventions.
* common/log.*: Commented out unused logging code.
Al Riddoch <alriddoch@zepler.org>
This code will no longer build against the last release of Atlas-C++ 0.4
Please use cvs Atlas-C++ stable branch.
* Substantial re-work of object model. Moved many attributes out
of BaseEntity class. Changed WoldRouter so it now handles
objects in terms of Entity, rather than BaseEntity.
* Code cleanups, including removing reduntant includes, and
getting rid of C style comments.
* Fixed the way attributes are handled in Set operations and
when merging from an Atlas::Message::Object. This fixed
problem with setting gender of characters.
* rulesets/Pedestrian.*, rulesets/Movement.*: Re-named
Movement variables to make them clearer. Added in
separate handling for collisions from moving to
target position. Modified collision handling so
objects can slide next to each other.
* rulesets/Thing.cpp, rulesets/Character.cpp: Cleaned up and
rationalised movement code. Much shorter, faster and
more compact than before.
* Made better use of iterators throughout, eliminating unnecessary
lookups, and copying of data.
* Moved all virtual functions out of header files, making
less work for the linker.
* Made more use of const references to avoid the need to copy
data before being able to inspect it.
Al Riddoch <alriddoch@zepler.org>
instead of pointer.
* physics/Vector3D.h: Re-ordered functions to allow correct inlining.
Changed member names to correct convention.
* rulesets/MemMap.cpp,rulesets/MemMap_methods.h: Re-ordered function
to allow inlining, and moved non-inlinable functions into .cpp file.
* Changed new operation initialisation to be done at construction
time instead of imediatly after construction for performance
reasons.
* server/WorldTime.*: Modified member names for convention, and
moved non-inlineable function to .cpp file.
Al Riddoch <alriddoch@zepler.org>
begin with a lower case letter and do not contain _.
* Fixed retrieval of Account from database so that the Account
is now correctly referenced in the server object.
* common/types.h: Changed type name to make them clearer.
* rulesets/Character.h: Moved MovementInfo into its own class
file, and made it a base class, with a Pedestrian super class.
This allows different types of movement handling classes
to be used to handle things that move differently.
Al Riddoch <alriddoch@zepler.org>
script types to be cleanly dropped in.
* Re-work on server and communication related classes to use
references where they are apropriate. Code is now much more
robust.
* Huge cleanup of header files removing redundant includes.
* server/WorldRouter.h: Removed is_object_deleted because it
is broken and not used.
* server/Connection.h: Removed unused disconnect() methods.
* rulesets/Entity.*: Added new in game base class from which
all mind and object classes are derived. This removes
clutter of Thing class from mind classes.
* aiclient/*: Progress with creating AI client for mind handling.
* common/globals.*: Moved some globals out of server specific files.
* rulesets/Makefile.am: Separated rulesets code into 3 almost stand
alone packages; entities, mind and python interface code.
Acorn may well not work now, but I would apreciate it if people could
test the code on their setups. Lots of code has changed, and almost
everything is now cleaner.
Al Riddoch <alriddoch@zepler.org>
when part of entity leaves box to when the whole entity leaves the
box.
* basic.vconf: Make tent use the structure base class.
* client/define_world.py: Add bounding box to tent.
* tools/cycmd.cpp: Added password entry.
* server/Admin.cpp: Added "stat" admin command, to get server
details.
* server/CommClient.h: Fixed include dependencies.
* common/persistance.cpp: Added findAccount() method for systems
without db3.
* rulesets/Thing.cpp: Added sending Apperance and Disappearance
operations to static entities when another entity moves out
of sight.
* rulesets/Character.cpp: Added check to make sure an entity does
not collide with itself.
* rulesets/Thing.cpp: Added check to make sure entity does not move
inside itself.
* rulesets/Py_Location.cpp: Modified python location.copy() method
so that only the position and velocity is copied. This should
bounding boxes getting set on things which should not have them.
* rulesets/Character.cpp: Added return statement to movement
handling, so move ops without arguments are not handled.
Al Riddoch (alriddoch@zepler.org)
and end encodings, which is <atlas>..</atlas> in the case of
XML-like codec.
* modules/Location.h: Added a flag which indicates whether the
bounding box of an entity is solid. If it is not solid, then
the entities contents much be checked for collisions rather
than the entity itself.
* rulesets/Character.h: Added target_ref attribute to MovementInfo
as a means to track character movement between entities.
* rulsets/Character.cpp: Modified collision code to handle
detecting of collisions with non-solid objects, and handling
movement when characters moves into a non-solid object but
does not collide with it.
* rulesets/Structure.h, StructFactory.*: Added base class for
buildings and other structure, which are not solid, and the
character can move in and out of freely.
* server/server.cpp: Made metaserver functionality optional, and
added a config option to the config file.
Al Riddoch (alriddoch@zepler.org)
* */*: Fixed mistake in copyright statement.
* tools/cypasswd.cpp: Fixed usage message.
* tools/cycmd.cpp: Added tools for sending administrative commands
to server.
* server/server.cpp: Send terminate instruction to metaserver on
server shutdown.
Al Riddoch (alriddoch@zepler.org)
to network classes.
* server/CommServer.h, server/WorldRouter.h, server/ServerRouting.cpp:
Added fields to server entity for number of players and uptime
in seconds.
* Started implementation of WorldTime class for processing of calendric
time.
Al Riddoch (alriddoch@zepler.org)
* Throughout entire code base:
Removed all obsolete code and commented out code relating to porting
from python. Removed interim data types bad_type and None. Added
const throughout where apropriate. Change various flags to bool
type. Removed unused members.
* Added TODO list.
Al
and shifting code around to optimise it.
* Heavy use of inlining to improve code performance.
* Added global exception handler to catch exceptions while processing
operations.
Al