summary refs log tree commit diff stats
path: root/src/systems/orienting.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added target velocity HEAD masterKelly Rauchenberger2018-12-201-24/+8
| | | | | | The acceleration of a Ponderable entity is now only really a magnitude. The direction of acceleration is such that the velocity goes toward the target velocity. If accelerating would cause the velocity to pass the target velocity, it is instead set to the target. This is currently being used to 1) generalize terminal velocity due to gravity, and 2) allow an Orientable entity to accelerate quickly to a walking speed (and to a halt) rather than instantly achieve it.
* Simplified positions/sizes with vectorsKelly Rauchenberger2018-05-091-7/+7
| | | | Positions and sizes are now stored as vectors (of doubles and ints, respectively). This allows for at least minor code simplification in many places, and cleans up the CollisionParams code in PonderingSystem quite a bit.
* Restructured the way the world is loadedKelly Rauchenberger2018-04-281-11/+11
| | | | | | | | | | The World class was removed and replaced by the RealizingSystem and RealizableComponent. The realizable entity is intended to be a singleton and to represent the world. The Map class was also removed and integrated into the MappableComponent. These changes are to facilitate implementation of map objects without needing special intermediary objects (including the Map class). Now, map entities are created as soon as the world is created, and map object entities will be as well. They will simply be deactivated while the map is not active. Multiple players are now slightly better supported, which will be important in the future. This will likely become inefficient as the world becomes bigger, and some sort of sector-loading process will have to be designed. This also reduces the usefulness of EntityManager's entity-searching capabilities (which are not the most efficiently implemented currently anyway), and will likely in the future require some added functionality to better search subsets of entities. A lot of the components were also rewritten to use bare member variables instead of accessor methods, as they never had special functionality and just took up space. These components were also documented.
* Added player death and event schedulingKelly Rauchenberger2018-02-181-12/+6
| | | | Also added ability to make sprites flicker, to freeze physics for an entity, and to freeze progression of a sprite's animation loop.
* Abstracted behavior related to "orientable" entitiesKelly Rauchenberger2018-02-121-0/+236
A lot of the stuff that ControllingSystem did to control the player character was moved into the new OrientingSystem. This is so that the player, or any player-like entities, can also be controlled by AI, with the underlying behavior being delegated in the same way as if the player were being controlled by the user. Fixed the issue where, if the player were blocked while moving horizontally, they would remain blocked even if vertical movement were to remove the collision. Fixed cases of the player animating incorrectly after performing certain movements.