Commit graph

1907 commits

Author SHA1 Message Date
Erik Ogenvik
1320c836d0 Added a Propel property, describing propel force.
This is mainly the force used to propel characters forward. I.e.
walking, running and so on.
For now it's not activated, since we rely on proper physics to be
implemented first.
2016-06-26 20:17:18 +02:00
Erik Ogenvik
cb493811b3 Added "forces" property.
This property describes all external forces affecting the entity.
2016-06-26 20:17:18 +02:00
Erik Ogenvik
12a38b3d0f Added a mode specification property.
This property tells how the entity should behave when put into
different modes. Currently we only allow for specific transformations
to occur.

The mode specifications are registed in properties where "mode-" forms
a prefix, and the mode a suffix. For example, "mode-planted".
This also does away with the "plantable" property.
2016-06-26 20:17:18 +02:00
Erik Ogenvik
8cfe2ba0eb Altered signature to prevent ambiguity. 2016-06-26 20:13:31 +02:00
Erik Ogenvik
ca3588041a Affect position directly.
No need to use an external transform for this kind of
ajustment.
2016-06-26 20:13:31 +02:00
Erik Ogenvik
d5d11df11e Let "transforms" property determine pos and orient
Instead of directly setting position and orientation we've now
added a "transforms" property. This property contains zero or many
transformations. The result of these is what drives changes to an
entity's position and orientation.
By cleanly separate disrete transformations we can more easily undo
or alter them. This allows us to do things where the position or
orientation of an entity is affected by other properties, or other
entities.

The client protocol is intact. Changes to position and orientation is
still sent the same way, by specifying "pos" and "orientation". However,
these values will now not be written directly to corresponding values on
 the entity. Instead they will first be written to the "transforms" property,
with the final values being a result of combining all data in the property.
2016-06-26 19:11:15 +02:00
Erik Ogenvik
8f8405e5bc Combine rotation from op with archetype.
We want to allow for archetypes with orientations, along with also
sending orientations in Create ops. To do this we need to combine
these two rotations into a final orientaton.
2016-06-26 19:08:54 +02:00
Erik Ogenvik
d7bf27d180 Take plantable adjustment into account.
When an entity which is "planted" is adjusted, we also look
for if there's any offset specified for the height adjustment.
2016-06-26 19:08:54 +02:00
Erik Ogenvik
219d847bfd Added a "plantable" property.
This describes how entities should behave when they are put in the "planted"
specifically how they should be oriented and adjusted in vertical position.
2016-06-26 19:03:19 +02:00
Erik Ogenvik
e343477341 Fixed incorrect type specified. 2016-06-26 13:18:56 +02:00
Erik Ogenvik
e9513169e6 Start visibility test from observer for broadcasts. 2016-06-22 17:29:27 +02:00
Erik Ogenvik
4f368a6fbc Let parent domain decide visibility and movement.
When visibility is determined, we always query the parent domain, and
never any ancestor domain.

The idea is to make the system more easy to follow.
2016-06-22 17:29:27 +02:00
Erik Ogenvik
eb81c7eecb Use "git describe" for buildid.
Also removed circular dependency as well as CVS leftover script.
2016-06-22 17:06:50 +02:00
Erik Ogenvik
bf3a772310 Send knowledge about "origin" to new minds.
The "origin" is the position where the entity is created. This is useful
for goals.
2016-05-24 11:20:28 +02:00
Erik Ogenvik
f56ecc9119 Fixed sending initial thoughts.
Which is done by wrapping a Set op within a Think op.
2016-05-23 22:18:01 +02:00
Erik Ogenvik
7b0d30680c Setup steering.
The setup is that steering is handled separately from the normal mind
ticks. At a closer interval (0.2 seconds currently) steering will be
evaluated.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
185f6c31a8 Removed circular dependency. 2016-02-07 14:09:33 +01:00
Erik Ogenvik
d3b9d1788b Use Atlas 0.7. 2015-06-04 21:41:27 +02:00
Erik Ogenvik
3ee07ea63c Removed build warning. 2015-05-28 22:23:12 +02:00
Erik Ogenvik
3966c31fdb Allow directory for binaries to be set.
By default it will use binreloc to figure out where it's running, as
with other directories.
2015-05-28 21:22:11 +02:00
Erik Ogenvik
3b70e9c3cb Regularly persist thoughts to database.
Instead as before only persisting at shutdown.
2015-05-26 22:27:39 +02:00
Erik Ogenvik
140d124028 Removed excessive logging. 2015-05-24 12:52:37 +02:00
Erik Ogenvik
f5d6eaf033 Make Cyphesis spawn AI clients automatically.
By default an AI child process is spawned at startup, unless the
"aiclients" config value is set to 0.
2015-05-24 11:25:08 +02:00
Erik Ogenvik
74bb437540 Fixed tests. 2015-05-24 11:25:08 +02:00
Erik Ogenvik
dd352ec759 Refactor ai client to use op dispatch. 2015-05-24 11:25:08 +02:00
Erik Ogenvik
b4572d67e6 Moved operation dispatch to separate class.
So it can better be reused.
2015-05-24 11:25:08 +02:00
Erik Ogenvik
079b751bfc Don't request possession if no mind prop data. 2015-05-24 11:25:07 +02:00
Erik Ogenvik
ad4a65aaef Improve handling of already managed minds.
Though we need to alter the way the MindProperty requests possessions,
as we don't want to generate possession requests for anything that's
handled by a client anyway. Problem right now is that we won't know that
at the time of MindProperty being applied.
2015-05-24 11:25:07 +02:00
Erik Ogenvik
d67ec8ac44 Make sure minds are repossessed correctly. 2015-05-24 11:25:07 +02:00
Erik Ogenvik
7bcb39a39f Fix logging. 2015-05-24 11:25:07 +02:00
Erik Ogenvik
945a2dd3fe Improve external minds management.
We now register a an external mind with the ExternalMindsManager and
then let the manager make sure that there's an external mind connected.
When the external client is disconnected the manager will try to find a
new client to handle the mind.
2015-05-24 11:25:07 +02:00
Erik Ogenvik
a64fb3ca48 Removed unneeded include. 2015-05-24 11:25:07 +02:00
Erik Ogenvik
c4f44bb277 Deregister possessive clients correctly. 2015-05-24 11:25:07 +02:00
Erik Ogenvik
af5c4df216 Send possession requests to the connected account. 2015-05-24 11:25:07 +02:00
Erik Ogenvik
5f4923e456 Provide better log output. 2015-05-24 11:25:06 +02:00
Erik Ogenvik
2c3a4cd0bd Provide all requried data for possession. 2015-05-24 11:25:06 +02:00
Erik Ogenvik
5d11e1cbb8 Store Link instances rather than Router.
Note that I'm still not sure how this is done in a canonical way; I'm
learning as I go along.
2015-05-24 11:25:06 +02:00
Erik Ogenvik
f8932858fd Enable aiclient.
The idea is that the aiclient runs in a separate process and handles all
AI functionality.
This is done by having a "possession" client which recieves possession
requests from the server, and spawns new AI clients for each request.
2015-05-24 11:25:06 +02:00
Erik Ogenvik
ea3f12b07b Allow clients to register as AI handlers.
This is done by setting the account attribute "possessive" to 1.
2015-05-24 11:25:06 +02:00
Erik Ogenvik
715f099cea Request possession when mind is created. 2015-05-24 11:25:06 +02:00
Erik Ogenvik
4fad524f6c Added initial classes for handling ai clients. 2015-05-24 11:25:06 +02:00
Erik Ogenvik
f5dae1fba7 Rename Teleport* to Possess*
So that the functionality can be used in more general situations.
2015-05-24 11:25:06 +02:00
Erik Ogenvik
1415c3dbaa Fixed bug with spawn default data.
The first entity created on the spawn would actually alter the default
data of the spawn.
2015-05-02 23:15:14 +02:00
Erik Ogenvik
8ce91c656f Merge remote-tracking branch 'ytaben/entity_filter' 2015-04-18 22:25:27 +02:00
Erik Ogenvik
7ec0ea3dd4 Integrate signal handling with boost::asio.
When a signal is caught we want to exit from the boost::asio loop.
However, we can't do this by pusing another handler onto the io_service,
since this will involve a malloc call, and this can cause a deadlock (if
the signal handler is invoked from within a malloc call).
Therefore we instead need to use the signal_set functionality of
boost::asio, which guarantees that signal handling is done without
issue.
2015-04-10 22:00:56 +02:00
Erik Ogenvik
81a7c3f1d9 Format logging a bit better. 2015-04-10 21:58:31 +02:00
Erik Ogenvik
766f4e361b Apply time multiplicator when calculating time. 2015-04-09 13:44:46 +02:00
Erik Ogenvik
ec9cad7eab Update monitors after ops have been handled. 2015-04-09 10:57:45 +02:00
Erik Ogenvik
29b4de49dc Fixed incorrect format. 2015-04-09 10:57:35 +02:00
Erik Ogenvik
4e9419c564 Make sure to always process any immediate ops first.
We need to check for immediate ops in each iteration, since these might
have been added as a result of the last op.
2015-04-08 23:25:11 +02:00