Commit Graph

18 Commits

Author SHA1 Message Date
e23e2f0997 precompute graph to be used for dijkstra's algorithm, resulting in CPU usage that never exceed 7/home/humza/Downloads/sml/oh-my-stars/fcore/path-finding.sml with 5 enemies and eliminating lag 2025-01-31 04:32:53 +00:00
9b7d7a1396 fix compile errors after previous commit (which involved reimplementing the quad tree to eliminate the possibility of a class of bugs I was experiencing; the problem was that the quad bounds were being passed recursively in different functions, but the long argument list in these functions made it difficult to see where the mismatch was) 2025-01-27 23:41:59 +00:00
6369be21fa tentatively refactor quad tree to make it more succinct + eliminate a class of potential bugs (passing wrong quad values through recursion) 2025-01-27 23:27:52 +00:00
67a4ad5664 start implementing patches to follow player (basic; shouldn't use path finding like Dijkstra's algorithm) 2025-01-17 11:43:49 +00:00
a05f211428 pass player record as argument for enemy filtering functiokns, so enemy can react to player state (position, etc.) 2025-01-16 08:15:29 +00:00
0c01b224d0 slight refactoring to help with extensibility of adding enemy variants later 2025-01-14 11:50:27 +00:00
2a940a9392 done with patroll function, successfully making enemy switch directions while patrolling 2025-01-13 12:40:23 +00:00
ee5f3c628d progress towards having enemy patrol area when on wall/platform 2025-01-13 11:28:49 +00:00
690bfe75da make plan for writing how enemy should patrol on wall/platform 2025-01-13 11:02:34 +00:00
50238b8dac done getting physics + environment to work on enemy as well, in addition to player 2025-01-13 09:52:25 +00:00
4484eb0ef0 functorise environment collision patches 2025-01-13 09:42:32 +00:00
7290d9865d have enemy physics working and applied to enemy 2025-01-12 23:58:21 +00:00
8052ad53f7 a bit of refactoring and clearer naming 2025-01-12 21:59:33 +00:00
e280274ed0 add xAxis and yAxis fields to enemy type 2025-01-12 13:07:32 +00:00
c4989711df refactor constants out of enemy.sml 2025-01-12 12:53:41 +00:00
8498eacde2 a little bit of refactoring 2025-01-11 21:58:34 +00:00
8804847d7a use binary search to find enemy with ID in 'GameUpdate.checkEnemies' function, because we previously relied on the enemy's index 2024-12-27 18:26:57 +00:00
05cc1d3a46 begin coding enemy 2024-12-19 03:08:26 +00:00