Commit graph

30 commits

Author SHA1 Message Date
Erik Ogenvik
514d0812a0 Added basic awareness for navigation.
"Awareness" refers to an entity's view of the surrounding world with
regards to how the entity could navigate. We use Recast/Detour to build
a navmesh for the entity.

However, since each world can have many NPCs, each one with their own
mind, we don't want to keep a complete navmesh for each single mind.
This will quickly become expensive. Therefore we want to share
awarenesses between multiple entities of the same type. So, for example,
all fishes handled by the same ai client will share one single awareness
of the world.
This to some degree involves some cheating, since AI minds now might get
knowledge of the world they otherwise wouldn't have. We consider this to
not be such a big issue. If this is unacceptable for some worlds these
should then disable awareness sharing and take the resource hit.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
d3b9d1788b Use Atlas 0.7. 2015-06-04 21:41:27 +02:00
Yaroslav Taben
05ae38a6cb Added a separate archive for EntityFilter components in makefiles 2014-07-23 12:46:45 -04:00
Erik Ogenvik
31905f5f93 Removed further references to skstream. 2014-02-02 22:15:39 +01:00
Alistair Riddoch
a16af683d3 Update automake variable names 2011-02-17 12:51:25 +00:00
Alistair Riddoch
781b8833b6 Move python api code which is not type related into their own file. 2010-07-27 17:53:47 +01:00
Alistair Riddoch
c8ae80c00f Remove an ugly hack required by earlier coupling of python to entity code. 2010-07-13 16:36:47 +01:00
Alistair Riddoch
68cce50a8c Implement interactive mode for cyclient, which just gives a python prompt. 2009-11-25 17:54:44 +00:00
Al Riddoch
9e45cab870 2006-12-05 Al Riddoch <alriddoch@zepler.org>
* client/Makefile.am, tests/Makefile.am: Add top_buildir to includes,
	  to get config.h in an out-of-tree build.
2006-12-05 20:03:49 +00:00
Al Riddoch
1d53fa068f 2006-07-03 Al Riddoch <alriddoch@zepler.org>
* client/ClientPropertyManager.cpp, client/ClientPropertyManager.h:
	  A new class as a dummy property manager for the client side.
	  Never creates property objects.

	* client/client.cpp: Instantiate the client property manager
	  during client initialisation.

	* server/EntityFactory.cpp: Instatiate the server property manager
	  during server intialisation.

	* common/PropertyManager.h: Add the singletons accessor, and
	  make the addProperty member return a pointer to the property.

	* server/CorePropertyManager.h, server/CorePropertyManager.cpp:
	  Implement creating properties for server side entity objects.

	* rulesets/Entity.cpp: Use the property manager singleton to
	  create properties if a new attribute is set which is not already
	  a property, and its also not already a soft attribute.
2006-07-03 01:29:07 +00:00
Al Riddoch
d3f2f1a351 2005-12-30 Al Riddoch <alriddoch@zepler.org>
* rulesets/Character.cpp, rulesets/StatisticsProperty.h,
	  rulesets/StatisticsProperty.cpp: Add a property handler for
	  statistics.

	* rulesets/Character.cpp: When setting task, check if an existing
	  task needs to be cleared first. When clearing a task, check
	  whether a task exists or not.

	* rulesets/Character.cpp: When initiating combat task from task
	  factory, check to see if the task is successfully created before
	  using it.

	* rulesets/Py_Property.cpp, rulesets/Py_Property.h: New python wrapper
	  class for entity properties.

	* rulesets/Py_Mind.cpp: Re-work getattr logic to make it clearer.

	* rulesets/Py_Object.cpp: Return Py_None when an Atlas Element cannot
	  be converted to python. This ensures that this function never returns
	  null.

	* rulesets/Py_Statistics.cpp: Add temporary handlers for hardcoded
	  statistics for "attack", "defence", and "strength".

	* rulesets/Py_Task.cpp: Add wrappers for methods Task.irrelevant and
	  Task.obsolete, as these are now required in combat scripts.

	* rulesets/Py_Task.h: Fix the PyTask_Check macro, which was miscoded.

	* rulesets/Py_Thing.cpp: Add wrapper for Entity.send_world so that
	  scripts can channel ops through entities.

	* rulesets/Py_Thing.h, rulesets/Py_Thing.cpp: Add an addition structure
	  for directlty wrapping Character in a type safe way. Add method
	  structure pointer to Entity and Character wrappers so that
	  the same getattr method is used for both. Add new method table for
	  Character including wrappers for set_task and clear_task, allowing
	  task scripts to add themselves and remove themselves from
	  characters. Modify wrapEntity() to ensure that Character entities
	  get the right wrapper.

	* rulesets/Py_Thing.cpp: Re-work getattr code so that properties and
	  soft attributes are checked individually, rather than in a single
	  call to Entity.get. Use new python property wrappers to wrap
	  properties explicitly if required rather than converting to Atlas
	  then to generic Python data.

	* rulesets/TerrainProperty.h: Fix incorrect class description in
	  documentation.

	* rulesets/mason/world/tasks/Combat.py: Complete implementation of
	  simple example combat.

	* server/TaskFactory.cpp: Remove debug output.
2005-12-30 18:02:40 +00:00
Al Riddoch
c1aaf53880 2005-09-29 Al Riddoch <alriddoch@zepler.org>
* client/Makefile.am, server/Makefile.am, tools/Makefile.am:
	  Update static libs to Atlas-C++ 0.6.

	* RELEASE-check: Add a note about autopackage building.
2005-09-29 22:51:58 +00:00
Al Riddoch
51b24b6153 2005-05-24 Al Riddoch <alriddoch@zepler.org>
* configure.ac, client/Makefile.am, server/Makefile.am,
	  tests/Makefile.am, tools/Makefile.am: Separate out WorldForge
	  libraries into sections so that tools binaries don't get linked to
	  libs they don't use. This prevents problems when library interface
	  versions change. Use dynamic python library if available, and remove
	  -export-dynamic flag from linker when using the dynamic version of
	  python.
2005-05-24 00:19:38 +00:00
Al Riddoch
0640bdac1a 2004-01-17 Al Riddoch <alriddoch@zepler.org>
* configure.ac, client/Makefile.am, server/Makefile.am,
	  tools/Makefile.am: Add a configure option, and modify the
	  way libs are handled so that it is possible to link most
	  libs statically. This makes it possible to build a stand-alone
	  binary distribution.
2005-01-17 22:41:45 +00:00
Al Riddoch
622cc2dbc8 2004-09-28 Al Riddoch <alriddoch@zepler.org>
* client/BaseClient.cpp, client/BaseClient.h: Rename files for
	  already renamed CommClient class, to avoid name conflict.

	* client/ObserverClient.h: Update for new header name.
2004-09-28 18:25:29 +00:00
Al Riddoch
68f5a5a756 2004-02-14 Al Riddoch <alriddoch@zepler.org>
* Clean up Makefile.ams a bit.
2004-02-14 22:26:18 +00:00
Al Riddoch
29a290e6ea 2003-06-20 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.cpp: Fix variable name bug in non-debug build.

	* Update Makefile.ams so that distcheck works.
2003-06-24 09:53:38 +00:00
Al Riddoch
b89504d49c 2002-08-30 Al Riddoch <alriddoch@zepler.org>
* common/globals.cpp: Only persist this sessions command line
	  options if the user is overriding the installation directory.

	* cyphesis.vconf, client/Py_CreatorClient.cpp,
	  client/Py_CreatorClient.h, client/client.cpp:
	  Add client functionality to allow diferent scripts to be run to
	  perform different functions on the server.

	* client/CharacterClient.cpp: Add debug option.

	* rulesets/Character.h: Make mind operation functions virtual,
	  so they can be overridden.

	* common/BaseWorld.h, server/WorldRouter.cpp,
	  server/WorldRouter.h: Add server functions to search for
	  entities by name or type.

	* rulesets/Creator.h, rulesets/Creator.cpp: Allow creator to
	  specify a look without an id to search for entities with
	  a given name or type.

	* client/CreatorClient.cpp, client/CreatorClient.h,
	  client/ObserverClient.cpp, client/ObserverClient.h,
	  client/Py_CreatorClient.cpp, rulesets/basic/editor.py,
	  rulesets/mason/define_world.py:
	  Add support for looking for entities in the world by name or
	  type from client script, so client scripts can modify existing
	  world.

	* rulesets/Entity.cpp, rulesets/Movement.cpp,
	  rulesets/Py_Object.cpp, rulesets/Py_Operation.cpp,
	  rulesets/Py_Oplist.cpp, rulesets/Python_API.cpp,
	  rulesets/Stackable.cpp, rulesets/Thing.cpp,
	  rulesets/World.cpp, server/Account.cpp,
	  server/CommServer.cpp, server/Connection.cpp,
	  server/Player.cpp, server/ServerRouting.cpp,
	  server/server.cpp, tools/cycmd.cpp,
	  tools/cywatchdog.cpp: Code formatting cleanups.

	* rulesets/basic/world/objects/tools/Bow.py: Fix up bow so it now
	  fires correctly.
2002-08-30 13:48:39 +00:00
Al Riddoch
c657678a96 2002-06-11 Al Riddoch <alriddoch@zepler.org>
* tools/Makefile.am, server/Makefile.am, client/Makefile.am,
	  autogen.sh, configure.in: Removed some overcomplicated and
	  unrealistic build options. Sort out all the library checking
	  to use the macros.

	* Makefile.am: Reinclude acorn maps for packaging as Acorn.

	* cyphesis.spec.in: Bring rpm spec up to date, with packages
	  for server, libs and game data.

	* rulesets/Makefile.am: Fixed distribution of ruleset hooks .in file.
2002-06-11 11:30:45 +00:00
Al Riddoch
699de31f1b * common/BaseEntity.cpp: Set serialnos on error ops.
* common/inheritance.cpp, common/inheritance.h, common/custom.cpp:
	  Rationalise the way types are stored in the inheritance system
	  and install info about cyphesis custom operations.

	* example/client/InheritanceClient.cpp,
	  example/client/InheritanceClient.h: Update to use skstream.

	* server/ServerRouting.cpp, server/ServerRouting.h,
          common/serialno.h, common/serialno.cpp: Switch to using
	  a more global easier to access source of serial numbers.

Al Riddoch  <alriddoch@zepler.org>
2001-11-20 18:54:32 +00:00
Al Riddoch
36a902220a Removed old python client code. 2001-10-14 18:48:06 +00:00
Al Riddoch
d8ffe97f6d * server/CommServer.cpp: Remove non-fatal "FATAL..." message when
client closes connection.

	* rulesets/Thing.cpp: If object to be created has no loc, set loc
	  to be the same as creator before passing to the factory.

	* rulesets/Entity.cpp: Clarify debug output when determining location
	  of new entities.

	* client/CommClient.cpp: Push output into debug mecanism. Switch
	  order of Create/Login for admin account so ordinary operation
	  does not issue an error. Admin account is created at startup,
	  so there is no need for the client to create it.

Al Riddoch  <alriddoch@zepler.org>
2001-10-03 10:51:43 +00:00
Al Riddoch
2fd239e63c * tools/cycmd.cpp: Ensure that login op is flushed after it is sent.
* server/Player.cpp: Arg order of std::string.compare() is
	  incompatable between recent libstdc++ versions. Switch
	  back to old version, still in most common use.

	* rulesets/Thing.cpp: Set refno on ops handled in game.

	* rulesets/Python_API.cpp: Modify Entity() python constructor
	  so that commonly used attributes from old atlas are translated
	  to their modern equivalents.

	* rulesets/Py_Thing.cpp, rulesets/Py_Mind.cpp: Differentiate
	  between previously identical error messages in several places.

	* rulesets/Py_Object.cpp: Rework conversion of python dict to
	  Atlas map to be more efficient and clean.

	* rulesets/Py_Location.cpp: Rework setting of vector parts of
	  location so that it can accept vectors from python in more
	  formats, including lists and tuples.

	* rulesets/Creator.h, rulesets/Character.h, common/BaseEntity.h:
	  Re-order virtual methods declarations to fit a convention.

	* common/stringstream.h: Hardcode use of local stringstream class,
	  as the version provided with older libstdc++ seems to be broken.

	* common/database.cpp: Use the common header to pick the right
	  stringstream implementation.

	* common/BaseWorld.cpp, server/Persistance.cpp: Removed unused
	  stringstream include.

	* rulesets/Creator.cpp: Added extra debug output.

	* client/define_world.h, client/define_world.cpp, client/CommClient.h:
	  Use CreatorClient to store Creators mind, instead of BaseMind.

	* client/client.cpp,
	  client/ObserverClient.h, client/ObserverClient.cpp,
	  client/CreatorClient.h, client/CommClient.h, client/CommClient.cpp:
	  Modify method names to fit capitalisation conventions.

	* client/CreatorClient.cpp: Implement creation of in-game entities,
	  using creator entity.

	* client/CommClient.cpp: Added correct client side monitoring of
	  creator entity.

	* client/ClientConnection.h, client/ClientConnection.cpp: Added
	  pending method to establish if ops are in the queue. Switched send()
	  method so we only send ops. Add setting of serialno of sent
	  ops, starting with an offset of 512.

	* client/CharacterClient.h: Removed unused member, opFound.

	* client/CharacterClient.cpp: Debugged sendAndWait() method.

Al Riddoch  <alriddoch@zepler.org>
2001-08-16 17:39:42 +00:00
Al Riddoch
182369f6a4 * module/DataTime.h: Added includes so header is independant.
* client/CommClient.cpp: Fixed leak of operations.

	* client/CharacterClient.h, client/CharacterClient.cpp,
	  client/CreatorClient.h, client/CreatorClient.cpp:
	  Added in mind classes for handling creator on client side.

Al Riddoch  <alriddoch@zepler.org>
2001-08-14 12:49:04 +00:00
Al Riddoch
73b210279c * client/client.cpp,
client/ObserverClient.cpp, client/ObserverClient.h,
	  client/ClientConnection.cpp, client/ClientConnection.h,
	  client/define_world.cpp, client define_world.h:
	  Started re-coding of python client code in C++.

	* common/accountbase.h:
	  Database class used for simply accessing accounts.

	* common/OOGThing.cpp, common/OOGThing.h, server/Account.h,
	  server/Routing.h:
	  Moved OOGThing class into common as it is not server specific.

	* common/BaseWorld.cpp, common/BaseWorld.h,
	  server/WorldRouter.cpp, server/WorldRouter.h,
	  rulesets/Entity.h, rulesets/Py_World.cpp,
	  rulesets/PythonThingScript.cpp, rulesets/Python_API.h,
	  rulesets/Thing.cpp, rulesets/Thing.h:
	  Added base class for WorldRouter so that code that previously
	  used WorldRouter now used the interface defined by this
	  new class. This means that the code in rulesets no longer
	  has dependencies on code in server, so can be used in the client.

	* server/ExternalMind.cpp, server/ExternalMind.h,
	  rulesets/Character.h, rulesets/Creator.cpp,
	  server/Account.cpp:
	  Moved ExternalMind class into server as it is server specific,
	  so that there is no dependancy on server in rulesets.

	* server/Persistance.cpp. server/Persistance.h,
	  server/Admin.cpp, server/ServerRouting.cpp, server/server.cpp:
	  Moved high level server specific persistance class into
	  server, so there is no dependency on server in common.

	* common/database.cpp, common/database.h, server/Admin.cpp,
	  tools/cydbload.cpp, tools/cyisoload.cpp, tools/cypasswd.cpp:
	  Increases efficiency of some interfaces by passing Object::MapType
	  instead of MapType, when the value must be a map.

	* modules/WorldTime.cpp, modules/WorldTime.h,
	  rulesets/Py_WorldTime.cpp, rulesets/Python_API.cpp:
	  Brought the version of WorldTime in modules up to date, as this is
	  the version now used.

	* rulesets/Character.cpp, server/WorldRouter.cpp, rulesets/Thing.cpp,
	  server/Admin.cpp:
	  Made world objects dictionary private.

	* rulesets/EntityFactory.cpp, rulesets/EntityFactory.h:
	  Change newThing parameters so entity factory does not need to
	  know about WorldRouter.

	* server/Lobby.cpp: Added support for people and rooms attributes
	  of OOG room class.

Al Riddoch  <alriddoch@zepler.org>
2001-08-13 17:22:27 +00:00
Al Riddoch
8bea85cdfc * Fixed up build files to install in a conformant way.
* acorn.vconf: Added in new building classes which set up
	  wall objects for collision purposes. Building now seem to
	  work.

	* common/database.cpp, common/database.h, common/globals.cpp,
	  common/globals.h, rulesets/Python_API.cpp, server/server.cpp,
	  watchdog/control.c, watchdog/watchdog.c: Implemented
	  correct way of getting installation directories from
	  autoconf.

	* rulesets/Movement.h, rulesets/Movement.cpp, rulesets/Pedestrian.h,
	  rulesets/Pedestrian.cpp: Fixed collisions with the solid
	  wall of a structure.

	* rulesets/Thing.cpp: Modified setup operation so that a sight
	  of create operation is always generated even if setup is
	  overloaded.

	* Many fixes from Anders Petersson to get the build working under
	  debian.

Al Riddoch  <alriddoch@zepler.org>
2001-06-16 14:19:00 +00:00
Al Riddoch
48e608a2bb * Change default acorn script to be text, and made the alternative
acorn graphic.

	* Fixed addition of client scripts to distribution.

Al
2001-01-18 22:56:18 +00:00
Al Riddoch
3fa7a5867a Added missing client scripts 2001-01-14 20:48:02 +00:00
Al Riddoch
257cc93ab0 * Copied client code across from cyphesis, and created infrastructure
so it can be cleanly installed and run with the rest of cyphesis.

I believe that I am now ready for Acorn 0.3, though I suspect I am wrong.
2001-01-13 16:34:16 +00:00
Al Riddoch
7129bb8b8c Initial check of work in progress converting cyphesis python code over to
C++. Don't do anything to this code until I have finished moving the rest
of the code into place.

Al
2000-08-13 20:36:18 +00:00