1856 Commits

Author SHA1 Message Date
6d028214d5 when game is first loaded, assign parsed controls (or at least default controls) to imperative shell's state 2025-02-17 03:53:04 +00:00
18495a0cca successfully parse controls from file (but todo: save controls imperative shell on load) 2025-02-17 03:48:31 +00:00
46c713a9b5 progress with controls-parsing logic 2025-02-17 03:13:45 +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
0df453f9c9 partially done coding key remapping functionality (what works: GLFW key code -> CoreKey.key_code, acting on CoreKey.key_code every frame; todo: load from config file on start up, have screen where we can remap keys, and save to config while when key mappings are changed) 2025-02-16 13:45:14 +00:00
f2f1eeab8e additional scaffolding of user's key mappings in imperative shell 2025-02-16 13:17:14 +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
74a3fef32a receive latest version of GapMap, which fixes a bug to do with removing an element 2025-02-14 13:04:30 +00:00
e2da10e908 amend 'removeMiddle' function in gap_map.sml: before, we were leaving element we want to remove in rkhd/rvhd because we started the slice at 'insPos', but now we increment 'insPos' by 1 so we filter that desired element out 2025-02-14 13:02:42 +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
5f834ddaa4 add functor to fold over GapMap in gap_map.sml 2025-02-13 12:40:27 +00:00
265c8db88a implement EnemyMap functor (todo: migrate from 'enemy vector' type to 'EnemyMap.t' type) 2025-02-13 12:14:50 +00:00
f3cc41e9a2 add 'env' parameter to gap_map.sml's mapper 2025-02-13 12:06:20 +00:00
9c32e53160 add 'env' parameter to gap_map.sml's mapper 2025-02-13 12:01:40 +00:00
aa127b28fd add 'env' parameter to gap_map.sml's mapper 2025-02-13 12:01:07 +00:00
9749abf1d5 add 'env' parameter to mapper in gap_map.sml 2025-02-13 11:56:12 +00:00
f1521acec1 refactor file order in preparation for adding GapMap for enemy 2025-02-13 11:24:44 +00:00
d23396f5d1 cover exhaustive case reported in gap_map.sml (in 'joinSlices' function), and make it possible to map over values by using a functor 2025-02-13 10:52:55 +00:00
ae3238eabe minor adjustments to gap_vector.sml to make functor fit GAP_VECTOR signature 2025-02-13 08:26:48 +00:00
cfce329255 add gap_vector.sml, which is just the same as gap_buffer.sml, except generic through the use of functors 2025-02-13 08:22:55 +00:00
33678f2b0d code 'remove' function for gap_map.sml, completing the functionality I need for GapMap (but warning that, although most functions were edited from gap_set.sml, gap_map.sml is entirely untested) 2025-02-13 03:21:18 +00:00
2c187d0e87 implement 'moveTo' function for gap_map.sml 2025-02-13 02:41:29 +00:00
d3cca23549 implement 'moveToStart' and 'moveToEnd' functions in gap_map.sml 2025-02-12 13:59:27 +00:00
18bd71d608 fix compile errors regarding 'add' function in gap_map.sml (error was that 'joinSlices' helper function returned 'rightVals = rightKeys' instead of 'rightVals = rightVals') 2025-02-12 13:44:34 +00:00
2e03ae9828 add 'min' and 'max' functions to gap_map.sml 2025-02-12 12:45:45 +00:00
55d20a2b82 done with adding/inserting into GapMap 2025-02-12 12:25:35 +00:00
206df031b3 implement 'insRight' function for inserting to the right 2025-02-12 12:25:08 +00:00
0b8b47312a implement 'insRight' function for inserting to the right 2025-02-12 12:12:27 +00:00
ca3e357fde code 'insLeft' function for gap_map.sml 2025-02-12 11:08:05 +00:00
2048c04179 progress implementing 'add' in gap_map.sml 2025-02-12 10:15:36 +00:00
0ba1679e9a begin implementation of gap_map.sml 2025-02-12 01:51:39 +00:00