summary refs log tree commit diff stats
path: root/src/transform_system.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added "floating" sprite attributeStar Rauchenberger2021-07-061-4/+8
| | | | Sprites with this flag enabled will ignore map collision.
* Added sliding around solid tilesKelly Rauchenberger2021-03-111-1/+69
| | | | #3
* Simplified collision detection outputKelly Rauchenberger2021-03-111-37/+47
| | | | It is no longer split into horizontal and vertical results. Also, the collision detection routine now does the work of calculating an adjusted position, instead of the caller (CharacterSystem) having to do it. This will be useful for #3.
* Fixed improperly calculated sprite hitboxesKelly Rauchenberger2021-03-111-9/+9
| | | | | | Also made sprite hitboxes bigger. #15
* Split collision detection into two phases, horizontal and verticalKelly Rauchenberger2021-03-081-1/+24
| | | | | | The whole function should probably be refactored at some point, possibly like therapy5's but that may be too complicated. #14
* Added A* pathfindingKelly Rauchenberger2021-02-271-2/+2
|
* Started working on laddersKelly Rauchenberger2021-02-241-4/+27
| | | | | | | | | | | TODO: * all the animations are weird. we will need to have an adjustable framerate bc the climbing animation does not look right at the current rate. (also remove the manual animation stuff ig) * does the medium stuff seem good and right? i am kinda not satisfied with it. * running onto a ladder causes the characters to bunch up bc the movement speed is slowed down but the trails are not doubled * no ladder running sound * shadows should vanish while on a ladder * uhh if you end a cutscene while on a ladder it resets the animation to "still" which is wrong. will this ever happen? idk * adding a sprite to your party while you are on a ladder??
* Fixed issue with double counting collisionsKelly Rauchenberger2021-02-221-4/+4
| | | | | | | | Because of an issue with how collision checking with sprites worked, it was possible that you could collide with a boundary twice (once when moving up to it, and once when moving from it to past it, instead of just one or the other) when moving up or left as long as the colliding sprite had the ID zero. This was causing a fun issue where the map change script from hallucination_interior to hallucination_cliff was getting triggered twice, but only every other time. Because we're using integers and not real numbers, we can make the boundary exclusive by adding one. The issue was also technically possible in the down and right directions, but only if the sprite ID was INT_MAX, which is unlikely to occur. It was decided that the former collision is the real one (if you start away from the boundary and then move into it).
* Added enclosure zonesKelly Rauchenberger2021-02-201-0/+37
| | | | A sprite with an enclosure zone will collide with it if it attempts to leave the area defined by the zone. This is used to make sure that wandering sprites don't end up in weird places.
* Started adding event where Claus joins the partyKelly Rauchenberger2021-02-181-0/+9
|
* Made some sprites persist between map changesKelly Rauchenberger2021-02-171-10/+0
| | | | | | The player party characters are now initialised at the start of the game and are no longer re-created after every map change. The script system takes care of moving the player into the correct position on the new map. Deleted sprite IDs are now reused the next time a sprite is created, instead of throwing out everything between maps.
* Added lightning sprite to mailbox eventKelly Rauchenberger2021-02-131-5/+17
| | | | | | | | Sprites can be destroyed now, which really just means that their index is removed from the list of active sprites. The actual memory is not freed until all sprites are deleted on map change. Sprite layers are introduced. All sprites by default are on layer 0 (Normal) which renders them in between the lower and upper map layers. There is also a layer 1 (Above) that renders above the upper map layer, and the sprite for the lightning strike uses this layer in order to not be hidden by the trees. Fixed a bug where waiting for the end of a non-looping animation would trip the flag immediately upon the final frame activating, instead of waiting the length of the last frame.
* Removed out-of-bounds tile collisionKelly Rauchenberger2021-02-101-4/+10
| | | | This allows running off screen for a map transition to happen without bumping into something that isn't there.
* Fixed issue with walking vertically into solid spritesKelly Rauchenberger2021-02-101-6/+6
|
* Map changing!Kelly Rauchenberger2021-02-091-0/+8
| | | | Also removed some dependencies on the Renderer. More changes need to be made. Fading to black before the change would be good. And making sure the characters are facing the right direction. Maybe that code shouldn't live in Game, either. Later we also want to combine the tilesets for these two maps (and any others that are on Tanetane).
* Added trigger zones to the mapKelly Rauchenberger2021-02-091-11/+20
| | | | Walking into a trigger zone runs a script.
* Added collision with other spritesKelly Rauchenberger2021-02-061-29/+101
|
* Added collidable object cacheKelly Rauchenberger2021-02-061-18/+61
|
* Moved some collision stuff into the TransformSystemKelly Rauchenberger2021-02-061-0/+67
|
* Added animation systemKelly Rauchenberger2021-02-031-4/+4
|
* Pulled transform stuff into a system (starting to do ECS stuff)Kelly Rauchenberger2021-02-031-0/+20