summary refs log tree commit diff stats
path: root/src/behaviour_system.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Simplified collision detection outputKelly Rauchenberger2021-03-111-1/+1
| | | | 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.
* Added "let's switch places!" Claus spriteKelly Rauchenberger2021-03-091-14/+19
| | | | | | He will wander randomly until you get close, and will then run at you. Talking to him or bumping into him does nothing currently. If you move out of his range of interest he will go back to wandering at a walking pace. #10
* Handled case where a pathfollowing sprite overshoots its destinationKelly Rauchenberger2021-03-021-0/+15
| | | | This may happen due to lag or due to debugging with lldb. What happens is that 60 times a second, the engine will check whether the direction toward the current endpoint is equal to the direction in the pathfinding instruction, and if it isn't (because the sprite has gone past the endpoint) then it sets the sprite's position to the endpoint instantly so that the pathfinding can continue.
* Started writing the Mixolydia scene!Kelly Rauchenberger2021-03-011-0/+1
| | | | | | Looking pretty good so far. TODO: direction facing functions have inverted Y coordinate. confusion expression doesn't exist yet. rest of scene.
* Pathfinding should be more biased toward straight lines nowKelly Rauchenberger2021-02-281-2/+4
|
* Added A* pathfindingKelly Rauchenberger2021-02-271-1/+170
|
* Added a debug consoleKelly Rauchenberger2021-02-211-0/+2
| | | | | | | | Open it by pressing backtick, close it by hitting escape. Pressing backtick does not open it in release builds. Current shortcomings: opening it for the first time also types a backtick for some reason, but not on subsequent times. Also, it doesn't create a coroutine, so any script function that yields is going to fail. This also added a "is gameplay paused" flag to Game, which will be useful for adding a pause menu.
* Added sprite pausingKelly Rauchenberger2021-02-211-1/+1
| | | | | | All sprites are now paused when a cutscene starts and unpaused when it ends. Pausing means that the CharacterSystem and BehaviourSystem will not process them in their tick. This allows specific sprites to be unpaused during cutscenes if movement is needed. The player character is halted and made non-controllable by the script when the cutscene starts and made controllable again when it ends. It is important to remember that if interacting with a sprite that might be moving, you have to manually call Halt() on them in their script to make them stop moving.
* Added a randomly wandering Ionia to the mapKelly Rauchenberger2021-02-201-0/+32