|
|
f6cd818c42
|
display fieldVec which is more accurate to the attack's hitbox for now
|
2025-02-07 10:40:47 +00:00 |
|
|
|
35eab0f789
|
reimplement attack patches (todo: add an int to the MAIN_ATTACKING variant to make the attack grow past some limit, and a bool to indicate whether the attack should grow in length or shrink)
|
2025-02-07 09:10:10 +00:00 |
|
|
|
f5071a953b
|
make sure playedr only checks collisions with enemy in the case that player was previously attacked
|
2025-02-06 17:42:45 +00:00 |
|
|
|
e1e20230d6
|
rip out player-enemy.sml and let player react to enemy collisions independently of enemy reaction to player
|
2025-02-06 17:37:48 +00:00 |
|
|
|
886e3a674d
|
progress checking collisions of enemy inside functor instead
|
2025-02-06 09:53:31 +00:00 |
|
|
|
7142f5dc66
|
a little more deliberate about timing of when player's patches should be applied
|
2025-02-05 19:33:56 +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 |
|
|
|
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 |
|
|
|
2c643a1500
|
change speed that projectile moves at (should be faster than player)
|
2025-01-13 12:46:10 +00:00 |
|
|
|
4484eb0ef0
|
functorise environment collision patches
|
2025-01-13 09:42:32 +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 |
|
|
|
8906d244eb
|
extract player patch types and functions to its own module
|
2025-01-12 19:25:05 +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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
2433797caf
|
progress drawing projectiles
|
2025-01-09 11:52:39 +00:00 |
|
|
|
011fadb9f1
|
move projectiles in every frame
|
2025-01-09 11:08:15 +00:00 |
|
|
|
941d90b6be
|
ensure that we do not draw field over player when player is throwing
|
2025-01-09 10:38:34 +00:00 |
|
|
|
a2dc00704c
|
add 'facing' field to player projectiles, so it is known which direction projectile should travel in
|
2025-01-08 20:26:53 +00:00 |
|
|
|
bd946bf635
|
require attack button to be pressed twice in order to trigger throwing of defeated enemies
|
2025-01-08 13:18:35 +00:00 |
|
|
|
f7ee3e9e29
|
when attack is pressed and more than one enemy has been defeated, place defeated enemies into projectiles vector, and make the vector of defeated enemies an empty vector
|
2025-01-08 12:49:29 +00:00 |
|
|
|
29de4ea4b6
|
progress shooting off enemies as projectiles
|
2025-01-07 13:31:17 +00:00 |
|
|
|
c080398dd5
|
multiply defeatedSize by ratio to ensure that pellets change size along with other objects when window is resized
|
2025-01-07 13:03:17 +00:00 |
|
|
|
f54fa1bf02
|
move projectile type into player type
|
2025-01-07 12:57:15 +00:00 |
|
|
|
61bb214150
|
change size and distance of pellets (defeatedSize and defeatedDistance bindings)
|
2025-01-06 11:26:20 +00:00 |
|
|
|
097d1502ad
|
have pellets fly around player when player has attacked enemy
|
2025-01-01 14:17:42 +00:00 |
|
|
|
2eb2de8910
|
change alpha opacity of attack depending on current charge
|
2024-12-31 10:08:18 +00:00 |
|
|
|
f199da790d
|
add ability to charge for attack
|
2024-12-31 10:04:40 +00:00 |
|
|
|
eacc68e80e
|
add charge field to player
|
2024-12-28 08:41:10 +00:00 |
|
|
|
5f437ae76d
|
draw basic field over player when player is attacking
|
2024-12-28 04:06:27 +00:00 |
|
|
|
06ac5ddd49
|
add 'enemies' field to player type
|
2024-12-26 12:26:13 +00:00 |
|
|
|
77c2ed4e62
|
a little refactoring
|
2024-12-24 12:05:44 +00:00 |
|
|
|
6f83fd8636
|
change collision function in player.sml to check only for collisions with environment, because plan is to move player-enemy collision detection out of player.sml into game-update.sml (where player-enemy collisions affect both players and enemies)
|
2024-12-23 18:49:50 +00:00 |
|
|
|
6bb9ba315e
|
remove unused parameter, and clear checkEnemiesWhileUnused function, because have a different idea for attack
|
2024-12-23 04:03:54 +00:00 |
|
|
|
36085f75c0
|
progress with enemy collision
|
2024-12-23 03:59:27 +00:00 |
|
|
|
5819c4facf
|
add code to stop player from moving when main attack is pressed
|
2024-12-23 00:28:53 +00:00 |
|
|
|
d8b70dfccb
|
draw player differently when they are attacking (player is just different colour for now; placeholder asset to change for later)
|
2024-12-22 21:08:59 +00:00 |
|
|
|
400b971c7b
|
add main attack patches to player.sml, registering attack input (although we don't react on the attack input yet)
|
2024-12-22 20:21:16 +00:00 |
|
|
|
9e30beb7d2
|
remove some unnecessary destructuring
|
2024-12-22 18:25:26 +00:00 |
|
|
|
e2b89af6ac
|
refactor player.sml for easier extensibility when fields are added to player type (we accept a list of values to change, instead of destructuring the player.sml values on each function call)
|
2024-12-22 05:40:33 +00:00 |
|
|
|
05ec1880d2
|
remove dead code (an '(r, g, b)' tuple) and an outdated comment (about a compiler error) from player.sml
|
2024-12-21 11:15:03 +00:00 |
|
|
|
c71dbb7fca
|
add facing datatype to player record, which represents the last position the player is facing (player is facing left if they moved leftwards or colllided with an enemy who is to the left, and player is facing right if they move rightwards or player collides with enemy who is to the right)
|
2024-12-20 17:41:21 +00:00 |
|