|
|
6783dac9e0
|
a bit of bug fixing regarding implementation of dijstra's algorithm (next to fix: query towards quad/platform tree)
|
2025-01-20 02:38:22 +00:00 |
|
|
|
322a394138
|
progress towards implementing dijkstra's algorithm (next: test by printing to see if it works)
|
2025-01-20 01:25:09 +00:00 |
|
|
|
3939b0b3e2
|
done implementing functor to search through quad tree, adding to priority queue (for Dijkstra's algorithm)
|
2025-01-19 23:56:52 +00:00 |
|
|
|
1ba42462ba
|
progress implementing dijkstra's algorithm for path finding using quad trees
|
2025-01-19 22:45:51 +00:00 |
|
|
|
e64c3bc00d
|
add contains function to bin-vec.sml which returns true if the vector contains the value
|
2025-01-19 21:32:17 +00:00 |
|
|
|
e619fd1c05
|
change API of BinVec
|
2025-01-19 13:03:16 +00:00 |
|
|
|
4459a676ac
|
implement bin-vec (vector that always stores its elements in order, for binary search)
|
2025-01-19 12:06:56 +00:00 |
|
|
|
8c651b2221
|
implement heap which stores distance for later use with Dijkstra's algorithm
|
2025-01-19 11:07:45 +00:00 |
|
|
|
84ea0ce24b
|
code functor to fold through a specified region of the quad tree, without having to allocate an intermediary list or using a closure (which both have runtime costs)
|
2025-01-18 22:54:34 +00:00 |
|
|
|
2c6b1556d1
|
implemented four functions: is it possible to reach platform from above, is it possible to reach from below, or from left or right
|
2025-01-18 22:18:05 +00:00 |
|
|
|
edf7d4c8dc
|
fix bug in physics.sml where player/enemy would drop below continuously past multiple platforms even if they intended to drop below platforms only once (fixed by setting yAxis to 'FALLING' if there are no collisions at all and player is in DROP_BELOW_PLATFORMS state)
|
2025-01-18 22:13:16 +00:00 |
|
|
|
6812f61dcc
|
add function to search leftwards
|
2025-01-18 19:55:52 +00:00 |
|
|
|
c99999c0c9
|
fix calculated distance for helpGetRightwardsPath (reused same distance calculate as in helpGetUpwardsPath before)
|
2025-01-18 13:52:21 +00:00 |
|
|
|
d59b6eab82
|
code functioln to get rightwards path
|
2025-01-18 13:29:56 +00:00 |
|
|
|
00a9f22151
|
keep track of visited nodes to prevent infinite recursion
|
2025-01-18 10:09:08 +00:00 |
|
|
|
f796f2f858
|
have functiokn to get upwards path semi-working
|
2025-01-18 00:25:27 +00:00 |
|
|
|
560ef3f99a
|
add function to get ID of first item found at location in quad tree (returns ~1 instead of NONE if no item is found)
|
2025-01-17 21:48:18 +00:00 |
|
|
|
cbddc03a88
|
progress towards implementing follow slime (slime only tries jumping when platform is reachable now)
|
2025-01-17 13:18:02 +00:00 |
|
|
|
20e34ca0d5
|
add function that returns true if we can jump on platform
|
2025-01-17 12:29:07 +00:00 |
|
|
|
c7bd95e5d7
|
distinguish between standing on wall vs standing on platform (platform can be jumped on but wall cannot)
|
2025-01-17 11:49:34 +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 |
|
|
|
90c29ebe24
|
make enemy's speed slightly slower than player's speed
|
2025-01-13 12:53:50 +00:00 |
|
|
|
2c643a1500
|
change speed that projectile moves at (should be faster than player)
|
2025-01-13 12:46:10 +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 |
|
|
|
ce7520ce81
|
derive EnemyPhysics module from functor
|
2025-01-12 23:33:20 +00:00 |
|
|
|
27fbe1c12e
|
create enemy patch structure
|
2025-01-12 23:28:03 +00:00 |
|
|
|
ca6b0b2160
|
done refactoring player-specific logic, and also enemy-specific logic, from player-enemy.sml (which now just calls different functions from the player.sml and enemy.sml modules, to help player-enemy.sml maintain a high level overview)
|
2025-01-12 22:14:36 +00:00 |
|
|
|
3dddd096f7
|
a bit of additional refactoring
|
2025-01-12 22:10:58 +00:00 |
|
|
|
8052ad53f7
|
a bit of refactoring and clearer naming
|
2025-01-12 21:59:33 +00:00 |
|
|
|
442c489af7
|
remove unused 'enemyTree' value returned from player-enemy.sml function
|
2025-01-12 19:31:29 +00:00 |
|
|
|
8906d244eb
|
extract player patch types and functions to its own module
|
2025-01-12 19:25:05 +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 |
|
|
|
9280a12911
|
functorise physics for player
|
2025-01-12 12:36:26 +00:00 |
|
|
|
ec44dd9966
|
refactor constants out from player.sml
|
2025-01-12 11:46:32 +00:00 |
|
|
|
a7c2e2ef01
|
progress moving constant values into own module
|
2025-01-12 07:18:44 +00:00 |
|
|
|
49282887e3
|
remove enemyTree (quad tree holding enemies) from game type as this is not static geometry and, since enemies are moving every frame, this should also be regenerated on every frame
|
2025-01-11 22:06:08 +00:00 |
|
|
|
8498eacde2
|
a little bit of refactoring
|
2025-01-11 21:58:34 +00:00 |
|
|
|
75e28b892e
|
done getting player's projectiles to collide with enemies successfully, and tested (although the code of the enemy reacting to the player is not the best)
|
2025-01-11 21:35:55 +00:00 |
|
|
|
0367b3a23c
|
progress detecting collision between enemy and player's projectile, and decrementing enemy's health once detected
|
2025-01-11 13:45:29 +00:00 |
|
|
|
df0926195d
|
decide on a different structure/module for each collision
|
2025-01-10 10:12:59 +00:00 |
|
|
|
f9f56e3b38
|
make sure projectiles are shot from the same x/y coordinates they are spinning at from the player
|
2025-01-09 15:00:56 +00:00 |
|
|
|
06bc691c7f
|
done drawing player projectiles
|
2025-01-09 12:11:41 +00:00 |
|