Commit graph

12 commits

Author SHA1 Message Date
Erik Ogenvik
6e6fe3b9b6 Handle (dis)appear ops when moving between locs. 2017-06-27 21:06:07 +02:00
Erik Ogenvik
ef031c3f7e Fixed tests. 2017-01-31 22:23:44 +01:00
Erik Ogenvik
bd42f89527 Removed unused method. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
fe709529fe Synchronize visibility methods in Domain.
So that they behave the same way.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
aa88be1ea7 Make sight checks more efficient. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
5d98e768c7 Refactored visibility handling.
To allow for better performance when scaling to larger worlds we can't keep
iterating though all entities when checking visibility.
Instead we now have the PhysicalDomain keep track of all entities that are
either observering something, or being observed.
Since Bullet already contains efficient structures for doing space partioning and
collision detections we'll resuse that for visibility checks.
Each entity now has a sphere of "visibility" with which each perceptive entity does
checks against.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
07853ce6c2 Removed obsolete collision code. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
b77bfbe013 Remove old functionality for adjusting height. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
5754a5dfa1 Initial work on Bullet powered physical domains. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
1f616c869b Fixed tests after Plantable property. 2016-06-26 19:08:54 +02:00
Erik Ogenvik
760f92f707 Alter how visibility is determined.
When checking visibility, we now use the Domains more extensively.
The base rules are:
* If an entity is a child of a domain-less entity, visiblity for the
  child is the same as for the parent.
* If an entity is a child of a domain-holding entity, visibility is
  determined by the Domain.
* Entities cannot observe things above a Domain.
* Entities can observe things below a Domain, if the Domain allows it.

These rules are not yet set in stone. We need some more time figuring out
exactly how we want visibility implemented. We're striving for a balance
between a powerful but not too complex system, with good performance.
2016-06-22 17:29:27 +02:00
Erik Ogenvik
125a475cdb Added missing class. 2015-04-15 23:16:53 +02:00