|
|
fac7a81767
|
trace path we can (move right + jump) using quad tree, as it is easier to implement than a pure math based approach
|
2025-01-29 19:12:24 +00:00 |
|
|
|
abeff178c6
|
fix bug of enemy occasionally dropping off platform occasionally (incorrect int comparison in getMoveLeftPatches function)
|
2025-01-29 02:56:21 +00:00 |
|
|
|
e2f5f18089
|
when enemy jumps or drops without needing to move horizontally to reach platform, tell enemy to stay still so we don't risk falling off platform
|
2025-01-29 02:23:44 +00:00 |
|
|
|
296e120d12
|
delete redundant case statement in enemy-behaviour.sml, where bestPath is empty (same case expression is repeated in startPatrolPatches function so doesn't need to be repeated)
|
2025-01-29 00:45:49 +00:00 |
|
|
|
5d590c84a9
|
add code for FOLLOW_SLIME to patrol in the same direction the player is in, when slime reaches a new platform.
|
2025-01-29 00:22:48 +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 |
|
|
|
b7a609b447
|
fix quad tree queries (queries should not choose only one quadrant because they may validly visit two or more quadrants if query covers two leaf nodes), resulting in regressions. Fix one regression: reimplement wall patches (this time also optimised because there is no intgermediary list)
|
2025-01-27 04:52:49 +00:00 |
|
|
|
1c4ff62744
|
small amendment to getPatrolPatches: make sure enemy is always fully on platform while patrolling (does not go off edge) as this is more predictable + looks better
|
2025-01-26 23:32:20 +00:00 |
|
|
|
8f7bb3bb16
|
when FOLLOW_SLIME has no following to do, call patrol patches so that it at least patrols area
|
2025-01-26 14:22:27 +00:00 |
|
|
|
bb0cf6bd33
|
better path landing implemented, making sure enemy fully overlaps platform they are trying to reach, and enemy's jump is clearer (before, when enemy landed on platform, they went straight to the top of the platform, but now they jump a little over the platform which looks clearer)
|
2025-01-26 13:23:20 +00:00 |
|
|
|
c25afb6f03
|
small amendment do getMoveLeftPatches (change how yDiff is calculated, (platY - ey) instead of (ey - platY)
|
2025-01-25 19:43:56 +00:00 |
|
|
|
616d97e6fd
|
verify that getMoveRightPatches works as intended through manual testing and platform placement adjustments
|
2025-01-25 09:53:54 +00:00 |
|
|
|
01d9c2bd47
|
refactor physics.sml so that we always set plat ID of player/enemy, when player or enemy stands on new platform, and make changes to enemy-behaviour.sml in calculation to jump to the top-right after testing
|
2025-01-25 09:17:58 +00:00 |
|
|
|
c8f56f3077
|
attempt at coding functionality to jump/drop when platform is to the right and not overlapping with current platform
|
2025-01-25 08:34:05 +00:00 |
|
|
|
d8af1da6de
|
prevent subscript error from occurring by validating eID and pID are both different from ~1, as the PathFinding.start function expects this to be the case
|
2025-01-25 00:48:56 +00:00 |
|
|
|
0be8e0dc5f
|
progress coding function to make FOLLOW_SLIME go rightwards if next platform is towards the right
|
2025-01-25 00:23:30 +00:00 |
|
|
|
7a5517571d
|
add functionality for enemy to walk to appropriate position if next platform is below current one, but only partially overlapping with current platform so enemy will not reach it if they drop down from current position
|
2025-01-24 22:51:20 +00:00 |
|
|
|
5e6a831add
|
write 'getJumpPatches' function in a slightly less redundant way
|
2025-01-24 09:48:57 +00:00 |
|
|
|
d07b0a35ca
|
amend minor regression bug: in 'canJump' function, check to make sure prevPlatform is lower than nextPlatform
|
2025-01-24 02:12:04 +00:00 |
|
|
|
02d94fc3c7
|
handle not-so-uncommon edge case: when platform enemy is on can be jumped from to reach next platform, but enemy is not in a position to jump (top platform slightly overlaps bottom platform in x-axis), make enemy walk left/right first so enemy reaches point where it is possible to jump from
|
2025-01-24 02:09:20 +00:00 |
|
|
|
e644160e38
|
enemy dropping below platform (without any bugs) is fully implemented now
|
2025-01-23 01:06:16 +00:00 |
|
|
|
efbf0c7da9
|
progress towards letting enemy drop below platform if path to player is there
|
2025-01-23 00:01:15 +00:00 |
|
|
|
6c1c6b9a04
|
progress making enemy follow player
|
2025-01-21 23:54:53 +00:00 |
|
|
|
282d72b840
|
rip out print statements which were solely for debugging
|
2025-01-21 22:46:04 +00:00 |
|
|
|
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 |
|
|
|
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 |
|
|
|
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 |
|