|
|
60c93f54cc
|
add player projectiles to game type
|
2025-01-07 11:05:53 +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 |
|
|
|
8e75d09fc1
|
add defeated enemies to player record
|
2025-01-01 09:53:30 +00:00 |
|
|
|
f7f9b1e29b
|
turne 'defated_enemies' type into '{angle: int}' record, because it is probably visually cleaner to have defeated enemies turn into small pellets
|
2025-01-01 09:38:04 +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 |
|
|
|
7d09661e98
|
use different collision size when player is attacking
|
2024-12-28 04:11:29 +00:00 |
|
|
|
5f437ae76d
|
draw basic field over player when player is attacking
|
2024-12-28 04:06:27 +00:00 |
|
|
|
fccbb15f15
|
add shader strings which will allow us to make an xyrgba shader in OpenGL
|
2024-12-27 20:48:36 +00:00 |
|
|
|
8804847d7a
|
use binary search to find enemy with ID in 'GameUpdate.checkEnemies' function, because we previously relied on the enemy's index
|
2024-12-27 18:26:57 +00:00 |
|
|
|
ada63d54ce
|
progress on player-enemy collisions when player is attacking enemy
|
2024-12-27 18:12:42 +00:00 |
|
|
|
01bc91e201
|
return (player, enemies vector) tuple from function to check player-enemy collisions, because we will later want to update both player and enemy in the event that both collide
|
2024-12-27 17:32:42 +00:00 |
|
|
|
e98c5b65e9
|
add bin search function
|
2024-12-26 15:10:33 +00:00 |
|
|
|
06ac5ddd49
|
add 'enemies' field to player type
|
2024-12-26 12:26:13 +00:00 |
|
|
|
8e29bad5a3
|
restore player-enemy collisions (this time in fcore/game-update.sml)
|
2024-12-24 19:00:11 +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 |
|
|
|
aeb3756e5b
|
change arrow keys (left, down, right) to letter keys (s, d, f) and arrow up to letter key 'k', because I think it is more comfortable
|
2024-12-20 16:51:21 +00:00 |
|
|
|
1e2ebe066f
|
slight improvement to attacked animation in player.sml
|
2024-12-20 08:17:33 +00:00 |
|
|
|
165abe32ba
|
add player-flashing animation when player is attacked
|
2024-12-20 07:55:10 +00:00 |
|
|
|
aa1e71d3d8
|
remove accidental git log pasted in game-type.sml
|
2024-12-20 07:39:27 +00:00 |
|
|
|
71e62a101d
|
add player_attacked datatype to player record, and refactor
|
2024-12-20 07:38:54 +00:00 |
|
|
|
58f552b38b
|
add player_attacked datatype to player record, and refactor
|
2024-12-20 07:38:41 +00:00 |
|
|
|
fec4d996d9
|
fix bug. Bug was: if player jumps on platform while holding up, and walks off platform while still holding up, the player has the same 'y' coordinate, floating in the air when gravity should be applied. Fixed by applying gravity in the onJumpPressed function, when jumpPressed variable is true.
|
2024-12-19 08:10:34 +00:00 |
|
|
|
65ce098a71
|
have proper state transitions for recoiling; tested, and works correctly too
|
2024-12-19 07:53:31 +00:00 |
|
|
|
9ed32f38d2
|
separate RECOIL state to RECOIL_LEFT and RECOIL_RIGHT, telling us which direction player reccoils from
|
2024-12-19 04:09:03 +00:00 |
|
|
|
8dc5ad9359
|
add recoil state for player (next: enter recoil state when player touches enemy)
|
2024-12-19 03:58:37 +00:00 |
|
|
|
05cc1d3a46
|
begin coding enemy
|
2024-12-19 03:08:26 +00:00 |
|
|
|
07782c7d65
|
add code to: (1) draw platform (shell.sml), (2) fix wall collision detection regression and platform collision detection bug (I was meant to pass one y parameter and one x parameter to the QuadTree for querying, but accidentally sent the y coordinate twice), (3) perform necessary state transitions that allow to drop from platform when pressing down on a platform, and (4) make sure player does not stick to platform if they jump to platform from below
|
2024-12-18 03:30:21 +00:00 |
|
|
|
d0360df871
|
change platCollisions value to check for collisions in platformTree instead of wallTree
|
2024-12-18 00:18:24 +00:00 |
|
|
|
1501f5f556
|
add comment about what code is triggering a compiler error
|
2024-12-17 23:49:40 +00:00 |
|
|
|
3ce2a974ba
|
I think functions to drop below platforms have been coded and work fine, but I can't manually test because of an exception during compilation. So save progress by pushing to GitHub for now.
|
2024-12-17 22:45:58 +00:00 |
|
|
|
8344138c55
|
add function to quad tree to get only bottom-side queries
|
2024-12-17 22:04:46 +00:00 |
|
|
|
ddd58fd534
|
add platform vector and platform quadtree to game type
|
2024-12-17 21:42:06 +00:00 |
|
|
|
507c1c331c
|
scale player.sml in the same way that wall.sml is being scaled, and also: make 'x' and 'y' arguments to Block.lerp Real32.real values rather than int values (with calling code making the necessary changes) as the code was converting between int and real multiple times
|
2024-12-17 09:16:22 +00:00 |
|
|
|
18bd81134b
|
done handling variable window width/height in wall.sml
|
2024-12-17 04:59:15 +00:00 |
|
|
|
20c4060124
|
progress in handling variable window width/height (mostly only in imperative shell though)
|
2024-12-16 00:58:59 +00:00 |
|
|
|
cc7f30f718
|
add GameType.game_type which stores player and wall types, add GameUpdate.update function which takes a game type and returns a new game type, and refactor player/wall files, and gl-draw file, in light of these changes
|
2024-12-15 09:10:19 +00:00 |
|
|
|
1017bf1b7a
|
cache 'jumpPressed' state inside player type. We use this boolean to check if the player has jumped before. If they have jumped before, then holding the up button does not cause another jump when falling down (unlike before this commit)
|
2024-12-14 21:05:51 +00:00 |
|