for mind data, and server data.
* common/persistance.*, server/Admin.cpp: Implemented saving and
loading of mind state to mind table. Initially only saving the
contents of the memory map is supported.
* rulesets/MemMap.h: Added asObject() method to convert contents
into Atlas representation.
* rulesets/BaseMind.*: Added handling of load and save operations
which in conjunction with the Python mind component build an
Atlas representation of the mind state.
Al Riddoch <alriddoch@zepler.org>
* 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>
* */*: 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)
of oplist to take advantage of vector's best performance.
* Modified OP_SWITCH macros to improve speed, and made it inlinable.
* Cleaned up python interface code to improve compile and link time.
* Moved custom operation definitions in one header file per class
to improve modularity and compile time.
* Modified boundingbox handling so it now uses size and median.
* Added collision check and inbox member function to Vector3D class.
* Added collision prediction and checking to Location and Vector3D
classes.
* Added collision prediction into MovementInfo class.
* Modified Thing::operator[] so that static attributes can be handled
and added Thing::set() which must be used to modify attributes.
* Added collision resolution so characters can no longer walk through
each other.
* Moved weight attribute to being static attribute of Thing, so it
can be much more easily handled in movement code.
Al
* modules/Location.h: Added inRange() method which can be used
to check whether location, including bounding box, is within
given range of a given location. Changed parent member
variable to ref to fit with Atlas spec. Changed all code
related to using the term ref instead of parent so
that there is no confusion between ref for coordinates
and parent in the Atlas hierarchy.
* rulesets/Thing.cpp: Added code to move operation to check
what entities come into and out of range when entity moves.
Appearance and Disappearance operations are sent to the
moving entity with a list of the relevant entities as their
argument.
* server/WorldRouter.h/cpp: Added overloaded Look operation
handler which applies range constraints to the contains
attribute before returning.
* common/BaseEntity.h, rulesets/Thing.h, rulesets/Character.h:
Added handling of Appearance and Disappearance operations.
* server/WorldRouter.cpp: Added primitive check to broadcast
operations to avoid delivering broadcast operation to
entities out of range.
* Removed world.get_object() use from server python code, as
its use is not required.
* server/WorldRouter.h: Implemented fetching of floating point time
from the OS so movement is much smoother.
Al
* Tweaked the way Look operations are handled when sent from mind, so
an argument is not required if to is set.
* Made some performance enhancements.
* Implemented nourish operation.
* Modifed move_me() goal so it sets face direction.
* Fixed memory leak in MemMap.
* Implemented fully deleting of entities.
* Cleaned up and tweaked python scripts so eating acorns now works.
* Implemented hooks in MemMap for python scripts.
This is the work I got done over the Christmas break. Acorn now works
with a couple of minor glitches.
Al
be accessed, and certain move operations caused an abort.
* Removed attributes from python object which don't have attributes.
* Added Py*_Check() macros, and used them for easier code reading.
* Added snow attribute to weather.
* Commented out code which makes server exit(0) after a certain time.
Al
strings for to and from as well as entities.
* Adapt python Operation() function so operations can be given as
arguments.
* Add Eat, Chop, Cut and Fire operations into the main operation
handling functions.
* Added code so that intelligent entities can use python mind classes
other than NPCMind, and added config section for specifying which.
* Tweaked python mind code for Pig, Wolf and Skeleton so they work.
Al
from config files. Global ruleset should indicate top level ruleset
which can depend on a list of other rulesets.
* Sorted out installation directories. Cyphesis will now need to be
installed before it can be run.
* Cleaned up a load more python scripts for more Acorn stuff.
* Added getting x y and z from Vector3D.
* Made acorn the default ruleset.
Al
off using debug flags.
* Added halt_time, which is number of seconds server should run before
it exits.
* Cleaned a bunch if the remaining memory leaks.
* Cleaned up the way time is handled.
* More tweaks to Python code and API to get Acorn working.
* Inlined some methods into the class definitions, for performance.
* Updated movement code to sort out setting mode properlly, and
deal with stuttering NPC movement.
This is quite a big commit, and most of Acorn now works. Performance seems
to be good too.
leak now is copied Location objects in the python interface code.
* Added hook into the time code so the server can be set to exit
after a given number of seconds. This is required for LeakTracer
to generate its report.
Al
* Removed some unused code.
* Tweaked some python scripts so they import correctly.
* Added in_game flag to BaseEntity so it is possible to tell
if an object is in game.
* Increased the number of operations handled by Message()
* Added handling for initialisation of location.parent using me
in mind code.
* Added is_object_delete() functionality to python interface to world
object.
* Added handling for converting Tuple into Message::Object, and then
ensured that non-basic python types don't get stored as attributes
of a Message::Object.
Many more improvements to goal behavoir. Guard now patrols correctly,
and butcher tries to by a cleaver, because he fails to notice he already
has one.
Al
* More python code tweaks to work with modifications to interface.
* Modified code which gets Thing attributes from Message::Object
so it can use any object dictionary to look up parent object.
* Fixed handling of Thing's static type attribute.
* Modified creation of operations from python to eliminate
some strange segfaults.
* Re-wrote and fixed Entity creation from python.
* Implemented dictlist.remove_value for removing things from inventory.
* Implemented Vector3D arithmetic and methods from python.
* Implemented as_entity() and get_xyz() methods for Thing from
python.
* Commented out deletion of operations from python OperationObject
dealloc() function as it was causing segfaults. There is a problem
somewhere with ownership not being cleared, but I can't find it.
* Implemented conversion of Python Operation and Oplist objects
to Message::Object.
* Fixed MemMap so that attributes of Things are accuratly updated.
* Fixed it so that look ops from mind are broadcast rather than sent
to world. This may have to be reverted.
* Tweaked autoconf to make it cleaner and work better. Still needs
alot of work.
A simple test of some goals now works! The lych goals worked to some
extent and no-longer gives python errors. Only a few more things are
required before Acorn can run, at which point I will release 0.1
for testing.
Al
log.
* Added in lots of deletes to sort memory leaks.
* More python tweaks.
* Implemented status attributes of thing.
* Re-wrote some code which needlessly creates objects in the
free store.
Very nearly all works now.
TODO:
Tidy some of the rest of the leak handling, including all of the stuff
to deal with connections going down.
Sort out how mind gets its attributes set and updated.
Sort out iritating python error in init of Vector3D
delete oplists in OplistObjects. The pointers are never passed back.
Al
* Implemented python function to deal with not being able to check
type of python objects implemented in C.
* Added method to thing for extracting location data from a
Message::Object
* More work on python references to improve leakage.
* Added flag so that python Operation object can own
the operation they point to, and thus delete it in dealloc().
* Implemented find_by_location() and find_by_type() as required in
MemMap, and corresponding python interface.
* Put in temporary work around to deal with the fact that a mind
does not know its name. Currently the mind is not able to
discover any of its bodies attributes, and I am not sure how
to solve this.
* Fixed Location and Vector3D so they use operator bool() to detect
whether they are set.
* Fixed bugs in getting parent from Location in python which caused
segfaults.
* Imported all the basic ruleset entity python scripts.
Goals now work to some extent, though nothing moves around still. The main
priority is to work out how minds inherit the attributes of their
bodies, and keep them up to date. aloril?
Al
non-perceptive entities.
* Sorted out removing spaces from id strings.
* Implemented Entity arguments to Operaiton creation in python.
My TODO list is now empty, but it still does not quite work.
Al
* Used config file to list enitity types and their python class files.
* Cleaned up reference counting in Python API related C++ code.
References should all now be handled correctly.
* Added support for adding None to Operation and Oplist.
Reference count changes have solved some segfaults I was getting. New
config files allows easy specification of rulesets, and has allowed
me to test the complete range of python entity classes used in Acorn.
Import hook code does not appear to work for classes imported directly using
python API calls.
Al
* Added creation of Entities for use in Operation arguments.
* Added initialisation of Vector3D through constructor
arguments in python.
* Added append() method to python interface for Oplist.
* Added support for coercion of operation into addable form.
Al
so that operation manipulations can now work.
* Implemented getting of object name to python/C API, and added
methods for differentiating between op and object.
* Implemented on-the-fly de-coding of operations, from operation
arguuments in python/C API. This will be obsolete once Atlas-C++
does full decode later.
* Implemented get and setattr for Message Object from
python. Attributes are stored both in Object, and in supplementary
python dictionary for non Atlas compatable attributes.
* Implemented copy() method for Python/C Location class.
Al
* Fixed coersion of non-oplist types for addition.
* Implemented getting attributes from Message::Object maps
from python.
It now crashes in the interlinguish code. Closer and closer.
Al
* Added Talk operation throughout operation handling code.
* Added basic WorldTime class together with python wrapper.
Can fill in functionality as required.
* Put debugging back in cos I still need it.
Python mind code now gets talk ops. Some tweaking still to go.
* Implemented getting and setting of to and from in operations
using map to lookup what the mind knows about the entities
in question. This involved adding an extra field to the
RootOperationObject structure to store to and from entities.
* Sorted out base_init() python member so __init__() of all
classes in inheritance tree are called.
* Started work on set_kw() replacement.
* Added python module finding mechanism which is required to deal
with rulesets correctly. I am not convinced this works.
Al
* Added code required to create an operation from with python.
* Modified the Thing python interface so that python objects
that Atlas doesn't want to know about are stored in a normal
attributes list.
Al
here to start importing real mind code from cyphesis-py.
With a little bit of tweaking, I have now got the NPCMind code to import,
though it will almost certainly crash once you start trying to run
any methods.
added the necessary interface code.
* Initial port of MemMap class from python to C++, together with
python interface. Hopefully maintenance of MemMap can be kept
in C++ for speed if possible.
Al
no method as an error.
* Got python interface code to the point that python classes can now
access the C++ attributes of a Thing.
* Split the python interface code into separate files depending
on the type of C++ class the code relates to.
Al