Commit Graph

237 Commits

Author SHA1 Message Date
afe878c05d begin parameterising level so that it fits into larger type (with different modes like TITLE, LEVEL, SETTINGS, etc.) 2025-02-18 13:16:52 +00:00
b426ddbdd1 adjustment to player sprite, allowing the inside of the sprite to be a chosen colour 2025-02-18 12:48:55 +00:00
d3200745d0 allow player to have a different width/height that is not a perfect square, (now we have Constants.playerWidth and Constants.playerHeight, having deleted the previous size in Constants.playerSize) 2025-02-18 12:31:22 +00:00
e62493ce56 change size of player/enemy from 35 to 32 (even number means we can resize better) 2025-02-18 11:09:07 +00:00
18495a0cca successfully parse controls from file (but todo: save controls imperative shell on load) 2025-02-17 03:48:31 +00:00
99669dd0b6 add function to convert string to CoreKey.key_code (for parsing/loading controls from files) 2025-02-17 01:39:41 +00:00
291ee2f7f2 differentiate 'upHeld' from 'jumpHeld' (we may want a different button for going up/down menu and a different button for jumping) 2025-02-16 13:51:52 +00:00
47bda26da5 begin coding functionality for remapping keys 2025-02-16 12:45:29 +00:00
0edeb65131 done implementing SHIELD_SLIME 2025-02-15 13:00:23 +00:00
66c60a490d begin adding shield slime enemy variant 2025-02-15 12:34:10 +00:00
190f11d7ef different colours for different enemies so they are easier to differentiate 2025-02-15 12:18:08 +00:00
491ad11c4c remove a bit of dead code from fcore/projectile.sml 2025-02-15 08:18:57 +00:00
e538caa6c6 add 'facing' field to enemy, and update that field when enemy starts moving in different direction (with regards to x_axis) 2025-02-15 08:13:36 +00:00
0b9bdeceff update positions of falling enemies per frame (and filter them out too) 2025-02-15 02:17:01 +00:00
219b37053b add functionality for falling enemies to turn into player projectiles when attacked 2025-02-15 02:02:48 +00:00
b8934e3add add function to generate quad tree from falling enemies 2025-02-15 01:52:19 +00:00
e758a5a13c refactor falling_enemy to be contained in FallingEnemyMap, instead of a plain vector 2025-02-15 01:42:29 +00:00
5412a71d30 add code to make enemy fall when attacked by projectile (assuming health is enough) 2025-02-14 18:18:46 +00:00
c75e7bc33b add attacked enemies who are defeated to player's list of defeated_enemies, allowing them to be shot as projectiles 2025-02-14 13:15:45 +00:00
b239dfa04d add functionality to have enemies tract to player's attack 2025-02-14 12:59:22 +00:00
50b57b9ef9 a little refactoring (Player.runPhysicsAndInput function now does just that, instead of also checking for collisions with enemy) 2025-02-14 11:19:24 +00:00
e00db5d8a3 make enemies move per loop (calling update EnemyMap by calling EnemyBehaviour) 2025-02-14 10:43:27 +00:00
46a1836ae2 additional refactoring, moving player type into its own directory 2025-02-14 10:13:03 +00:00
d1e23b5455 refactor platform and wall type declarations out into platform.sml and wall.sml 2025-02-14 09:26:07 +00:00
93aebe5fa1 a bit of refactoring with regards to enemy's structures and files 2025-02-14 09:06:32 +00:00
93aae6dc1f remove dead code 2025-02-14 08:46:28 +00:00
c5cea8dcb3 partial refactoring so we use EnemyMap.t for collection of enemies 2025-02-13 13:36:30 +00:00
265c8db88a implement EnemyMap functor (todo: migrate from 'enemy vector' type to 'EnemyMap.t' type) 2025-02-13 12:14:50 +00:00
f1521acec1 refactor file order in preparation for adding GapMap for enemy 2025-02-13 11:24:44 +00:00
4c8b404c09 add code so that bat also moves vertically (in addition to previous horizontal movement) when updating enemy state 2025-02-12 00:25:55 +00:00
1dc3116b77 add fields to enemy which are relevant to bat's state 2025-02-11 23:54:13 +00:00
3db27a4107 cut time which bat rests for in half 2025-02-11 19:40:08 +00:00
d0d93780fb initial implementation of bat's update function (todo: make bat oscillate up and down while it also moves in x axis, and also code bat's collisions with player, adding to falling list if necessary, or being filtered by player's attack) 2025-02-11 19:38:02 +00:00
3202c67f47 begin adding variant for STRAIGHT_BAT enemy 2025-02-11 18:05:44 +00:00
534852c8bf don't make 'falling' enemies come back down (fall), but lift them up instead, filtered when reaching beyond the top of the world. It's a little more fluid with current physics for enemies to be 'spirited away' rather than fall. 2025-02-09 13:14:38 +00:00
4301e9ae38 add line-of-sight, so FOLLOW_SLIME will only follow player if player is in specific range of enemy (within 199 pixels currently). 2025-02-09 10:05:12 +00:00
07d31119a7 code functionality to filter out falling enemy from list if falling enemy is colliding with player 2025-02-08 11:05:58 +00:00
26870816db add code so that enemy gains a new projectile when attacking falling enemies, and also draw the falling enemies 2025-02-08 10:48:34 +00:00
51401231e1 update state of falling enemies per loop 2025-02-08 09:49:32 +00:00
38640b14a2 add falling_enemies type to game (these enemies can be picked up and thrown), and thread fallingEnemies through enemy.sml to set up scaffolding for them 2025-02-08 09:20:10 +00:00
1c105193e2 extract a couple of collision functions to a separate module for reuse 2025-02-08 08:39:04 +00:00
f9fe009d59 have patrol slime and follow slime also react to player's ChainEdge attack, and not only player's projectiles 2025-02-08 04:02:17 +00:00
23cf480dad reimplement enemy-filter loop (now enemy's reaction, and decision to possibly filter, is fully under enemy's control - physics, damage reaction, whether to filter or update enemy's state, etc.) 2025-02-08 01:05:39 +00:00
1be44335cb add asset for ChainEdge (attack) 2025-02-07 13:42:38 +00:00
7734496a8c remove some references to charging when/ife we don't need it, and also only trigger throw/attack on new button press (if held, throw/attack is not repeated) 2025-02-07 12:32:38 +00:00
283962c176 make length of main attack increase and decrease 2025-02-07 11:22:23 +00:00
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