summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* Added a comment to TransformableComponent describing the ferrying stipulationKelly Rauchenberger2018-05-091-0/+6
|
* Unferried players while changing mapsKelly Rauchenberger2018-05-093-12/+36
| | | | This fixes the third problem described in 8f1c4f1 -- that if a ferried body's transform is modified outside of the PonderingSystem, it will not be unferried as appropriate. This does still require that any future code that modifies a body's transform also unferries the body first.
* Added ferrying (buggy)Kelly Rauchenberger2018-05-093-2/+89
| | | | | | | | | | | | A freefalling body is considered to be "ferried" if it is grounded by another body (not a map). Its location is then dependent on the ferry's location; in this way, the ferry carries the passenger around. This implementation is kind of buggy currently: first of all, ferrying does not work vertically upward, because the ferry will consider the passenger to be a wall and will not continue moving upward. Second, ferries are not processed before passengers, so passengers can move in a physics tick using the knowledge of a ferry's location before it moves in that tick. Third, if the transform coordinates are set by any system other than the PonderingSystem, the relative coordinates to the ferry will not be updated and the body will not be unferried if necessary. This is still a cool commit because, three years later, we have finally overcome the issue that stopped development on the original branch in 2015.
* Added simple AI implementationKelly Rauchenberger2018-05-038-3/+377
| | | | | | | | The new AutomatingSystem and AutomatableComponent are responsible for simple AI tasks. This currently is limited to moving entities at a certain speed for certain periods of time. These tasks are arranged as a set of behaviors, which are picked randomly when automation starts or when a behavior finishes executing. A behavior is a sequence of actions that run one after another. Currently, if an automated entity is blocked from moving by a collision, it will be coerced out of its intended path. This is because the automation parameters are stored as a speed and a duration, rather than a starting location and an ending location. This may end up being changed, or made configurable, as this is an early implementation of this feature and will need to be more complex later. Added an RNG object to the Game class, so that the AutomatingSystem can pick behaviors at random.
* Added missing #include <algorithm>Kelly Rauchenberger2018-04-291-0/+1
|
* Added map object collisionKelly Rauchenberger2018-04-299-396/+714
| | | | | | | | | | | | Collision checking in PonderingSystem was rewritten to work as follows: horizontal movement is step first, then vertical. In each step, the closest environmental boundary to the body is found on the axis of movement in the space traversed by the body. Then, if any map objects fall in the region between the body's old position and the environmental boundary (or body new position if no boundary was found), process collision with those bodies in increasing distance order, stopping if a collision stops movement short of where the next collision would take place. After this, process collision with all of the environmental boundaries at the axis distance found earlier, as long as movement hasn't stopped short. This is not the most optimal implementation, and there is a lot of code repetition, but it is a start and it works. All map objects currently function as walls. This fixes the bug where you could, with pixel-perfect precision, jump into the corner of a wall tile. The top of the hitbox for the spike tile was lowered by one pixel. This fixes a problem where if the player is halfway on a floor tile and halfway over a spike tile, the floor tile would not stop the spike tile from being processed, and the player would die.
* Implemented map object spritesKelly Rauchenberger2018-04-284-7/+116
| | | | Map objects cannot be interacted with or collided with yet but the sprites are loaded.
* Moved stb_image.h to a vendor folderKelly Rauchenberger2018-04-285-12/+9
|
* Restructured the way the world is loadedKelly Rauchenberger2018-04-2823-1041/+1155
| | | | | | | | | | 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.
* EntityManager const-correctnessKelly Rauchenberger2018-04-252-12/+21
|
* Fixed moving platform sprite widthKelly Rauchenberger2018-03-051-1/+1
|
* Fixed libpng warning when loading Starla.pngKelly Rauchenberger2018-03-051-0/+0
|
* Added entity indexingKelly Rauchenberger2018-03-058-10/+70
| | | | Changed the world format so that map objects are indexed (per map). The next available map object index is cached for each map.
* Added freefalling terminal velocityKelly Rauchenberger2018-02-192-0/+7
|
* Added player death and event schedulingKelly Rauchenberger2018-02-1817-20/+348
| | | | Also added ability to make sprites flicker, to freeze physics for an entity, and to freeze progression of a sprite's animation loop.
* Implemented map adjacencyKelly Rauchenberger2018-02-1815-160/+717
| | | | | | This brings along with it the ability to move to different maps, for which the PlayingSystem and PlayableComponent were introduced. The PlayingSystem is a general overseer system that handles big picture stuff like initializing the player and changing maps. The PlayableComponent represents the player. While the ControllableComponent is also likely to always only be on the player entity, the two are distinct by separation of concerns. This also required a refactoring of how collisions are processed, because of a bug where the player can move to a new map when horizontal collisions are checked, and vertical collisions are skipped, causing the player to clip through the ground because the normal force was never handled.
* Refactored rendererKelly Rauchenberger2018-02-1627-951/+1631
| | | | | | Renderer is basically now more C++'y, as it makes more use of classes (a lot of GL types have been wrapped), and the renderer itself is now a class. The monitor mesh is also now indexed. Tweaked the NTSC artifacting after inadvertently fixing a bug with the way the image was loaded.
* Fixed inconsistent rendering failureKelly Rauchenberger2018-02-139-42/+54
| | | | | | | | | | The issue appears to have been caused by blending with unset alpha channels. Also included the re-ordered player character sprite image. The CMake file has been updated to include linking against some Apple libraries that are usually already included in GLFW3. refs #1
* Merge branch 'master' into es-rewriteKelly Rauchenberger2018-02-124-76/+17
|\
| * Modernized CMake filesKelly Rauchenberger2018-02-083-76/+17
| | | | | | | | Also removed an unnecessary cmake package helper.
| * Fixed error opening map editor on macOSKelly Rauchenberger2018-02-081-0/+1
| |
* | Abstracted behavior related to "orientable" entitiesKelly Rauchenberger2018-02-1212-207/+393
| | | | | | | | | | | | | | | | 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.
* | Implemented map rendering and basic collisionKelly Rauchenberger2018-02-1117-31/+27512
| | | | | | | | Only wall and platform collision currently works, and map edges are not currently implemented.
* | Moved sprite rendering into AnimatingSystemKelly Rauchenberger2018-02-088-68/+96
| | | | | | | | Refactored how systems work slightly. Now, rendering can be done by a number of systems working together. Since the AnimatingSystem handles the animation of sprites, it should also handle the rendering of them. Because of this, the RenderingSystem has been removed.
* | Introduced animated spritesKelly Rauchenberger2018-02-0818-183/+521
| | | | | | | | Also restyled a lot of the code.
* | Fixed behavior of letting go of the right buttonKelly Rauchenberger2018-02-071-1/+1
| |
* | Inlined some componentsKelly Rauchenberger2018-02-079-238/+210
| |
* | Merge branch 'master' into es-rewriteKelly Rauchenberger2018-02-075-14/+23
|\|
| * Made some fixes to rendering I guessKelly Rauchenberger2018-02-044-14/+16
| | | | | | | | | | This is pretty old so I'm not exactly sure what it does but without it, the monitor gets rendered upside down.
| * Updated CMakeLists.txtKelly Rauchenberger2018-02-041-0/+6
| |
* | Changed EntityManager to dense vectorKelly Rauchenberger2018-02-075-124/+184
| | | | | | | | | | | | | | | | This should improve speed, because entity lookup will be O(1) instead of O(log n). Deletion is also O(1). Insert stays at potentially O(n), but still should be overall faster than the previous method. Also replaced some asserts with exceptions. Also made Component polymorphic so that deletion actually works properly.
* | Whitespace changesKelly Rauchenberger2018-02-0519-194/+194
| |
* | Removed bare pointer from Sound classKelly Rauchenberger2018-02-051-29/+32
| | | | | | | | Also whitespace changes.
* | Merge branch 'master' of http://github.com/hatkirby/therapy into es-rewriteKelly Rauchenberger2015-12-171-4/+7
|\|
| * Updated CMakeLists.txt so that it can find GLFW3 with pkg-config`Kelly Rauchenberger2015-12-171-4/+7
| |
* | Player now movesKelly Rauchenberger2015-06-2623-61/+642
| |
* | Now displaying player characterKelly Rauchenberger2015-06-1812-152/+270
| |
* | Wrote EntityManagerKelly Rauchenberger2015-06-1132-1994/+294
|/
* Redesigned the moving platform spriteKelly Rauchenberger2015-03-205-1/+1
|
* Fixed bug allowing player to jump through walls when crossing a vertical map ↵Kelly Rauchenberger2015-03-191-5/+5
| | | | | | boundary It turns out that it is somewhat confusing that GAME_HEIGHT != MAP_HEIGHT*TILE_HEIGHT
* Implemented a simple AIKelly Rauchenberger2015-03-1914-102/+436
|
* Map editor can now edit properties for objects (breaks main game build)Kelly Rauchenberger2015-03-1914-145/+716
|
* Wrote an XML Schema describing maps file and also changed the spec a bitKelly Rauchenberger2015-03-1815-772/+620
|
* Game can now read map file from map editor (also added new map)Kelly Rauchenberger2015-03-1813-172/+421
|
* Map editor stops highlighting cursor when you scroll off editable map areaKelly Rauchenberger2015-03-182-0/+23
|
* Added ghosts of adjacent warp maps to map editor widgetKelly Rauchenberger2015-03-183-18/+72
|
* Map editor widget now starts out centeredKelly Rauchenberger2015-03-183-7/+12
|
* Map editor can now define actions to occur when the player goes off a ↵Kelly Rauchenberger2015-03-1716-158/+804
| | | | specified edge of the map
* Fixed bug with starting position label going under the adjacent button in ↵Kelly Rauchenberger2015-03-172-2/+5
| | | | map editor
* Fixed bug with placing entities in map editorKelly Rauchenberger2015-03-172-13/+13
|