mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-12-15 15:30:21 -08:00
Classic physics implemented, more params + tweaks
A big thank you to @jdaster64 and @DeadSyntaxdev for their work on the previous classic physics PRs, as without them I would not have been able to pull the values used in those PRs and recreate them at all. - Implements CLASSIC_PARAMETERS, an alternate set of parameters to PHYSICS_PARAMETERS which is utilized based on your current Physics Behavior setting. - The values used in CLASSIC_PARAMETERS were lifted from #646, but they may need more tweaking. - Implements a setting under Difficulty for Physics Behavior, with options for Modern and Classic (the default being modern) - Many, many new physics parameters. - Jump Speed, Jump Gravity and Fall Gravity are all split up into Idle, Walk and Run variants based on your current speed. - Those thresholds have their own parameters, being "Jump Walk/Run Threshold" - Implemented "Classic Bounce Behavior" which replicates the original SMB's bounce mechanics when active, disabling the ability to bounce higher on enemies unless you have upwards velocity. - Implemented "Skid Stop Threshold", used for determining when the game considers your velocity low enough to stop you from skidding. - Implemented "Can Instant Stop Skid", which implements the classic SMB behavior of setting your velocity to 0 if the player's speed is low enough while skidding (determined by Skid Stop Threshold) - Implemented "Lock Air Accel", which implements the classic SMB behavior that prevents the player from surpassing walking speed while in the air when enabled (unless they're jumping off of a trampoline) - Split up "Air Accel" into "Air Walk/Run Accel", which do exactly what they sound like they do. - Implemented "Can Backwards Accel Run", which when disabled implements the classic SMB behavior of using your air walk acceleration at running speed while backwards accelerating. - Implemented "Air Backwards Accel Mult" which controls a multiplier linked to your acceleration while moving backwards, which is ported behavior from classic SMB. - Split up "Climb Speed" into variants for "Climb Up/Down Speed" which work exactly how you think they do. (Note: Climbing down in the original SMB is far faster, which is why this is here. I tried my best to eyeball the speed, change it however you want, though.) - Implemented "Swim Decel" which does exactly what it sounds like it does. - Renamed a few parameters to be more accurate (namely "Bounce Height" to "Bounce Speed", "Power State Range" to "Power Tier Range", etc. - New projectile parameters. - Rework of the "destroy on hit" param into its own "pierce count" parameter against enemies, with negative values serving as infinite pierce. - New hitrate parameter, to grant piercing projectiles a cooldown rate to hit the same enemy multiple times (i.e. SMB3 Hammer Suit hammers,) with negative values serving as original behavior to only hit an enemy once in its area. - New move speed cap parameter, which lets you set a minimum and maximum speed a projectile can travel horizontally. - New bounce count parameter, to set a maximum bounce count to prevent a projectile from sticking around for too long. - Removed folder limitation on projectile/particle file pathing. Go wild. (Also, commented a debug print in AudioManager.)
This commit is contained in:
parent
8e87ad99a3
commit
17a4e04766
32 changed files with 747 additions and 197 deletions
|
|
@ -9,16 +9,26 @@
|
|||
"CAN_BREAK_BRICKS": true,
|
||||
"CAN_BE_WALL_EJECTED": true,
|
||||
|
||||
"JUMP_GRAVITY": 11.0,
|
||||
"JUMP_SPEED": 300.0,
|
||||
"JUMP_WALK_THRESHOLD": 60.0,
|
||||
"JUMP_RUN_THRESHOLD": 135.0,
|
||||
|
||||
"JUMP_GRAVITY_IDLE": 11.0,
|
||||
"JUMP_GRAVITY_WALK": 11.0,
|
||||
"JUMP_GRAVITY_RUN": 11.0,
|
||||
"JUMP_SPEED_IDLE": 300.0,
|
||||
"JUMP_SPEED_WALK": 300.0,
|
||||
"JUMP_SPEED_RUN": 300.0,
|
||||
"JUMP_INCR": 8.0,
|
||||
"JUMP_CANCEL_DIVIDE": 1.5,
|
||||
"JUMP_HOLD_SPEED_THRESHOLD": 0.0,
|
||||
|
||||
"BOUNCE_HEIGHT": 200.0,
|
||||
"CLASSIC_BOUNCE_BEHAVIOR": false,
|
||||
"BOUNCE_SPEED": 200.0,
|
||||
"BOUNCE_JUMP_SPEED": 300.0,
|
||||
|
||||
"FALL_GRAVITY": 25.0,
|
||||
"FALL_GRAVITY_IDLE": 25.0,
|
||||
"FALL_GRAVITY_WALK": 25.0,
|
||||
"FALL_GRAVITY_RUN": 25.0,
|
||||
"MAX_FALL_SPEED": 280.0,
|
||||
"CEILING_BUMP_SPEED": 45.0,
|
||||
|
||||
|
|
@ -31,18 +41,26 @@
|
|||
"RUN_SKID": 8.0,
|
||||
|
||||
"SKID_THRESHOLD": 100.0,
|
||||
"SKID_STOP_THRESHOLD": 10.0,
|
||||
"CAN_INSTANT_STOP_SKID": false,
|
||||
|
||||
"DECEL": 3.0,
|
||||
"GROUND_DECEL": 3.0,
|
||||
"LOCK_AIR_ACCEL": false,
|
||||
"AIR_WALK_ACCEL": 3.0,
|
||||
"AIR_RUN_ACCEL": 3.0,
|
||||
"AIR_DECEL": 0.0,
|
||||
"AIR_ACCEL": 3.0,
|
||||
"AIR_SKID": 1.5,
|
||||
"CAN_BACKWARDS_ACCEL_RUN": true,
|
||||
"AIR_BACKWARDS_ACCEL_MULT": 1.0,
|
||||
|
||||
"CLIMB_SPEED": 50.0,
|
||||
"CLIMB_UP_SPEED": 50.0,
|
||||
"CLIMB_DOWN_SPEED": 120.0,
|
||||
"TRAMPOLINE_SPEED": 500.0,
|
||||
"SUPER_TRAMPOLINE_SPEED": 1200.0,
|
||||
|
||||
"SWIM_SPEED": 95.0,
|
||||
"SWIM_GROUND_SPEED": 45.0,
|
||||
"SWIM_DECEL": 3.0,
|
||||
"SWIM_HEIGHT": 100.0,
|
||||
"SWIM_EXIT_SPEED": 250.0,
|
||||
"SWIM_GRAVITY": 2.5,
|
||||
|
|
@ -56,9 +74,82 @@
|
|||
"Big": {},
|
||||
"Fire": {},
|
||||
},
|
||||
"CLASSIC_PARAMETERS": {
|
||||
"Default": {
|
||||
"HITBOX_SCALE": [1.0, 1.0],
|
||||
"CROUCH_SCALE": 0.5,
|
||||
"CAN_AIR_TURN": false,
|
||||
"CAN_BREAK_BRICKS": true,
|
||||
"CAN_BE_WALL_EJECTED": true,
|
||||
|
||||
"JUMP_WALK_THRESHOLD": 60.0,
|
||||
"JUMP_RUN_THRESHOLD": 135.0,
|
||||
|
||||
"JUMP_GRAVITY_IDLE": 7.5,
|
||||
"JUMP_GRAVITY_WALK": 7.03,
|
||||
"JUMP_GRAVITY_RUN": 9.375,
|
||||
"JUMP_SPEED_IDLE": 248.0,
|
||||
"JUMP_SPEED_WALK": 248.0,
|
||||
"JUMP_SPEED_RUN": 310.0,
|
||||
"JUMP_INCR": 0.0,
|
||||
"JUMP_CANCEL_DIVIDE": 1.0,
|
||||
"JUMP_HOLD_SPEED_THRESHOLD": 0.0,
|
||||
|
||||
"CLASSIC_BOUNCE_BEHAVIOR": true,
|
||||
"BOUNCE_SPEED": 248.0,
|
||||
"BOUNCE_JUMP_SPEED": 248.0,
|
||||
|
||||
"FALL_GRAVITY_IDLE": 26.25,
|
||||
"FALL_GRAVITY_WALK": 22.5,
|
||||
"FALL_GRAVITY_RUN": 33.75,
|
||||
"MAX_FALL_SPEED": 255.0,
|
||||
"CEILING_BUMP_SPEED": 45.0,
|
||||
|
||||
"WALK_SPEED": 90.0,
|
||||
"GROUND_WALK_ACCEL": 2.23,
|
||||
"WALK_SKID": 6.1,
|
||||
|
||||
"RUN_SPEED": 150.0,
|
||||
"GROUND_RUN_ACCEL": 3.34,
|
||||
"RUN_SKID": 6.1,
|
||||
|
||||
"SKID_THRESHOLD": 100.0,
|
||||
"SKID_STOP_THRESHOLD": 33.75,
|
||||
"CAN_INSTANT_STOP_SKID": true,
|
||||
|
||||
"GROUND_DECEL": 3.05,
|
||||
"LOCK_AIR_ACCEL": true,
|
||||
"AIR_WALK_ACCEL": 2.23,
|
||||
"AIR_RUN_ACCEL": 3.34,
|
||||
"AIR_DECEL": 0.0,
|
||||
"AIR_SKID": 6.1,
|
||||
"CAN_BACKWARDS_ACCEL_RUN": false,
|
||||
"AIR_BACKWARDS_ACCEL_MULT": 2.0,
|
||||
|
||||
"CLIMB_UP_SPEED": 50.0,
|
||||
"CLIMB_DOWN_SPEED": 120.0,
|
||||
"TRAMPOLINE_SPEED": 500.0,
|
||||
"SUPER_TRAMPOLINE_SPEED": 1200.0,
|
||||
|
||||
"SWIM_SPEED": 95.0,
|
||||
"SWIM_GROUND_SPEED": 45.0,
|
||||
"SWIM_DECEL": 0.0,
|
||||
"SWIM_HEIGHT": 100.0,
|
||||
"SWIM_EXIT_SPEED": 250.0,
|
||||
"SWIM_GRAVITY": 2.5,
|
||||
"MAX_SWIM_FALL_SPEED": 200.0,
|
||||
},
|
||||
"Small": {
|
||||
"CROUCH_SCALE": 1.0,
|
||||
"CAN_BREAK_BRICKS": false,
|
||||
"CAN_BE_WALL_EJECTED": false,
|
||||
},
|
||||
"Big": {},
|
||||
"Fire": {},
|
||||
},
|
||||
"POWER_PARAMETERS": {
|
||||
"Default": {
|
||||
"POWER_STATE_RANGE": [0, 2],
|
||||
"POWER_TIER_RANGE": [0, 2],
|
||||
"STARTING_POWER_STATE": "Small",
|
||||
"STAR_TIME": 12.0,
|
||||
"WING_TIME": 10.0,
|
||||
|
|
@ -67,14 +158,16 @@
|
|||
"PROJ_TYPE": "",
|
||||
"PROJ_PARTICLE": "",
|
||||
|
||||
"PROJ_PARTICLE_ON_CONTACT": true,
|
||||
"PROJ_PARTICLE_ON_CONTACT": false,
|
||||
"PROJ_SFX_THROW": "fireball",
|
||||
"PROJ_SFX_COLLIDE": "bump",
|
||||
"PROJ_SFX_HIT": "kick",
|
||||
|
||||
"MAX_PROJ_COUNT": 2,
|
||||
"PROJ_COLLISION": true,
|
||||
"PROJ_DESTROY_ON_HIT": true,
|
||||
"PROJ_PIERCE_COUNT": 0,
|
||||
"PROJ_PIERCE_HITRATE": -1,
|
||||
"PROJ_BOUNCE_COUNT": -1,
|
||||
"PROJ_GROUND_BOUNCE": true,
|
||||
"PROJ_WALL_BOUNCE": false,
|
||||
"PROJ_CEIL_BOUNCE": false,
|
||||
|
|
@ -83,6 +176,7 @@
|
|||
"PROJ_LIFETIME": -1,
|
||||
"PROJ_OFFSET": [-4.0, 16.0],
|
||||
"PROJ_SPEED": [220.0, -100.0],
|
||||
"PROJ_SPEED_CAP": [-220.0, 220.0],
|
||||
"PROJ_SPEED_SCALING": false,
|
||||
|
||||
"PROJ_GROUND_DECEL": 0.0,
|
||||
|
|
@ -91,11 +185,13 @@
|
|||
"PROJ_BOUNCE_HEIGHT": 125.0,
|
||||
"PROJ_MAX_FALL_SPEED": 150.0,
|
||||
},
|
||||
"Small": {},
|
||||
"Small": {
|
||||
"PROJ_OFFSET": [-4.0, 8.0],
|
||||
},
|
||||
"Big": {},
|
||||
"Fire": {
|
||||
"PROJ_TYPE": "Entities/Items/Fireball",
|
||||
"PROJ_PARTICLE": "Particles/FireballExplosion",
|
||||
"PROJ_TYPE": "res://Scenes/Prefabs/Entities/Items/Fireball",
|
||||
"PROJ_PARTICLE": "res://Scenes/Prefabs/Particles/FireballExplosion",
|
||||
},
|
||||
},
|
||||
"ENDING_PARAMETERS": {
|
||||
|
|
@ -116,8 +212,8 @@
|
|||
"PEACH_ACCEL_MULT": 1.0,
|
||||
|
||||
"DOOR_POSE_OFFSET": 0.0,
|
||||
"TOAD_POSE_OFFSET": -16.0,
|
||||
"PEACH_POSE_OFFSET": -16.0,
|
||||
"TOAD_POSE_OFFSET": -12.0,
|
||||
"PEACH_POSE_OFFSET": -12.0,
|
||||
},
|
||||
"Small": {},
|
||||
"Big": {},
|
||||
|
|
@ -140,24 +236,26 @@
|
|||
"WING_OFFSET": [0.0, 0.0],
|
||||
"HAMMER_OFFSET": [0.0, -8.0],
|
||||
|
||||
"RAINBOW_STAR_FX_SPEED": 15.0,
|
||||
"RAINBOW_STAR_SLOW_FX_SPEED": 7.5,
|
||||
"RAINBOW_POWERUP_FX": true,
|
||||
"RAINBOW_FX_SPEED": 15.0,
|
||||
"MOVE_ANIM_SPEED_DIV": 32,
|
||||
|
||||
"JUMP_SFX": "big_jump",
|
||||
"GROUNDED_WALK_SFX": true,
|
||||
"GROUNDED_RUN_SFX": true,
|
||||
|
||||
"RAINBOW_STAR_FX_SPEED": 15.0,
|
||||
"RAINBOW_STAR_SLOW_FX_SPEED": 7.5,
|
||||
"RAINBOW_POWERUP_FX": true,
|
||||
"RAINBOW_FX_SPEED": 15.0,
|
||||
},
|
||||
"Small": {
|
||||
"WING_OFFSET": [0.0, 10.0],
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
"JUMP_SFX": "small_jump",
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
},
|
||||
"Big": {
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
},
|
||||
"Fire": {},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,26 @@
|
|||
"CAN_BREAK_BRICKS": true,
|
||||
"CAN_BE_WALL_EJECTED": true,
|
||||
|
||||
"JUMP_GRAVITY": 11.0,
|
||||
"JUMP_SPEED": 300.0,
|
||||
"JUMP_WALK_THRESHOLD": 60.0,
|
||||
"JUMP_RUN_THRESHOLD": 135.0,
|
||||
|
||||
"JUMP_GRAVITY_IDLE": 11.0,
|
||||
"JUMP_GRAVITY_WALK": 11.0,
|
||||
"JUMP_GRAVITY_RUN": 11.0,
|
||||
"JUMP_SPEED_IDLE": 300.0,
|
||||
"JUMP_SPEED_WALK": 300.0,
|
||||
"JUMP_SPEED_RUN": 300.0,
|
||||
"JUMP_INCR": 8.0,
|
||||
"JUMP_CANCEL_DIVIDE": 1.5,
|
||||
"JUMP_HOLD_SPEED_THRESHOLD": 0.0,
|
||||
|
||||
"BOUNCE_HEIGHT": 200.0,
|
||||
"CLASSIC_BOUNCE_BEHAVIOR": false,
|
||||
"BOUNCE_SPEED": 200.0,
|
||||
"BOUNCE_JUMP_SPEED": 300.0,
|
||||
|
||||
"FALL_GRAVITY": 25.0,
|
||||
"FALL_GRAVITY_IDLE": 25.0,
|
||||
"FALL_GRAVITY_WALK": 25.0,
|
||||
"FALL_GRAVITY_RUN": 25.0,
|
||||
"MAX_FALL_SPEED": 280.0,
|
||||
"CEILING_BUMP_SPEED": 45.0,
|
||||
|
||||
|
|
@ -31,18 +41,26 @@
|
|||
"RUN_SKID": 8.0,
|
||||
|
||||
"SKID_THRESHOLD": 100.0,
|
||||
"SKID_STOP_THRESHOLD": 10.0,
|
||||
"CAN_INSTANT_STOP_SKID": false,
|
||||
|
||||
"DECEL": 3.0,
|
||||
"GROUND_DECEL": 3.0,
|
||||
"LOCK_AIR_ACCEL": false,
|
||||
"AIR_WALK_ACCEL": 3.0,
|
||||
"AIR_RUN_ACCEL": 3.0,
|
||||
"AIR_DECEL": 0.0,
|
||||
"AIR_ACCEL": 3.0,
|
||||
"AIR_SKID": 1.5,
|
||||
"CAN_BACKWARDS_ACCEL_RUN": true,
|
||||
"AIR_BACKWARDS_ACCEL_MULT": 1.0,
|
||||
|
||||
"CLIMB_SPEED": 50.0,
|
||||
"CLIMB_UP_SPEED": 50.0,
|
||||
"CLIMB_DOWN_SPEED": 120.0,
|
||||
"TRAMPOLINE_SPEED": 500.0,
|
||||
"SUPER_TRAMPOLINE_SPEED": 1200.0,
|
||||
|
||||
"SWIM_SPEED": 95.0,
|
||||
"SWIM_GROUND_SPEED": 45.0,
|
||||
"SWIM_DECEL": 3.0,
|
||||
"SWIM_HEIGHT": 100.0,
|
||||
"SWIM_EXIT_SPEED": 250.0,
|
||||
"SWIM_GRAVITY": 2.5,
|
||||
|
|
@ -56,9 +74,82 @@
|
|||
"Big": {},
|
||||
"Fire": {},
|
||||
},
|
||||
"CLASSIC_PARAMETERS": {
|
||||
"Default": {
|
||||
"HITBOX_SCALE": [1.0, 1.0],
|
||||
"CROUCH_SCALE": 0.5,
|
||||
"CAN_AIR_TURN": false,
|
||||
"CAN_BREAK_BRICKS": true,
|
||||
"CAN_BE_WALL_EJECTED": true,
|
||||
|
||||
"JUMP_WALK_THRESHOLD": 60.0,
|
||||
"JUMP_RUN_THRESHOLD": 135.0,
|
||||
|
||||
"JUMP_GRAVITY_IDLE": 7.5,
|
||||
"JUMP_GRAVITY_WALK": 7.03,
|
||||
"JUMP_GRAVITY_RUN": 9.375,
|
||||
"JUMP_SPEED_IDLE": 248.0,
|
||||
"JUMP_SPEED_WALK": 248.0,
|
||||
"JUMP_SPEED_RUN": 310.0,
|
||||
"JUMP_INCR": 0.0,
|
||||
"JUMP_CANCEL_DIVIDE": 1.0,
|
||||
"JUMP_HOLD_SPEED_THRESHOLD": 0.0,
|
||||
|
||||
"CLASSIC_BOUNCE_BEHAVIOR": true,
|
||||
"BOUNCE_SPEED": 248.0,
|
||||
"BOUNCE_JUMP_SPEED": 248.0,
|
||||
|
||||
"FALL_GRAVITY_IDLE": 26.25,
|
||||
"FALL_GRAVITY_WALK": 22.5,
|
||||
"FALL_GRAVITY_RUN": 33.75,
|
||||
"MAX_FALL_SPEED": 255.0,
|
||||
"CEILING_BUMP_SPEED": 45.0,
|
||||
|
||||
"WALK_SPEED": 90.0,
|
||||
"GROUND_WALK_ACCEL": 2.23,
|
||||
"WALK_SKID": 6.1,
|
||||
|
||||
"RUN_SPEED": 150.0,
|
||||
"GROUND_RUN_ACCEL": 3.34,
|
||||
"RUN_SKID": 6.1,
|
||||
|
||||
"SKID_THRESHOLD": 100.0,
|
||||
"SKID_STOP_THRESHOLD": 33.75,
|
||||
"CAN_INSTANT_STOP_SKID": true,
|
||||
|
||||
"GROUND_DECEL": 3.05,
|
||||
"LOCK_AIR_ACCEL": true,
|
||||
"AIR_WALK_ACCEL": 2.23,
|
||||
"AIR_RUN_ACCEL": 3.34,
|
||||
"AIR_DECEL": 0.0,
|
||||
"AIR_SKID": 6.1,
|
||||
"CAN_BACKWARDS_ACCEL_RUN": false,
|
||||
"AIR_BACKWARDS_ACCEL_MULT": 2.0,
|
||||
|
||||
"CLIMB_UP_SPEED": 50.0,
|
||||
"CLIMB_DOWN_SPEED": 120.0,
|
||||
"TRAMPOLINE_SPEED": 500.0,
|
||||
"SUPER_TRAMPOLINE_SPEED": 1200.0,
|
||||
|
||||
"SWIM_SPEED": 95.0,
|
||||
"SWIM_GROUND_SPEED": 45.0,
|
||||
"SWIM_DECEL": 0.0,
|
||||
"SWIM_HEIGHT": 100.0,
|
||||
"SWIM_EXIT_SPEED": 250.0,
|
||||
"SWIM_GRAVITY": 2.5,
|
||||
"MAX_SWIM_FALL_SPEED": 200.0,
|
||||
},
|
||||
"Small": {
|
||||
"CROUCH_SCALE": 1.0,
|
||||
"CAN_BREAK_BRICKS": false,
|
||||
"CAN_BE_WALL_EJECTED": false,
|
||||
},
|
||||
"Big": {},
|
||||
"Fire": {},
|
||||
},
|
||||
"POWER_PARAMETERS": {
|
||||
"Default": {
|
||||
"POWER_STATE_RANGE": [0, 2],
|
||||
"POWER_TIER_RANGE": [0, 2],
|
||||
"STARTING_POWER_STATE": "Small",
|
||||
"STAR_TIME": 12.0,
|
||||
"WING_TIME": 10.0,
|
||||
|
|
@ -67,14 +158,16 @@
|
|||
"PROJ_TYPE": "",
|
||||
"PROJ_PARTICLE": "",
|
||||
|
||||
"PROJ_PARTICLE_ON_CONTACT": true,
|
||||
"PROJ_PARTICLE_ON_CONTACT": false,
|
||||
"PROJ_SFX_THROW": "fireball",
|
||||
"PROJ_SFX_COLLIDE": "bump",
|
||||
"PROJ_SFX_HIT": "kick",
|
||||
|
||||
"MAX_PROJ_COUNT": 2,
|
||||
"PROJ_COLLISION": true,
|
||||
"PROJ_DESTROY_ON_HIT": true,
|
||||
"PROJ_PIERCE_COUNT": 0,
|
||||
"PROJ_PIERCE_HITRATE": -1,
|
||||
"PROJ_BOUNCE_COUNT": -1,
|
||||
"PROJ_GROUND_BOUNCE": true,
|
||||
"PROJ_WALL_BOUNCE": false,
|
||||
"PROJ_CEIL_BOUNCE": false,
|
||||
|
|
@ -83,6 +176,7 @@
|
|||
"PROJ_LIFETIME": -1,
|
||||
"PROJ_OFFSET": [-4.0, 16.0],
|
||||
"PROJ_SPEED": [220.0, -100.0],
|
||||
"PROJ_SPEED_CAP": [-220.0, 220.0],
|
||||
"PROJ_SPEED_SCALING": false,
|
||||
|
||||
"PROJ_GROUND_DECEL": 0.0,
|
||||
|
|
@ -91,11 +185,13 @@
|
|||
"PROJ_BOUNCE_HEIGHT": 125.0,
|
||||
"PROJ_MAX_FALL_SPEED": 150.0,
|
||||
},
|
||||
"Small": {},
|
||||
"Small": {
|
||||
"PROJ_OFFSET": [-4.0, 8.0],
|
||||
},
|
||||
"Big": {},
|
||||
"Fire": {
|
||||
"PROJ_TYPE": "Entities/Items/Fireball",
|
||||
"PROJ_PARTICLE": "Particles/FireballExplosion",
|
||||
"PROJ_TYPE": "res://Scenes/Prefabs/Entities/Items/Fireball",
|
||||
"PROJ_PARTICLE": "res://Scenes/Prefabs/Particles/FireballExplosion",
|
||||
},
|
||||
},
|
||||
"ENDING_PARAMETERS": {
|
||||
|
|
@ -116,8 +212,8 @@
|
|||
"PEACH_ACCEL_MULT": 1.0,
|
||||
|
||||
"DOOR_POSE_OFFSET": 0.0,
|
||||
"TOAD_POSE_OFFSET": -16.0,
|
||||
"PEACH_POSE_OFFSET": -16.0,
|
||||
"TOAD_POSE_OFFSET": -12.0,
|
||||
"PEACH_POSE_OFFSET": -12.0,
|
||||
},
|
||||
"Small": {},
|
||||
"Big": {},
|
||||
|
|
@ -140,24 +236,26 @@
|
|||
"WING_OFFSET": [0.0, 0.0],
|
||||
"HAMMER_OFFSET": [0.0, -8.0],
|
||||
|
||||
"RAINBOW_STAR_FX_SPEED": 15.0,
|
||||
"RAINBOW_STAR_SLOW_FX_SPEED": 7.5,
|
||||
"RAINBOW_POWERUP_FX": true,
|
||||
"RAINBOW_FX_SPEED": 15.0,
|
||||
"MOVE_ANIM_SPEED_DIV": 32,
|
||||
|
||||
"JUMP_SFX": "big_jump",
|
||||
"GROUNDED_WALK_SFX": true,
|
||||
"GROUNDED_RUN_SFX": true,
|
||||
|
||||
"RAINBOW_STAR_FX_SPEED": 15.0,
|
||||
"RAINBOW_STAR_SLOW_FX_SPEED": 7.5,
|
||||
"RAINBOW_POWERUP_FX": true,
|
||||
"RAINBOW_FX_SPEED": 15.0,
|
||||
},
|
||||
"Small": {
|
||||
"WING_OFFSET": [0.0, 10.0],
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
"JUMP_SFX": "small_jump",
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
},
|
||||
"Big": {
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
},
|
||||
"Fire": {},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,26 @@
|
|||
"CAN_BREAK_BRICKS": true,
|
||||
"CAN_BE_WALL_EJECTED": true,
|
||||
|
||||
"JUMP_GRAVITY": 11.0,
|
||||
"JUMP_SPEED": 300.0,
|
||||
"JUMP_WALK_THRESHOLD": 60.0,
|
||||
"JUMP_RUN_THRESHOLD": 135.0,
|
||||
|
||||
"JUMP_GRAVITY_IDLE": 11.0,
|
||||
"JUMP_GRAVITY_WALK": 11.0,
|
||||
"JUMP_GRAVITY_RUN": 11.0,
|
||||
"JUMP_SPEED_IDLE": 300.0,
|
||||
"JUMP_SPEED_WALK": 300.0,
|
||||
"JUMP_SPEED_RUN": 300.0,
|
||||
"JUMP_INCR": 8.0,
|
||||
"JUMP_CANCEL_DIVIDE": 1.5,
|
||||
"JUMP_HOLD_SPEED_THRESHOLD": 0.0,
|
||||
|
||||
"BOUNCE_HEIGHT": 200.0,
|
||||
"CLASSIC_BOUNCE_BEHAVIOR": false,
|
||||
"BOUNCE_SPEED": 200.0,
|
||||
"BOUNCE_JUMP_SPEED": 300.0,
|
||||
|
||||
"FALL_GRAVITY": 25.0,
|
||||
"FALL_GRAVITY_IDLE": 25.0,
|
||||
"FALL_GRAVITY_WALK": 25.0,
|
||||
"FALL_GRAVITY_RUN": 25.0,
|
||||
"MAX_FALL_SPEED": 280.0,
|
||||
"CEILING_BUMP_SPEED": 45.0,
|
||||
|
||||
|
|
@ -31,18 +41,26 @@
|
|||
"RUN_SKID": 8.0,
|
||||
|
||||
"SKID_THRESHOLD": 100.0,
|
||||
"SKID_STOP_THRESHOLD": 10.0,
|
||||
"CAN_INSTANT_STOP_SKID": false,
|
||||
|
||||
"DECEL": 3.0,
|
||||
"GROUND_DECEL": 3.0,
|
||||
"LOCK_AIR_ACCEL": false,
|
||||
"AIR_WALK_ACCEL": 3.0,
|
||||
"AIR_RUN_ACCEL": 3.0,
|
||||
"AIR_DECEL": 0.0,
|
||||
"AIR_ACCEL": 3.0,
|
||||
"AIR_SKID": 1.5,
|
||||
"CAN_BACKWARDS_ACCEL_RUN": true,
|
||||
"AIR_BACKWARDS_ACCEL_MULT": 1.0,
|
||||
|
||||
"CLIMB_SPEED": 50.0,
|
||||
"CLIMB_UP_SPEED": 50.0,
|
||||
"CLIMB_DOWN_SPEED": 120.0,
|
||||
"TRAMPOLINE_SPEED": 500.0,
|
||||
"SUPER_TRAMPOLINE_SPEED": 1200.0,
|
||||
|
||||
"SWIM_SPEED": 95.0,
|
||||
"SWIM_GROUND_SPEED": 45.0,
|
||||
"SWIM_DECEL": 3.0,
|
||||
"SWIM_HEIGHT": 100.0,
|
||||
"SWIM_EXIT_SPEED": 250.0,
|
||||
"SWIM_GRAVITY": 2.5,
|
||||
|
|
@ -56,9 +74,82 @@
|
|||
"Big": {},
|
||||
"Fire": {},
|
||||
},
|
||||
"CLASSIC_PARAMETERS": {
|
||||
"Default": {
|
||||
"HITBOX_SCALE": [1.0, 1.0],
|
||||
"CROUCH_SCALE": 0.5,
|
||||
"CAN_AIR_TURN": false,
|
||||
"CAN_BREAK_BRICKS": true,
|
||||
"CAN_BE_WALL_EJECTED": true,
|
||||
|
||||
"JUMP_WALK_THRESHOLD": 60.0,
|
||||
"JUMP_RUN_THRESHOLD": 135.0,
|
||||
|
||||
"JUMP_GRAVITY_IDLE": 7.5,
|
||||
"JUMP_GRAVITY_WALK": 7.03,
|
||||
"JUMP_GRAVITY_RUN": 9.375,
|
||||
"JUMP_SPEED_IDLE": 248.0,
|
||||
"JUMP_SPEED_WALK": 248.0,
|
||||
"JUMP_SPEED_RUN": 310.0,
|
||||
"JUMP_INCR": 0.0,
|
||||
"JUMP_CANCEL_DIVIDE": 1.0,
|
||||
"JUMP_HOLD_SPEED_THRESHOLD": 0.0,
|
||||
|
||||
"CLASSIC_BOUNCE_BEHAVIOR": true,
|
||||
"BOUNCE_SPEED": 248.0,
|
||||
"BOUNCE_JUMP_SPEED": 248.0,
|
||||
|
||||
"FALL_GRAVITY_IDLE": 26.25,
|
||||
"FALL_GRAVITY_WALK": 22.5,
|
||||
"FALL_GRAVITY_RUN": 33.75,
|
||||
"MAX_FALL_SPEED": 255.0,
|
||||
"CEILING_BUMP_SPEED": 45.0,
|
||||
|
||||
"WALK_SPEED": 90.0,
|
||||
"GROUND_WALK_ACCEL": 2.23,
|
||||
"WALK_SKID": 6.1,
|
||||
|
||||
"RUN_SPEED": 150.0,
|
||||
"GROUND_RUN_ACCEL": 3.34,
|
||||
"RUN_SKID": 6.1,
|
||||
|
||||
"SKID_THRESHOLD": 100.0,
|
||||
"SKID_STOP_THRESHOLD": 33.75,
|
||||
"CAN_INSTANT_STOP_SKID": true,
|
||||
|
||||
"GROUND_DECEL": 3.05,
|
||||
"LOCK_AIR_ACCEL": true,
|
||||
"AIR_WALK_ACCEL": 2.23,
|
||||
"AIR_RUN_ACCEL": 3.34,
|
||||
"AIR_DECEL": 0.0,
|
||||
"AIR_SKID": 6.1,
|
||||
"CAN_BACKWARDS_ACCEL_RUN": false,
|
||||
"AIR_BACKWARDS_ACCEL_MULT": 2.0,
|
||||
|
||||
"CLIMB_UP_SPEED": 50.0,
|
||||
"CLIMB_DOWN_SPEED": 120.0,
|
||||
"TRAMPOLINE_SPEED": 500.0,
|
||||
"SUPER_TRAMPOLINE_SPEED": 1200.0,
|
||||
|
||||
"SWIM_SPEED": 95.0,
|
||||
"SWIM_GROUND_SPEED": 45.0,
|
||||
"SWIM_DECEL": 0.0,
|
||||
"SWIM_HEIGHT": 100.0,
|
||||
"SWIM_EXIT_SPEED": 250.0,
|
||||
"SWIM_GRAVITY": 2.5,
|
||||
"MAX_SWIM_FALL_SPEED": 200.0,
|
||||
},
|
||||
"Small": {
|
||||
"CROUCH_SCALE": 1.0,
|
||||
"CAN_BREAK_BRICKS": false,
|
||||
"CAN_BE_WALL_EJECTED": false,
|
||||
},
|
||||
"Big": {},
|
||||
"Fire": {},
|
||||
},
|
||||
"POWER_PARAMETERS": {
|
||||
"Default": {
|
||||
"POWER_STATE_RANGE": [0, 2],
|
||||
"POWER_TIER_RANGE": [0, 2],
|
||||
"STARTING_POWER_STATE": "Small",
|
||||
"STAR_TIME": 12.0,
|
||||
"WING_TIME": 10.0,
|
||||
|
|
@ -67,14 +158,16 @@
|
|||
"PROJ_TYPE": "",
|
||||
"PROJ_PARTICLE": "",
|
||||
|
||||
"PROJ_PARTICLE_ON_CONTACT": true,
|
||||
"PROJ_PARTICLE_ON_CONTACT": false,
|
||||
"PROJ_SFX_THROW": "fireball",
|
||||
"PROJ_SFX_COLLIDE": "bump",
|
||||
"PROJ_SFX_HIT": "kick",
|
||||
|
||||
"MAX_PROJ_COUNT": 2,
|
||||
"PROJ_COLLISION": true,
|
||||
"PROJ_DESTROY_ON_HIT": true,
|
||||
"PROJ_PIERCE_COUNT": 0,
|
||||
"PROJ_PIERCE_HITRATE": -1,
|
||||
"PROJ_BOUNCE_COUNT": -1,
|
||||
"PROJ_GROUND_BOUNCE": true,
|
||||
"PROJ_WALL_BOUNCE": false,
|
||||
"PROJ_CEIL_BOUNCE": false,
|
||||
|
|
@ -83,6 +176,7 @@
|
|||
"PROJ_LIFETIME": -1,
|
||||
"PROJ_OFFSET": [-4.0, 16.0],
|
||||
"PROJ_SPEED": [220.0, -100.0],
|
||||
"PROJ_SPEED_CAP": [-220.0, 220.0],
|
||||
"PROJ_SPEED_SCALING": false,
|
||||
|
||||
"PROJ_GROUND_DECEL": 0.0,
|
||||
|
|
@ -91,11 +185,13 @@
|
|||
"PROJ_BOUNCE_HEIGHT": 125.0,
|
||||
"PROJ_MAX_FALL_SPEED": 150.0,
|
||||
},
|
||||
"Small": {},
|
||||
"Small": {
|
||||
"PROJ_OFFSET": [-4.0, 8.0],
|
||||
},
|
||||
"Big": {},
|
||||
"Fire": {
|
||||
"PROJ_TYPE": "Entities/Items/Fireball",
|
||||
"PROJ_PARTICLE": "Particles/FireballExplosion",
|
||||
"PROJ_TYPE": "res://Scenes/Prefabs/Entities/Items/Fireball",
|
||||
"PROJ_PARTICLE": "res://Scenes/Prefabs/Particles/FireballExplosion",
|
||||
},
|
||||
},
|
||||
"ENDING_PARAMETERS": {
|
||||
|
|
@ -116,8 +212,8 @@
|
|||
"PEACH_ACCEL_MULT": 1.0,
|
||||
|
||||
"DOOR_POSE_OFFSET": 0.0,
|
||||
"TOAD_POSE_OFFSET": -16.0,
|
||||
"PEACH_POSE_OFFSET": -16.0,
|
||||
"TOAD_POSE_OFFSET": -12.0,
|
||||
"PEACH_POSE_OFFSET": -12.0,
|
||||
},
|
||||
"Small": {},
|
||||
"Big": {},
|
||||
|
|
@ -140,24 +236,26 @@
|
|||
"WING_OFFSET": [0.0, 0.0],
|
||||
"HAMMER_OFFSET": [0.0, -8.0],
|
||||
|
||||
"RAINBOW_STAR_FX_SPEED": 15.0,
|
||||
"RAINBOW_STAR_SLOW_FX_SPEED": 7.5,
|
||||
"RAINBOW_POWERUP_FX": true,
|
||||
"RAINBOW_FX_SPEED": 15.0,
|
||||
"MOVE_ANIM_SPEED_DIV": 32,
|
||||
|
||||
"JUMP_SFX": "big_jump",
|
||||
"GROUNDED_WALK_SFX": true,
|
||||
"GROUNDED_RUN_SFX": true,
|
||||
|
||||
"RAINBOW_STAR_FX_SPEED": 15.0,
|
||||
"RAINBOW_STAR_SLOW_FX_SPEED": 7.5,
|
||||
"RAINBOW_POWERUP_FX": true,
|
||||
"RAINBOW_FX_SPEED": 15.0,
|
||||
},
|
||||
"Small": {
|
||||
"WING_OFFSET": [0.0, 10.0],
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
"JUMP_SFX": "small_jump",
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
},
|
||||
"Big": {
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
},
|
||||
"Fire": {},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,26 @@
|
|||
"CAN_BREAK_BRICKS": true,
|
||||
"CAN_BE_WALL_EJECTED": true,
|
||||
|
||||
"JUMP_GRAVITY": 11.0,
|
||||
"JUMP_SPEED": 300.0,
|
||||
"JUMP_WALK_THRESHOLD": 60.0,
|
||||
"JUMP_RUN_THRESHOLD": 135.0,
|
||||
|
||||
"JUMP_GRAVITY_IDLE": 11.0,
|
||||
"JUMP_GRAVITY_WALK": 11.0,
|
||||
"JUMP_GRAVITY_RUN": 11.0,
|
||||
"JUMP_SPEED_IDLE": 300.0,
|
||||
"JUMP_SPEED_WALK": 300.0,
|
||||
"JUMP_SPEED_RUN": 300.0,
|
||||
"JUMP_INCR": 8.0,
|
||||
"JUMP_CANCEL_DIVIDE": 1.5,
|
||||
"JUMP_HOLD_SPEED_THRESHOLD": 0.0,
|
||||
|
||||
"BOUNCE_HEIGHT": 200.0,
|
||||
"CLASSIC_BOUNCE_BEHAVIOR": false,
|
||||
"BOUNCE_SPEED": 200.0,
|
||||
"BOUNCE_JUMP_SPEED": 300.0,
|
||||
|
||||
"FALL_GRAVITY": 25.0,
|
||||
"FALL_GRAVITY_IDLE": 25.0,
|
||||
"FALL_GRAVITY_WALK": 25.0,
|
||||
"FALL_GRAVITY_RUN": 25.0,
|
||||
"MAX_FALL_SPEED": 280.0,
|
||||
"CEILING_BUMP_SPEED": 45.0,
|
||||
|
||||
|
|
@ -31,18 +41,26 @@
|
|||
"RUN_SKID": 8.0,
|
||||
|
||||
"SKID_THRESHOLD": 100.0,
|
||||
"SKID_STOP_THRESHOLD": 10.0,
|
||||
"CAN_INSTANT_STOP_SKID": false,
|
||||
|
||||
"DECEL": 3.0,
|
||||
"GROUND_DECEL": 3.0,
|
||||
"LOCK_AIR_ACCEL": false,
|
||||
"AIR_WALK_ACCEL": 3.0,
|
||||
"AIR_RUN_ACCEL": 3.0,
|
||||
"AIR_DECEL": 0.0,
|
||||
"AIR_ACCEL": 3.0,
|
||||
"AIR_SKID": 1.5,
|
||||
"CAN_BACKWARDS_ACCEL_RUN": true,
|
||||
"AIR_BACKWARDS_ACCEL_MULT": 1.0,
|
||||
|
||||
"CLIMB_SPEED": 50.0,
|
||||
"CLIMB_UP_SPEED": 50.0,
|
||||
"CLIMB_DOWN_SPEED": 120.0,
|
||||
"TRAMPOLINE_SPEED": 500.0,
|
||||
"SUPER_TRAMPOLINE_SPEED": 1200.0,
|
||||
|
||||
"SWIM_SPEED": 95.0,
|
||||
"SWIM_GROUND_SPEED": 45.0,
|
||||
"SWIM_DECEL": 3.0,
|
||||
"SWIM_HEIGHT": 100.0,
|
||||
"SWIM_EXIT_SPEED": 250.0,
|
||||
"SWIM_GRAVITY": 2.5,
|
||||
|
|
@ -56,9 +74,82 @@
|
|||
"Big": {},
|
||||
"Fire": {},
|
||||
},
|
||||
"CLASSIC_PARAMETERS": {
|
||||
"Default": {
|
||||
"HITBOX_SCALE": [1.0, 1.0],
|
||||
"CROUCH_SCALE": 0.5,
|
||||
"CAN_AIR_TURN": false,
|
||||
"CAN_BREAK_BRICKS": true,
|
||||
"CAN_BE_WALL_EJECTED": true,
|
||||
|
||||
"JUMP_WALK_THRESHOLD": 60.0,
|
||||
"JUMP_RUN_THRESHOLD": 135.0,
|
||||
|
||||
"JUMP_GRAVITY_IDLE": 7.5,
|
||||
"JUMP_GRAVITY_WALK": 7.03,
|
||||
"JUMP_GRAVITY_RUN": 9.375,
|
||||
"JUMP_SPEED_IDLE": 248.0,
|
||||
"JUMP_SPEED_WALK": 248.0,
|
||||
"JUMP_SPEED_RUN": 310.0,
|
||||
"JUMP_INCR": 0.0,
|
||||
"JUMP_CANCEL_DIVIDE": 1.0,
|
||||
"JUMP_HOLD_SPEED_THRESHOLD": 0.0,
|
||||
|
||||
"CLASSIC_BOUNCE_BEHAVIOR": true,
|
||||
"BOUNCE_SPEED": 248.0,
|
||||
"BOUNCE_JUMP_SPEED": 248.0,
|
||||
|
||||
"FALL_GRAVITY_IDLE": 26.25,
|
||||
"FALL_GRAVITY_WALK": 22.5,
|
||||
"FALL_GRAVITY_RUN": 33.75,
|
||||
"MAX_FALL_SPEED": 255.0,
|
||||
"CEILING_BUMP_SPEED": 45.0,
|
||||
|
||||
"WALK_SPEED": 90.0,
|
||||
"GROUND_WALK_ACCEL": 2.23,
|
||||
"WALK_SKID": 6.1,
|
||||
|
||||
"RUN_SPEED": 150.0,
|
||||
"GROUND_RUN_ACCEL": 3.34,
|
||||
"RUN_SKID": 6.1,
|
||||
|
||||
"SKID_THRESHOLD": 100.0,
|
||||
"SKID_STOP_THRESHOLD": 33.75,
|
||||
"CAN_INSTANT_STOP_SKID": true,
|
||||
|
||||
"GROUND_DECEL": 3.05,
|
||||
"LOCK_AIR_ACCEL": true,
|
||||
"AIR_WALK_ACCEL": 2.23,
|
||||
"AIR_RUN_ACCEL": 3.34,
|
||||
"AIR_DECEL": 0.0,
|
||||
"AIR_SKID": 6.1,
|
||||
"CAN_BACKWARDS_ACCEL_RUN": false,
|
||||
"AIR_BACKWARDS_ACCEL_MULT": 2.0,
|
||||
|
||||
"CLIMB_UP_SPEED": 50.0,
|
||||
"CLIMB_DOWN_SPEED": 120.0,
|
||||
"TRAMPOLINE_SPEED": 500.0,
|
||||
"SUPER_TRAMPOLINE_SPEED": 1200.0,
|
||||
|
||||
"SWIM_SPEED": 95.0,
|
||||
"SWIM_GROUND_SPEED": 45.0,
|
||||
"SWIM_DECEL": 0.0,
|
||||
"SWIM_HEIGHT": 100.0,
|
||||
"SWIM_EXIT_SPEED": 250.0,
|
||||
"SWIM_GRAVITY": 2.5,
|
||||
"MAX_SWIM_FALL_SPEED": 200.0,
|
||||
},
|
||||
"Small": {
|
||||
"CROUCH_SCALE": 1.0,
|
||||
"CAN_BREAK_BRICKS": false,
|
||||
"CAN_BE_WALL_EJECTED": false,
|
||||
},
|
||||
"Big": {},
|
||||
"Fire": {},
|
||||
},
|
||||
"POWER_PARAMETERS": {
|
||||
"Default": {
|
||||
"POWER_STATE_RANGE": [0, 2],
|
||||
"POWER_TIER_RANGE": [0, 2],
|
||||
"STARTING_POWER_STATE": "Small",
|
||||
"STAR_TIME": 12.0,
|
||||
"WING_TIME": 10.0,
|
||||
|
|
@ -67,14 +158,16 @@
|
|||
"PROJ_TYPE": "",
|
||||
"PROJ_PARTICLE": "",
|
||||
|
||||
"PROJ_PARTICLE_ON_CONTACT": true,
|
||||
"PROJ_PARTICLE_ON_CONTACT": false,
|
||||
"PROJ_SFX_THROW": "fireball",
|
||||
"PROJ_SFX_COLLIDE": "bump",
|
||||
"PROJ_SFX_HIT": "kick",
|
||||
|
||||
"MAX_PROJ_COUNT": 2,
|
||||
"PROJ_COLLISION": true,
|
||||
"PROJ_DESTROY_ON_HIT": true,
|
||||
"PROJ_PIERCE_COUNT": 0,
|
||||
"PROJ_PIERCE_HITRATE": -1,
|
||||
"PROJ_BOUNCE_COUNT": -1,
|
||||
"PROJ_GROUND_BOUNCE": true,
|
||||
"PROJ_WALL_BOUNCE": false,
|
||||
"PROJ_CEIL_BOUNCE": false,
|
||||
|
|
@ -83,6 +176,7 @@
|
|||
"PROJ_LIFETIME": -1,
|
||||
"PROJ_OFFSET": [-4.0, 16.0],
|
||||
"PROJ_SPEED": [220.0, -100.0],
|
||||
"PROJ_SPEED_CAP": [-220.0, 220.0],
|
||||
"PROJ_SPEED_SCALING": false,
|
||||
|
||||
"PROJ_GROUND_DECEL": 0.0,
|
||||
|
|
@ -91,11 +185,13 @@
|
|||
"PROJ_BOUNCE_HEIGHT": 125.0,
|
||||
"PROJ_MAX_FALL_SPEED": 150.0,
|
||||
},
|
||||
"Small": {},
|
||||
"Small": {
|
||||
"PROJ_OFFSET": [-4.0, 8.0],
|
||||
},
|
||||
"Big": {},
|
||||
"Fire": {
|
||||
"PROJ_TYPE": "Entities/Items/Fireball",
|
||||
"PROJ_PARTICLE": "Particles/FireballExplosion",
|
||||
"PROJ_TYPE": "res://Scenes/Prefabs/Entities/Items/Fireball",
|
||||
"PROJ_PARTICLE": "res://Scenes/Prefabs/Particles/FireballExplosion",
|
||||
},
|
||||
},
|
||||
"ENDING_PARAMETERS": {
|
||||
|
|
@ -116,8 +212,8 @@
|
|||
"PEACH_ACCEL_MULT": 1.0,
|
||||
|
||||
"DOOR_POSE_OFFSET": 0.0,
|
||||
"TOAD_POSE_OFFSET": -16.0,
|
||||
"PEACH_POSE_OFFSET": -16.0,
|
||||
"TOAD_POSE_OFFSET": -12.0,
|
||||
"PEACH_POSE_OFFSET": -12.0,
|
||||
},
|
||||
"Small": {},
|
||||
"Big": {},
|
||||
|
|
@ -140,24 +236,26 @@
|
|||
"WING_OFFSET": [0.0, 0.0],
|
||||
"HAMMER_OFFSET": [0.0, -8.0],
|
||||
|
||||
"RAINBOW_STAR_FX_SPEED": 15.0,
|
||||
"RAINBOW_STAR_SLOW_FX_SPEED": 7.5,
|
||||
"RAINBOW_POWERUP_FX": true,
|
||||
"RAINBOW_FX_SPEED": 15.0,
|
||||
"MOVE_ANIM_SPEED_DIV": 32,
|
||||
|
||||
"JUMP_SFX": "big_jump",
|
||||
"GROUNDED_WALK_SFX": true,
|
||||
"GROUNDED_RUN_SFX": true,
|
||||
|
||||
"RAINBOW_STAR_FX_SPEED": 15.0,
|
||||
"RAINBOW_STAR_SLOW_FX_SPEED": 7.5,
|
||||
"RAINBOW_POWERUP_FX": true,
|
||||
"RAINBOW_FX_SPEED": 15.0,
|
||||
},
|
||||
"Small": {
|
||||
"WING_OFFSET": [0.0, 10.0],
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
"JUMP_SFX": "small_jump",
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
},
|
||||
"Big": {
|
||||
"RAINBOW_POWERUP_FX": false,
|
||||
},
|
||||
"Fire": {},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,6 +192,7 @@ DIFFI_LEVEL_DESIGN,Adjusts level design to actually be fair,Level Design,Concept
|
|||
DIFFI_TIME,Enables the time limit,Time Limit,Limite de temps,Limit Czasu,Лиmиt bpemehи,Tiempo Limite,Limite di tempo,TIME LIMIT,Limit ng Oras,Zeitlimit,Zaman Lİmİtİ,Batas waktu,Tempo Limite,せいげん じかん
|
||||
DIFFI_LAKITU,,Lakitu Style,Style de Lakitu,Styl Lakitu,ctиль ЛakиtУ,Estilo Lakitu,Stile lakitu,LAKITU STYLE,Style ng Lakitu,Lakitu-Modus,Lakİtu Stİlİ,Gaya Lakitu,Estilo de Lakitu,ジュゲム・スタイル
|
||||
DIFFI_BACKSCROLL,"Allows you to move backwards in all levels, unless a custom level says no",Back Scroll,Retour Arrière,Przewijanie Wsteczne,ПpokpУtka haзaд,Scroll hacia atras,Back Scroll,BACK SCROLL,Free Camera,Freie Kamera,Gerİ Kaydırma,Scroll Kembali,Rolagem Para Trás,スクロールかいじょ
|
||||
DIFFI_PHYSICS,,Physics Style,Style de physique,Styl fizyki,Стиль физики,Estilo de física,Stile fisica,PHYSICS STYLE,Style ng Physics,Physik-Modus,Fizik Stili,Gaya Fisika,Estilo de física,物理スタイル
|
||||
DIFFI_GAME_OVER_LVL,,Start of Level,Début du niveau,Początek Poziomu,haчatь c Уpobhя,Inicio del nivel,Inizio del livello,START OF LEVEL,Start ng Lebel,Levelanfang,Level Başlangıçı,Awal Level,Começo do Nível,ステージから かいし
|
||||
DIFFI_GAME_OVER_WLD,,Start of World,Début du monde,Początek Świata,haчatь c mиpa,Inicio del mundo,Inizio del mondo,START OF WORLD,Start ng Mundo,Weltanfang,Dünya Başlangıçı,Awal Dunia,Começo do Mundo,ワールドから かいし
|
||||
DIFFI_GAME_OVER_GME,,Start of Game,Début du jeu,Początek Gry,haчatь c Игpы,Inicio del juego,Inizio del gioco,START OF GAME,Start ng Laro,Spielanfang,Oyun Başlangıçı,Awal Permainan,Começo do Jogo,ゲームから かいし
|
||||
|
|
@ -224,6 +225,8 @@ DESC_BACKSCROLL_0,,"You cannot move backwards in levels (unless a custom level a
|
|||
DESC_BACKSCROLL_1,,You can move backwards in all levels (unless a custom level prevents it),Vous pouvez retournez en arrière (sauf si un niveau custom vous l'en empêche),Możesz iść do tyłu (chyba że poziom użytnikowa na to nie pozwala) ,"bы moжete дbигatьcя haзaд ha Уpobhяx (kpome, ecли пoльзobateльckий Уpobehь he пoзboляet)",Puedes retroceder en todos los niveles (a menos que un nivel personalizado lo impida).,Puoi tornare indietro nei livelli (a meno che un livello creato dall'utente non lo consente).,YOU CAN MOVE BACKWARDS IN ALL LEVELS (UNLESS A CUSTOM LEVEL PREVENTS IT),"Free Camera, maliban kung pinagbawal sa custom games","Die Kamera kann sich auch nach links bewegen, ausser wenn ein nutzererstelltes Level es nicht erlaubt.",Tüm levellerde gerİye doğru hareket edebİlİrsİnİz (özel bİr level bunu engellemedİğİ sürece),Anda dapat bergerak mundur di semua level (kecuali level kustom mencegahnya),"Você pode andar para trás em todos os níveis (a menos que um nível customizado não o permita), Experiência recomendada.",デフォルトステージモード:もどることはできる。
|
||||
DESC_LAKITU_0,,"Lakitu will throw spinies straight upwards, exactly like in the original games. (was due to a bug)","Lakitu jettera des Hériss en ligne droite verticale, comme il le faisait dans les jeux originaux (à cause d'un bug)","Lakitu rzuca kolczastych prosto w górę, dokładnie jak w oryginale. (Oryginalnie niezamierzane)","ЛakиtУ бУдet пoдбpacыbatь koлючkУ пpяmo bbepx, b toчhoctи kak b opигиhaльhыx игpax. (эto пpoизoшлo из-зa oшибkи)","Lakitu lanzará a los Spiny directamente hacia arriba, exactamente igual que en los juegos originales. (debido a un error)","Lakitu lancerà i koopistrici verticalmente verso l'alto, esattamente come nel gioco originale (questo era a causa di un bug).","LAKITU WILL THROW SPINIES STRAIGHT UPWARDS, EXACTLY LIKE IN THE ORIGINAL GAMES. (WAS DUE TO A BUG)","Pataas, Klasik na pagtapon ng Lakitu ng spiny","Lakitu wirft Stachis senkrecht nach oben, wie bei den Originalspielen. (Dies passierte aufgrund eines Bugs)",Lakİtu orİjİnal oyunlardakİ gİbİ Spİny'lerİ dümdüz yukarı doğru fırlatacak. (bİr hata nedenİyle),"Lakitu akan melemparkan spiny lurus ke atas, persis seperti di game aslinya. (disebabkan oleh bug)","Lakitus vão arremessar spinys direto para cima, que nem no jogo original.",トゲゾーが うえに なげられる。
|
||||
DESC_LAKITU_1,,"Lakitu will throw spinies diagonally up, which was the originally intended behaviour.","Lakitu jettera des Hériss en diagonal, ce qui était le comportement originalement prévu. ","Lakitu rzuca kolczastych ukośnie do góry, tak jak miało być w oryginale.","ЛakиtУ пoдбpacыbaet koлючkУ пo диaгohaли bbepx, чto и былo изhaчaльho зaдУmaho.","Lakitu lanzará a los Spiny en diagonal hacia arriba, que era el comportamiento previsto originalmente.","Lakitu lancerà i koopistrici in diagonale verso l'alto, il comportamento originariamente inteso.","LAKITU WILL THROW SPINIES DIAGONALLY UP, WHICH WAS THE ORIGINALLY INTENDED BEHAVIOUR.","Pasulong, Maayos na pagtapon ng Lakitu ng mga spiny","Lakitu wirft Stachis diagonal nach oben, was das eigentliche Verhalten von Lakitu sein sollte.","Lakİtu, Spİny düşmanlarını çapraz olarak yukarı fırlatacak, düzeltİlmİş davranış.","Lakitu akan melemparkan spiny secara diagonal ke atas, yang merupakan perilaku yang dimaksudkan pada awalnya.","Lakitus vão arremessar spinys diagonalmente para cima, o que era originalmente pretendido",トゲゾーが ななめうえに なげられる。
|
||||
DESC_PHYSICS_0,,"The classic physics recreated.","La physique classique recréée.","Odtworzona klasyczna fizyka.","Воссозданная классическая физика.","La física clásica recreada.","La fisica classica ricreata.","THE CLASSIC PHYSICS RECREATED.","Ang klasikong physics na muling nilikha.","Die klassische Physik nachgebildet.","Klasik fizik yeniden yaratıldı.","Fisika klasik yang diciptakan ulang.","A física clássica recriada.","クラシックな物理を再現。"
|
||||
DESC_PHYSICS_1,,"Modern and improved physics.","Physique moderne et améliorée.","Nowoczesna i ulepszona fizyka.","Современная и улучшенная физика.","Física moderna y mejorada.","Fisica moderna e migliorata.","MODERN AND IMPROVED PHYSICS.","Modernong at pinahusay na physics.","Moderne und verbesserte Physik.","Modern ve geliştirilmiş fizik.","Fisika modern dan ditingkatkan.","Física moderna e melhorada.","モダンで改良された物理。"
|
||||
ACTION_JUMP,,Jump,Sauter,Skok,Пpыжok,Saltar,Salta,JUMP,Jump,Springen,Zıpla,Lompat,Pular,ジャンプ
|
||||
ACTION_RUN,,Run,Courir,Bieg,Бeг,Correr,Corri,RUN,Kilos,Rennen,Koş,Lari,Correr,ダッシュ
|
||||
ACTION_ACTION,"Terrible name, but basically the ""action button"", used for fireballs and powerup actions",Action,Action,Akcja,Дeйctbиe,Acción,Azione,ACTION,Aksyon,Aktion,Aksİyon,Aksi,Ação,アクション
|
||||
|
|
|
|||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -58,7 +58,7 @@ slide_on_ceiling = false
|
|||
script = ExtResource("1_00jom")
|
||||
is_friendly = true
|
||||
PARTICLE = ExtResource("2_ajyso")
|
||||
DESTROY_ON_HIT = true
|
||||
PIERCE_COUNT = 0
|
||||
GROUND_BOUNCE = true
|
||||
MOVE_SPEED = 220
|
||||
GRAVITY = 15
|
||||
|
|
|
|||
|
|
@ -591,13 +591,21 @@ size_flags_vertical = 3
|
|||
theme_override_constants/separation = -4
|
||||
script = ExtResource("4_avtty")
|
||||
category_name = "SETTINGS_DIFFICULTY"
|
||||
options = [NodePath("DamageStyle"), NodePath("Checkpoints"), NodePath("ExtraCheckpoints"), NodePath("Lives"), NodePath("FlagpoleLives"), NodePath("GameOverStyle"), NodePath("LevelDesign"), NodePath("BackScroll"), NodePath("TimeLimit"), NodePath("LakituStyle")]
|
||||
options = [NodePath("PhysicsStyle"), NodePath("DamageStyle"), NodePath("Checkpoints"), NodePath("ExtraCheckpoints"), NodePath("Lives"), NodePath("FlagpoleLives"), NodePath("GameOverStyle"), NodePath("LevelDesign"), NodePath("BackScroll"), NodePath("TimeLimit"), NodePath("LakituStyle")]
|
||||
description_node = NodePath("Description/AutoScrollContainer/MarginContainer/Desc")
|
||||
|
||||
[node name="Control" type="Control" parent="PanelContainer/MarginContainer/VBoxContainer/Difficulty"]
|
||||
custom_minimum_size = Vector2(0, 4)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PhysicsStyle" parent="PanelContainer/MarginContainer/VBoxContainer/Difficulty" groups=["Options"] instance=ExtResource("3_dl6kk")]
|
||||
layout_mode = 2
|
||||
option_key = "physics_style"
|
||||
title = "DIFFI_PHYSICS"
|
||||
value_descs = Array[String](["DESC_PHYSICS_0", "DESC_PHYSICS_1"])
|
||||
values = ["SETTINGS_CLASSIC", "SETTINGS_MODERN"]
|
||||
settings_category = "difficulty"
|
||||
|
||||
[node name="DamageStyle" parent="PanelContainer/MarginContainer/VBoxContainer/Difficulty" groups=["Options"] instance=ExtResource("3_dl6kk")]
|
||||
layout_mode = 2
|
||||
option_key = "damage_style"
|
||||
|
|
@ -1021,6 +1029,7 @@ script = ExtResource("19_k6yev")
|
|||
[connection signal="button_pressed" from="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/SelectableOptionNode2" to="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/ResourcePackLoader" method="get_resource_packs"]
|
||||
[connection signal="button_pressed" from="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/SelectableOptionNode3" to="ResourcePackTemplateCreator" method="create_template"]
|
||||
[connection signal="button_pressed" from="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/SelectableOptionNode3" to="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/SelectableOptionNode3" method="set_title" binds= ["Creating Resource Pack..."]]
|
||||
[connection signal="value_changed" from="PanelContainer/MarginContainer/VBoxContainer/Difficulty/PhysicsStyle" to="PanelContainer/MarginContainer/VBoxContainer/Difficulty/DifficultySetter" method="physics_style_changed"]
|
||||
[connection signal="value_changed" from="PanelContainer/MarginContainer/VBoxContainer/Difficulty/DamageStyle" to="PanelContainer/MarginContainer/VBoxContainer/Difficulty/DifficultySetter" method="damage_style_changed"]
|
||||
[connection signal="value_changed" from="PanelContainer/MarginContainer/VBoxContainer/Difficulty/Checkpoints" to="PanelContainer/MarginContainer/VBoxContainer/Difficulty/DifficultySetter" method="checkpoint_changed"]
|
||||
[connection signal="value_changed" from="PanelContainer/MarginContainer/VBoxContainer/Difficulty/ExtraCheckpoints" to="PanelContainer/MarginContainer/VBoxContainer/Difficulty/DifficultySetter" method="extra_checkpoints_changed"]
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ func bounce_bodies() -> void:
|
|||
i.jump_cancelled = false
|
||||
i.has_jumped = true
|
||||
i.velocity.y = -350
|
||||
i.gravity = i.physics_params("JUMP_GRAVITY")
|
||||
i.gravity = i.calculate_speed_param("JUMP_GRAVITY")
|
||||
else:
|
||||
i.velocity.y = -300
|
||||
i.gravity = i.FALL_GRAVITY
|
||||
i.gravity = i.calculate_speed_param("FALL_GRAVITY")
|
||||
else:
|
||||
i.velocity.y = -200
|
||||
if i is Thwomp:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ func bounce_player(player: Player) -> void:
|
|||
if player.global_position.y + 8 < global_position.y:
|
||||
player.velocity.x *= 0.8
|
||||
if Global.player_action_pressed("jump", player.player_id):
|
||||
player.gravity = player.physics_params("JUMP_GRAVITY")
|
||||
player.gravity = player.calculate_speed_param("JUMP_GRAVITY")
|
||||
player.jump_cancelled = false
|
||||
player.velocity.y = HIGH_STRENGTH
|
||||
player.has_jumped = true
|
||||
|
|
@ -20,7 +20,7 @@ func bounce_player(player: Player) -> void:
|
|||
else:
|
||||
player.velocity = global_position.direction_to(player.global_position) * 200
|
||||
if Global.player_action_pressed("jump", player.player_id):
|
||||
player.gravity = player.physics_params("JUMP_GRAVITY")
|
||||
player.gravity = player.calculate_speed_param("JUMP_GRAVITY")
|
||||
player.velocity.y = LOW_STRENGTH
|
||||
player.has_jumped = true
|
||||
AudioManager.play_sfx("bumper_high", global_position)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ func _physics_process(delta: float) -> void:
|
|||
global_position.x += 48 * delta
|
||||
|
||||
func on_player_entered(player: Player) -> void:
|
||||
if player.velocity.y > -player.FALL_GRAVITY:
|
||||
if player.velocity.y > -player.calculate_speed_param("FALL_GRAVITY"):
|
||||
active = true
|
||||
|
||||
func reset() -> void:
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@ func bounce_players() -> void:
|
|||
if Global.player_action_pressed("jump", player.player_id):
|
||||
high_bounce = true
|
||||
player.velocity.y = -player.physics_params(trampoline_type + "_SPEED")
|
||||
player.gravity = player.physics_params("JUMP_GRAVITY")
|
||||
player.gravity = player.calculate_speed_param("JUMP_GRAVITY")
|
||||
player.has_jumped = true
|
||||
player.has_spring_jumped = true
|
||||
else:
|
||||
player.velocity.y = -player.physics_params("JUMP_SPEED")
|
||||
player.velocity.y = -player.calculate_speed_param("JUMP_SPEED")
|
||||
if high_bounce:
|
||||
AudioManager.play_sfx("spring", global_position)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ class_name Player
|
|||
extends CharacterBody2D
|
||||
|
||||
#region Intended modifiable properties, can be changed in a character's CharacterInfo.json
|
||||
# SkyanUltra: Moved physics/death parameters into their own dictionaries.
|
||||
# This makes it possible to modify character physics
|
||||
# SkyanUltra: Moved physics/death parameters into their own nested dictionaries.
|
||||
# This makes it possible to modify character physics to a much greater extent,
|
||||
# allowing for power-state specific parameters while still limiting the player's
|
||||
# modifications to a specific degree to prevent cheating.
|
||||
## Determines various important values of the player character.
|
||||
@export_group("Player Parameters")
|
||||
## Determines the physics properties of the player character, such as general movement values, hitboxes, and other typical behavior.
|
||||
|
|
@ -14,56 +16,63 @@ extends CharacterBody2D
|
|||
"CAN_AIR_TURN": false, # Determines if the player can turn in mid-air.
|
||||
"CAN_BREAK_BRICKS": true, # Determines if the player can break bricks in their current form.
|
||||
"CAN_BE_WALL_EJECTED": true, # Determines if the player gets pushed out of blocks if inside of them.
|
||||
#"USE_CLASSIC_PARAMS": false, # Determines whether or not to use classic physics params.
|
||||
|
||||
"JUMP_GRAVITY": 11.0, # The player's gravity while jumping, measured in px/frame.
|
||||
#"CLASSIC_JUMP_GRAVITY_IDLE": 0.0, # TODO: Implement this parameter.
|
||||
#"CLASSIC_JUMP_GRAVITY_WALK": 0.0, # TODO: Implement this parameter.
|
||||
#"CLASSIC_JUMP_GRAVITY_RUN": 0.0, # TODO: Implement this parameter.
|
||||
"JUMP_SPEED": 300.0, # The strength of the player's jump, measured in px/sec.
|
||||
#"CLASSIC_JUMP_SPEED_IDLE": 0.0, # TODO: Implement this parameter.
|
||||
#"CLASSIC_JUMP_SPEED_WALK": 0.0, # TODO: Implement this parameter.
|
||||
#"CLASSIC_JUMP_SPEED_RUN": 0.0, # TODO: Implement this parameter.
|
||||
"JUMP_WALK_THRESHOLD": 60.0, # The minimum velocity the player must move at to perform a walking jump.
|
||||
"JUMP_RUN_THRESHOLD": 135.0, # The minimum velocity the player must move at to perform a running jump.
|
||||
|
||||
"JUMP_GRAVITY_IDLE": 11.0, # The player's gravity while jumping from an idle state, measured in px/frame.
|
||||
"JUMP_GRAVITY_WALK": 11.0, # The player's gravity while jumping from a walking state, measured in px/frame.
|
||||
"JUMP_GRAVITY_RUN": 11.0, # The player's gravity while jumping from a running state, measured in px/frame.
|
||||
"JUMP_SPEED_IDLE": 300.0, # The strength of the player's idle jump, measured in px/sec.
|
||||
"JUMP_SPEED_WALK": 300.0, # The strength of the player's walking jump, measured in px/sec.
|
||||
"JUMP_SPEED_RUN": 300.0, # The strength of the player's running jump, measured in px/sec.
|
||||
"JUMP_INCR": 8.0, # How much the player's X velocity affects their jump speed.
|
||||
"JUMP_CANCEL_DIVIDE": 1.5, # When the player cancels their jump, their Y velocity gets divided by this value.
|
||||
"JUMP_HOLD_SPEED_THRESHOLD": 0.0, # When the player's Y velocity goes past this value while jumping, their gravity switches to FALL_GRAVITY.
|
||||
|
||||
"BOUNCE_HEIGHT": 200.0, # The strength at which the player bounces off enemies, measured in px/sec
|
||||
"BOUNCE_JUMP_SPEED": 300.0, # The strength at which the player bounces off enemies while holding jump, measured in px/sec
|
||||
"CLASSIC_BOUNCE_BEHAVIOR": false, # Determines if the player can only get extra height from a bounce with upward velocity, as opposed to holding jump.
|
||||
"BOUNCE_SPEED": 200.0, # The strength at which the player bounces off enemies without any extra input, measured in px/sec.
|
||||
"BOUNCE_JUMP_SPEED": 300.0, # The strength at which the player bounces off enemies while holding jump, measured in px/sec.
|
||||
|
||||
"FALL_GRAVITY": 25.0, # The player's gravity while falling, measured in px/frame
|
||||
#"CLASSIC_FALL_GRAVITY_IDLE": 0.0, # TODO: Implement this parameter.
|
||||
#"CLASSIC_FALL_GRAVITY_WALK": 0.0, # TODO: Implement this parameter.
|
||||
#"CLASSIC_FALL_GRAVITY_RUN": 0.0, # TODO: Implement this parameter.
|
||||
"MAX_FALL_SPEED": 280.0, # The player's maximum fall speed, measured in px/sec
|
||||
"CEILING_BUMP_SPEED": 45.0, # The speed at which the player falls after hitting a ceiling, measured in px/sec
|
||||
"FALL_GRAVITY_IDLE": 25.0, # The player's gravity while falling from an idle state, measured in px/frame.
|
||||
"FALL_GRAVITY_WALK": 25.0, # The player's gravity while falling from a walking state, measured in px/frame.
|
||||
"FALL_GRAVITY_RUN": 25.0, # The player's gravity while falling from a running state, measured in px/frame.
|
||||
"MAX_FALL_SPEED": 280.0, # The player's maximum fall speed, measured in px/sec.
|
||||
"CEILING_BUMP_SPEED": 45.0, # The speed at which the player falls after hitting a ceiling, measured in px/sec.
|
||||
|
||||
"WALK_SPEED": 96.0, # The player's speed while walking, measured in px/sec
|
||||
"GROUND_WALK_ACCEL": 4.0, # The player's acceleration while walking, measured in px/frame
|
||||
"WALK_SKID": 8.0, # The player's turning deceleration while running, measured in px/frame
|
||||
"WALK_SPEED": 96.0, # The player's speed while walking, measured in px/sec.
|
||||
"GROUND_WALK_ACCEL": 4.0, # The player's acceleration while walking, measured in px/frame.
|
||||
"WALK_SKID": 8.0, # The player's turning deceleration while running, measured in px/frame.
|
||||
|
||||
"RUN_SPEED": 160.0, # The player's speed while running, measured in px/sec
|
||||
"GROUND_RUN_ACCEL": 1.25, # The player's acceleration while running, measured in px/frame
|
||||
"RUN_SKID": 8.0, # The player's turning deceleration while running, measured in px/frame
|
||||
"RUN_SPEED": 160.0, # The player's speed while running, measured in px/sec.
|
||||
"GROUND_RUN_ACCEL": 1.25, # The player's acceleration while running, measured in px/frame.
|
||||
"RUN_SKID": 8.0, # The player's turning deceleration while running, measured in px/frame.
|
||||
|
||||
#"INSTANT_TURN_THRESHOLD": 0.0, # TODO: Implement this parameter.
|
||||
"SKID_THRESHOLD": 100.0, # The horizontal speed required, to be able to start skidding.
|
||||
"SKID_STOP_THRESHOLD": 10.0, # The maximum velocity required before the player will stop skidding.
|
||||
"CAN_INSTANT_STOP_SKID": false, # Determines if the player will instantly stop upon reaching the skid threshold.
|
||||
|
||||
"DECEL": 3.0, # The player's deceleration while no buttons are pressed, measured in px/frame
|
||||
"AIR_DECEL": 0.0, # The player's airborne deceleration while no buttons are pressed, measured in px/frame
|
||||
"AIR_ACCEL": 3.0, # The player's acceleration while in midair, measured in px/frame
|
||||
"AIR_SKID": 1.5, # The player's turning deceleration while in midair, measured in px/frame
|
||||
"GROUND_DECEL": 3.0, # The player's grounded deceleration while no buttons are pressed, measured in px/frame.
|
||||
"LOCK_AIR_ACCEL": false, # Determines if the player can surpass their walk speed while in the air, aside from on trampolines.
|
||||
"AIR_WALK_ACCEL": 3.0, # The player's acceleration while in midair, measured in px/frame.
|
||||
"AIR_RUN_ACCEL": 3.0, # The player's acceleration while in midair, measured in px/frame.
|
||||
"AIR_DECEL": 0.0, # The player's airborne deceleration while no buttons are pressed, measured in px/frame.
|
||||
"AIR_SKID": 1.5, # The player's turning deceleration while in midair, measured in px/frame.
|
||||
"CAN_BACKWARDS_ACCEL_RUN": true, # Determines if the player can experience running acceleration when moving backwards in the air.
|
||||
"AIR_BACKWARDS_ACCEL_MULT": 1.0, # Determines a multiplier to the player's acceleration when moving backwards in the air.
|
||||
|
||||
"CLIMB_SPEED": 50.0, # The player's speed while climbing, measured in px/sec.
|
||||
"CLIMB_UP_SPEED": 50.0, # The player's speed while climbing upwards, measured in px/sec.
|
||||
"CLIMB_DOWN_SPEED": 120.0, # The player's speed while climbing downwards, measured in px/sec.
|
||||
"TRAMPOLINE_SPEED": 500.0, # The strength of a jump on a trampoline, measured in px/sec.
|
||||
"SUPER_TRAMPOLINE_SPEED": 1200.0, # The strength of a jump on a super trampoline, measured in px/sec.
|
||||
|
||||
"SWIM_SPEED": 95.0, # The player's horizontal speed while swimming, measured in px/sec
|
||||
"SWIM_GROUND_SPEED": 45.0, # The player's horizontal speed while grounded underwater, measured in px/sec
|
||||
"SWIM_HEIGHT": 100.0, # The strength of the player's swim, measured in px/sec
|
||||
"SWIM_EXIT_SPEED": 250.0, # The strength of the player's jump out of water, measured in px/sec
|
||||
"SWIM_GRAVITY": 2.5, # The player's gravity while swimming, measured in px/frame
|
||||
"MAX_SWIM_FALL_SPEED": 200.0, # The player's maximum fall speed while swimming, measured in px/sec
|
||||
"SWIM_SPEED": 95.0, # The player's horizontal speed while swimming, measured in px/sec.
|
||||
"SWIM_GROUND_SPEED": 45.0, # The player's horizontal speed while grounded underwater, measured in px/sec.
|
||||
"SWIM_DECEL": 3.0, # The player's deceleration in water while no buttons are pressed, measured in px/frame.
|
||||
"SWIM_HEIGHT": 100.0, # The strength of the player's swim, measured in px/sec.
|
||||
"SWIM_EXIT_SPEED": 250.0, # The strength of the player's jump out of water, measured in px/sec.
|
||||
"SWIM_GRAVITY": 2.5, # The player's gravity while swimming, measured in px/frame.
|
||||
"MAX_SWIM_FALL_SPEED": 200.0, # The player's maximum fall speed while swimming, measured in px/sec.
|
||||
},
|
||||
"Small": {
|
||||
"CROUCH_SCALE": 0.75,
|
||||
|
|
@ -73,10 +82,84 @@ extends CharacterBody2D
|
|||
"Big": {},
|
||||
"Fire": {},
|
||||
}
|
||||
## Determines the physics properties of the character while "Classic Physics" are enabled.
|
||||
@export var CLASSIC_PARAMETERS: Dictionary = {
|
||||
"Default": { # This uses the same parameters as PHYSICS_PARAMETERS and should be updated whenever new parameters are added.
|
||||
"HITBOX_SCALE": [1.0, 1.0], # The player's hitbox scale.
|
||||
"CROUCH_SCALE": 0.5, # The player's hitbox scale when crouched.
|
||||
"CAN_AIR_TURN": false, # Determines if the player can turn in mid-air.
|
||||
"CAN_BREAK_BRICKS": true, # Determines if the player can break bricks in their current form.
|
||||
"CAN_BE_WALL_EJECTED": true, # Determines if the player gets pushed out of blocks if inside of them.
|
||||
|
||||
"JUMP_WALK_THRESHOLD": 60.0, # The minimum velocity the player must move at to perform a walking jump.
|
||||
"JUMP_RUN_THRESHOLD": 135.0, # The minimum velocity the player must move at to perform a running jump.
|
||||
|
||||
"JUMP_GRAVITY_IDLE": 7.5, # The player's gravity while jumping from an idle state, measured in px/frame.
|
||||
"JUMP_GRAVITY_WALK": 7.03, # The player's gravity while jumping from a walking state, measured in px/frame.
|
||||
"JUMP_GRAVITY_RUN": 9.375, # The player's gravity while jumping from a running state, measured in px/frame.
|
||||
"JUMP_SPEED_IDLE": 248.0, # The strength of the player's idle jump, measured in px/sec.
|
||||
"JUMP_SPEED_WALK": 248.0, # The strength of the player's walking jump, measured in px/sec.
|
||||
"JUMP_SPEED_RUN": 310.0, # The strength of the player's running jump, measured in px/sec.
|
||||
"JUMP_INCR": 0.0, # How much the player's X velocity affects their jump speed.
|
||||
"JUMP_CANCEL_DIVIDE": 1.0, # When the player cancels their jump, their Y velocity gets divided by this value.
|
||||
"JUMP_HOLD_SPEED_THRESHOLD": 0.0, # When the player's Y velocity goes past this value while jumping, their gravity switches to FALL_GRAVITY.
|
||||
|
||||
"CLASSIC_BOUNCE_BEHAVIOR": true, # Determines if the player can only get extra height from a bounce with upward velocity, as opposed to holding jump.
|
||||
"BOUNCE_SPEED": 248.0, # The strength at which the player bounces off enemies without any extra input, measured in px/sec.
|
||||
"BOUNCE_JUMP_SPEED": 248.0, # The strength at which the player bounces off enemies while holding jump, measured in px/sec.
|
||||
|
||||
"FALL_GRAVITY_IDLE": 26.25, # The player's gravity while falling from an idle state, measured in px/frame.
|
||||
"FALL_GRAVITY_WALK": 22.5, # The player's gravity while falling from a walking state, measured in px/frame.
|
||||
"FALL_GRAVITY_RUN": 33.75, # The player's gravity while falling from a running state, measured in px/frame.
|
||||
"MAX_FALL_SPEED": 255.0, # The player's maximum fall speed, measured in px/sec.
|
||||
"CEILING_BUMP_SPEED": 45.0, # The speed at which the player falls after hitting a ceiling, measured in px/sec.
|
||||
|
||||
"WALK_SPEED": 90.0, # The player's speed while walking, measured in px/sec.
|
||||
"GROUND_WALK_ACCEL": 2.23, # The player's acceleration while walking, measured in px/frame.
|
||||
"WALK_SKID": 6.1, # The player's turning deceleration while running, measured in px/frame.
|
||||
|
||||
"RUN_SPEED": 150.0, # The player's speed while running, measured in px/sec.
|
||||
"GROUND_RUN_ACCEL": 3.34, # The player's acceleration while running, measured in px/frame.
|
||||
"RUN_SKID": 6.1, # The player's turning deceleration while running, measured in px/frame.
|
||||
|
||||
"SKID_THRESHOLD": 100.0, # The horizontal speed required, to be able to start skidding.
|
||||
"SKID_STOP_THRESHOLD": 33.75, # The maximum velocity required before the player will stop skidding.
|
||||
"CAN_INSTANT_STOP_SKID": true, # Determines if the player will instantly stop upon reaching the skid threshold.
|
||||
|
||||
"GROUND_DECEL": 3.05, # The player's grounded deceleration while no buttons are pressed, measured in px/frame.
|
||||
"LOCK_AIR_ACCEL": true, # Determines if the player can surpass their walk speed while in the air, aside from on trampolines.
|
||||
"AIR_WALK_ACCEL": 2.23, # The player's acceleration while in midair, measured in px/frame.
|
||||
"AIR_RUN_ACCEL": 3.34, # The player's acceleration while in midair, measured in px/frame.
|
||||
"AIR_DECEL": 0.0, # The player's airborne deceleration while no buttons are pressed, measured in px/frame.
|
||||
"AIR_SKID": 6.1, # The player's turning deceleration while in midair, measured in px/frame.
|
||||
"CAN_BACKWARDS_ACCEL_RUN": false, # Determines if the player can experience running acceleration when moving backwards in the air.
|
||||
"AIR_BACKWARDS_ACCEL_MULT": 2.0, # Determines a multiplier to the player's acceleration when moving backwards in the air.
|
||||
|
||||
"CLIMB_UP_SPEED": 50.0, # The player's speed while climbing upwards, measured in px/sec.
|
||||
"CLIMB_DOWN_SPEED": 50.0, # The player's speed while climbing downwards, measured in px/sec.
|
||||
"TRAMPOLINE_SPEED": 500.0, # The strength of a jump on a trampoline, measured in px/sec.
|
||||
"SUPER_TRAMPOLINE_SPEED": 1200.0, # The strength of a jump on a super trampoline, measured in px/sec.
|
||||
|
||||
"SWIM_SPEED": 95.0, # The player's horizontal speed while swimming, measured in px/sec.
|
||||
"SWIM_GROUND_SPEED": 45.0, # The player's horizontal speed while grounded underwater, measured in px/sec.
|
||||
"SWIM_DECEL": 0.0, # The player's deceleration in water while no buttons are pressed, measured in px/frame.
|
||||
"SWIM_HEIGHT": 100.0, # The strength of the player's swim, measured in px/sec.
|
||||
"SWIM_EXIT_SPEED": 250.0, # The strength of the player's jump out of water, measured in px/sec.
|
||||
"SWIM_GRAVITY": 2.5, # The player's gravity while swimming, measured in px/frame.
|
||||
"MAX_SWIM_FALL_SPEED": 200.0, # The player's maximum fall speed while swimming, measured in px/sec.
|
||||
},
|
||||
"Small": {
|
||||
"CROUCH_SCALE": 1.0,
|
||||
"CAN_BREAK_BRICKS": false,
|
||||
"CAN_BE_WALL_EJECTED": false,
|
||||
},
|
||||
"Big": {},
|
||||
"Fire": {},
|
||||
}
|
||||
## Determines parameters typically involved with power-up behavior, mainly projectiles fired by the player.
|
||||
@export var POWER_PARAMETERS: Dictionary = {
|
||||
"Default": {
|
||||
"POWER_STATE_RANGE": [0, 2], # Determines the range of available power-up tiers to the player.
|
||||
"POWER_TIER_RANGE": [0, 2], # Determines the range of available power-up tiers to the player.
|
||||
"STARTING_POWER_STATE": "Small", # Determines the default starting power state.
|
||||
"STAR_TIME": 12.0, # Determines how long a Star will last for.
|
||||
"WING_TIME": 10.0, # Determines how long Wings will last for.
|
||||
|
|
@ -87,14 +170,16 @@ extends CharacterBody2D
|
|||
# Determines what projectile/particle scene is used, starting from
|
||||
# "res://Scenes/Prefabs/". Leaving this blank disables firing
|
||||
# projectiles and displaying particles respectively.
|
||||
"PROJ_PARTICLE_ON_CONTACT": true, # Defines if the particle will play when making contact without being destroyed.
|
||||
"PROJ_PARTICLE_ON_CONTACT": false, # Defines if the particle will play when making contact without being destroyed.
|
||||
"PROJ_SFX_THROW": "fireball", # Defines the sound effect that plays when this projectile is fired.
|
||||
"PROJ_SFX_COLLIDE": "bump", # Defines the sound effect that plays when this projectile collides.
|
||||
#"PROJ_SFX_HIT": "kick", # Defines the sound effect that plays when this projectile damages an enemy.
|
||||
|
||||
"MAX_PROJ_COUNT": 2, # How many projectiles can be fired at once. -1 and below count as infinite.
|
||||
"PROJ_COLLISION": true, # Determines if the projectile can interact with collidable surfaces.
|
||||
"PROJ_DESTROY_ON_HIT": true, # Determines if the projectile will be destroyed after hitting an enemy.
|
||||
"PROJ_PIERCE_COUNT": 0, # Determines how many additional enemies this projectile can hit before being destroyed. -1 and below count as infinite.
|
||||
"PROJ_PIERCE_HITRATE": -1, # Determines how much time must pass in seconds before this projectile can hit the same enemy it is on top of currently. -1 and below count as infinite.
|
||||
"PROJ_BOUNCE_COUNT": -1, # Determines how many additional enemies this projectile can hit before being destroyed. -1 and below count as infinite.
|
||||
"PROJ_GROUND_BOUNCE": true, # Determines if the projectile can bounce off the ground.
|
||||
"PROJ_WALL_BOUNCE": false, # Determines if the projectile can bounce off of wals.
|
||||
"PROJ_CEIL_BOUNCE": false, # Determines if the projectile can bounce off of ceilings.
|
||||
|
|
@ -103,6 +188,7 @@ extends CharacterBody2D
|
|||
"PROJ_LIFETIME": -1, # Determines how long the projectile will last for. -1 and below count as infinite.
|
||||
"PROJ_OFFSET": [-4.0, 16.0], # Determines the offset for where the projectile will spawn.
|
||||
"PROJ_SPEED": [220.0, -100.0], # Determines the initial velocity of the projectile.
|
||||
"PROJ_SPEED_CAP": [-220.0, 220.0], # Determines the minimum and maximum X velocity of the projectile.
|
||||
"PROJ_SPEED_SCALING": false, # Determines if the projectile will have its initial speed scale with the player's movement.
|
||||
|
||||
"PROJ_GROUND_DECEL": 0.0, # The projectile's deceleration on the ground, measured in px/frame
|
||||
|
|
@ -111,7 +197,9 @@ extends CharacterBody2D
|
|||
"PROJ_BOUNCE_HEIGHT": 125.0, # The projectile's bounce velocity upon landing on the ground.
|
||||
"PROJ_MAX_FALL_SPEED": 150.0, # The projectile's maximum fall speed, measured in px/sec
|
||||
},
|
||||
"Small": {},
|
||||
"Small": {
|
||||
"PROJ_OFFSET": [-4.0, 8.0],
|
||||
},
|
||||
"Big": {},
|
||||
"Fire": {
|
||||
"PROJ_TYPE": "Entities/Items/Fireball",
|
||||
|
|
@ -163,6 +251,8 @@ extends CharacterBody2D
|
|||
"WING_OFFSET": [0.0, 0.0], # The visual offset of the wings which appear with the Wing power-up.
|
||||
"HAMMER_OFFSET": [0.0, -8.0], # The visual offset of the hammer which appears with the Hammer power-up.
|
||||
|
||||
"MOVE_ANIM_SPEED_DIV": 32, # Determines the value used for division in the animation speed formula for walk/run animations. Lower is faster.
|
||||
|
||||
"RAINBOW_STAR_FX_SPEED": 15.0, # Determines the speed of the rainbow effect under the effects of a star, measured in cycles/sec
|
||||
"RAINBOW_STAR_SLOW_FX_SPEED": 7.5, # Determines the speed of the rainbow effect nearing the end of a star's duration, measured in cycles/sec
|
||||
"RAINBOW_POWERUP_FX": true, # Determines whether or not the player will play the rainbow effect when powering up.
|
||||
|
|
@ -185,6 +275,8 @@ extends CharacterBody2D
|
|||
#endregion
|
||||
@export_group("")
|
||||
|
||||
@export var physics_dict = PHYSICS_PARAMETERS
|
||||
|
||||
@onready var camera_center_joint: Node2D = $CameraCenterJoint
|
||||
|
||||
@onready var sprite: AnimatedSprite2D = %Sprite
|
||||
|
|
@ -233,7 +325,7 @@ var kicking = false
|
|||
|
||||
@export var player_id := 0
|
||||
const ONE_UP_NOTE = preload("uid://dopxwjj37gu0l")
|
||||
var gravity: float = physics_params("FALL_GRAVITY")
|
||||
var gravity: float = calculate_speed_param("FALL_GRAVITY")
|
||||
|
||||
var attacking := false
|
||||
var pipe_enter_direction := Vector2.ZERO#
|
||||
|
|
@ -398,8 +490,6 @@ var can_run := true
|
|||
|
||||
var air_frames := 0
|
||||
|
||||
static var classic_physics := false
|
||||
|
||||
var swim_stroke := false
|
||||
|
||||
var skid_frames := 0
|
||||
|
|
@ -407,30 +497,26 @@ var skid_frames := 0
|
|||
var simulated_velocity := Vector2.ZERO
|
||||
|
||||
func _ready() -> void:
|
||||
if classic_physics:
|
||||
apply_classic_physics()
|
||||
get_viewport().size_changed.connect(recenter_camera)
|
||||
show()
|
||||
$Checkpoint/Label.text = str(player_id + 1)
|
||||
$Checkpoint/Label.modulate = [Color("5050FF"), Color("F73910"), Color("1A912E"), Color("FFB762")][player_id]
|
||||
$Checkpoint/Label.visible = Global.connected_players > 1
|
||||
Global.can_pause = true
|
||||
character = CHARACTERS[int(Global.player_characters[player_id])]
|
||||
Global.can_time_tick = true
|
||||
if [Global.GameMode.BOO_RACE, Global.GameMode.MARATHON, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) == false:
|
||||
apply_character_physics(true)
|
||||
else:
|
||||
apply_character_physics(false)
|
||||
|
||||
apply_character_physics()
|
||||
apply_character_sfx_map()
|
||||
Global.level_theme_changed.connect(apply_character_sfx_map)
|
||||
Global.can_pause = true
|
||||
Global.can_time_tick = true
|
||||
Global.level_theme_changed.connect(apply_character_physics)
|
||||
Global.level_theme_changed.connect(apply_character_sfx_map)
|
||||
Global.level_theme_changed.connect(set_power_state_frame)
|
||||
if Global.current_level.first_load and Global.current_game_mode == Global.GameMode.MARATHON_PRACTICE:
|
||||
Global.player_power_states[player_id] = "0"
|
||||
var cur_power_state = int(Global.player_power_states[player_id])
|
||||
var power_state_range = physics_params("POWER_STATE_RANGE", POWER_PARAMETERS)
|
||||
var power_tier_range = physics_params("POWER_TIER_RANGE", POWER_PARAMETERS)
|
||||
power_state = get_node("PowerStates/" + physics_params("STARTING_POWER_STATE", POWER_PARAMETERS))
|
||||
power_state = $PowerStates.get_node(POWER_STATES[clamp(cur_power_state, power_state.power_tier, power_state_range[1])])
|
||||
power_state = $PowerStates.get_node(POWER_STATES[clamp(cur_power_state, power_state.power_tier, power_tier_range[1])])
|
||||
if Global.current_game_mode == Global.GameMode.LEVEL_EDITOR:
|
||||
camera.enabled = false
|
||||
handle_power_up_states(0)
|
||||
|
|
@ -440,9 +526,13 @@ func _ready() -> void:
|
|||
recenter_camera()
|
||||
|
||||
# SkyanUltra: Helper function for getting physics params.
|
||||
func physics_params(type: String, params_dict: Dictionary = PHYSICS_PARAMETERS, key: String = "") -> Variant:
|
||||
func physics_params(type: String, params_dict: Dictionary = {}, key: String = "") -> Variant:
|
||||
var mult_applied = 1.0
|
||||
var is_movement = false
|
||||
# SkyanUltra: This is a stupid workaround for a stupid issue with this stupid
|
||||
# engine. I can't just set params_dict to physics_dict... So I have to do this
|
||||
# work around. I hate it. If anyone can fix it, then please. Do it.
|
||||
if params_dict == {}: params_dict = physics_dict
|
||||
for tag in ["WALK", "RUN", "AIR", "SWIM"]:
|
||||
if tag in type:
|
||||
is_movement = true
|
||||
|
|
@ -479,7 +569,8 @@ func merge_dict(target: Dictionary, source: Dictionary) -> void:
|
|||
else:
|
||||
target[key] = source[key]
|
||||
|
||||
func apply_character_physics(apply: bool) -> void:
|
||||
func apply_character_physics() -> void:
|
||||
var apply_gameplay_changes = [Global.GameMode.BOO_RACE, Global.GameMode.MARATHON, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) == false
|
||||
var path = "res://Assets/Sprites/Players/" + character + "/CharacterInfo.json"
|
||||
if int(Global.player_characters[player_id]) > 3:
|
||||
path = path.replace("res://Assets/Sprites/Players", Global.config_path.path_join("custom_characters/"))
|
||||
|
|
@ -489,9 +580,11 @@ func apply_character_physics(apply: bool) -> void:
|
|||
# SkyanUltra: This section controls all CHARACTER PHYSICS values. This should be
|
||||
# preventing physics changes to stop potential cheating in modes like You VS. Boo
|
||||
# and Marathon mode.
|
||||
if apply_gameplay_changes:
|
||||
physics_dict = PHYSICS_PARAMETERS if Settings.file.difficulty.physics_style else CLASSIC_PARAMETERS
|
||||
for key in json.physics:
|
||||
if key in ["PHYSICS_PARAMETERS", "POWER_PARAMETERS", "ENDING_PARAMETERS"]:
|
||||
if apply:
|
||||
if key in ["PHYSICS_PARAMETERS", "CLASSIC_PARAMETERS", "POWER_PARAMETERS", "ENDING_PARAMETERS"]:
|
||||
if apply_gameplay_changes:
|
||||
if get(key) is Dictionary and json.physics[key] is Dictionary:
|
||||
merge_dict(get(key), json.physics[key])
|
||||
else:
|
||||
|
|
@ -633,7 +726,7 @@ func apply_gravity(delta: float) -> void:
|
|||
gravity = physics_params("SWIM_GRAVITY")
|
||||
else:
|
||||
if sign(gravity_vector.y) * velocity.y + physics_params("JUMP_HOLD_SPEED_THRESHOLD") > 0.0:
|
||||
gravity = physics_params("FALL_GRAVITY")
|
||||
gravity = calculate_speed_param("FALL_GRAVITY")
|
||||
velocity += (gravity_vector * ((gravity / (1.5 if low_gravity else 1.0)) / delta)) * delta
|
||||
var target_fall: float = physics_params("MAX_FALL_SPEED")
|
||||
if in_water:
|
||||
|
|
@ -722,14 +815,18 @@ func is_actually_on_ceiling() -> bool:
|
|||
func enemy_bounce_off(add_combo := true, award_score := true) -> void:
|
||||
if add_combo:
|
||||
add_stomp_combo(award_score)
|
||||
jump_cancelled = not Global.player_action_pressed("jump", player_id)
|
||||
jump_cancelled = sign(velocity.y * gravity_vector.y) >= 0.0 if physics_params("CLASSIC_BOUNCE_BEHAVIOR") else not Global.player_action_pressed("jump", player_id)
|
||||
await get_tree().physics_frame
|
||||
if Global.player_action_pressed("jump", player_id):
|
||||
velocity.y = sign(gravity_vector.y) * -physics_params("BOUNCE_JUMP_SPEED")
|
||||
gravity = physics_params("JUMP_GRAVITY")
|
||||
if physics_params("CLASSIC_BOUNCE_BEHAVIOR"):
|
||||
if jump_cancelled:
|
||||
gravity = calculate_speed_param("FALL_GRAVITY")
|
||||
else:
|
||||
gravity = calculate_speed_param("JUMP_GRAVITY")
|
||||
has_jumped = true
|
||||
else:
|
||||
velocity.y = sign(gravity_vector.y) * -physics_params("BOUNCE_HEIGHT")
|
||||
velocity.y = sign(gravity_vector.y) * -physics_params("BOUNCE_SPEED")
|
||||
|
||||
func add_stomp_combo(award_score := true) -> void:
|
||||
if stomp_combo >= 10:
|
||||
|
|
@ -803,7 +900,7 @@ func handle_block_collision_detection() -> void:
|
|||
points.sort_custom(func(a, b): return a.y < b.y)
|
||||
$BlockCollision.position.y = points.front().y * $FireCollision.scale.y
|
||||
%Hammer.position.x = -8 * (1 - $FireCollision.scale.x)
|
||||
if actual_velocity_y() <= physics_params("FALL_GRAVITY"):
|
||||
if actual_velocity_y() <= calculate_speed_param("FALL_GRAVITY"):
|
||||
for i in $BlockCollision.get_overlapping_bodies():
|
||||
if i is Block:
|
||||
if is_on_ceiling():
|
||||
|
|
@ -824,7 +921,9 @@ const POWER_PARAM_LIST = {
|
|||
"PARTICLE_ON_CONTACT": "PROJ_PARTICLE_ON_CONTACT",
|
||||
"SFX_COLLIDE": "PROJ_SFX_COLLIDE",
|
||||
"HAS_COLLISION": "PROJ_COLLISION",
|
||||
"DESTROY_ON_HIT": "PROJ_DESTROY_ON_HIT",
|
||||
"PIERCE_COUNT": "PROJ_PIERCE_COUNT",
|
||||
"PIERCE_HITRATE": "PROJ_PIERCE_HITRATE",
|
||||
"BOUNCE_COUNT": "PROJ_BOUNCE_COUNT",
|
||||
"GROUND_BOUNCE": "PROJ_GROUND_BOUNCE",
|
||||
"WALL_BOUNCE": "PROJ_WALL_BOUNCE",
|
||||
"CEIL_BOUNCE": "PROJ_CEIL_BOUNCE",
|
||||
|
|
@ -834,7 +933,8 @@ const POWER_PARAM_LIST = {
|
|||
"AIR_DECEL": "PROJ_AIR_DECEL",
|
||||
"GRAVITY": "PROJ_GRAVITY",
|
||||
"BOUNCE_HEIGHT": "PROJ_BOUNCE_HEIGHT",
|
||||
"MAX_FALL_SPEED": "PROJ_MAX_FALL_SPEED"
|
||||
"MAX_FALL_SPEED": "PROJ_MAX_FALL_SPEED",
|
||||
"MOVE_SPEED_CAP": "PROJ_SPEED_CAP",
|
||||
}
|
||||
|
||||
func handle_projectile_firing(delta: float) -> void:
|
||||
|
|
@ -844,7 +944,7 @@ func handle_projectile_firing(delta: float) -> void:
|
|||
throw_projectile()
|
||||
|
||||
func throw_projectile() -> void:
|
||||
projectile_type = load("res://Scenes/Prefabs/" + physics_params("PROJ_TYPE", POWER_PARAMETERS) + ".tscn")
|
||||
projectile_type = load(physics_params("PROJ_TYPE", POWER_PARAMETERS) + ".tscn")
|
||||
var node = projectile_type.instantiate()
|
||||
var offset = physics_params("PROJ_OFFSET", POWER_PARAMETERS)
|
||||
var speed = physics_params("PROJ_SPEED", POWER_PARAMETERS)
|
||||
|
|
@ -859,7 +959,7 @@ func throw_projectile() -> void:
|
|||
node.is_friendly = true
|
||||
if "character" in node:
|
||||
node.character = character
|
||||
node.PARTICLE = load("res://Scenes/Prefabs/" + physics_params("PROJ_PARTICLE", POWER_PARAMETERS) + ".tscn")
|
||||
node.PARTICLE = load(physics_params("PROJ_PARTICLE", POWER_PARAMETERS) + ".tscn")
|
||||
for param in POWER_PARAM_LIST:
|
||||
node[param] = physics_params(POWER_PARAM_LIST[param], POWER_PARAMETERS)
|
||||
node.MOVE_SPEED = speed[0] + speed_scaling
|
||||
|
|
@ -908,7 +1008,7 @@ func handle_wing_flight(delta: float) -> void:
|
|||
if flight_meter <= 0 and has_wings:
|
||||
has_wings = false
|
||||
AudioManager.stop_music_override(AudioManager.MUSIC_OVERRIDES.WING)
|
||||
gravity = physics_params("FALL_GRAVITY")
|
||||
gravity = calculate_speed_param("FALL_GRAVITY")
|
||||
%Wings.visible = flight_meter >= 0
|
||||
var wing_offset = physics_params("WING_OFFSET", COSMETIC_PARAMETERS)
|
||||
%Wing.offset = Vector2(wing_offset[0], wing_offset[1])
|
||||
|
|
@ -929,9 +1029,9 @@ func damage(type: String = "") -> void:
|
|||
return
|
||||
times_hit += 1
|
||||
var damage_state = power_state.damage_state
|
||||
if damage_state != null and power_state.power_tier > physics_params("POWER_STATE_RANGE", POWER_PARAMETERS)[0]:
|
||||
if damage_state != null and power_state.power_tier > physics_params("POWER_TIER_RANGE", POWER_PARAMETERS)[0]:
|
||||
if Settings.file.difficulty.damage_style == 0:
|
||||
damage_state = get_node("PowerStates/" + POWER_STATES[physics_params("POWER_STATE_RANGE", POWER_PARAMETERS)[0]])
|
||||
damage_state = get_node("PowerStates/" + POWER_STATES[physics_params("POWER_TIER_RANGE", POWER_PARAMETERS)[0]])
|
||||
DiscoLevel.combo_meter -= 50
|
||||
AudioManager.play_sfx("damage", global_position)
|
||||
await power_up_animation(damage_state.state_name)
|
||||
|
|
@ -1089,7 +1189,7 @@ func get_power_up(power_name := "", give_points := true) -> void:
|
|||
if power_name != "Big" and power_state.state_name != "Big":
|
||||
power_name = "Big"
|
||||
var new_power_state = get_node("PowerStates/" + power_name)
|
||||
if power_state.power_tier <= new_power_state.power_tier and new_power_state.power_tier <= physics_params("POWER_STATE_RANGE", POWER_PARAMETERS)[1] and new_power_state != power_state:
|
||||
if power_state.power_tier <= new_power_state.power_tier and new_power_state.power_tier <= physics_params("POWER_TIER_RANGE", POWER_PARAMETERS)[1] and new_power_state != power_state:
|
||||
can_hurt = false
|
||||
await power_up_animation(power_name)
|
||||
else:
|
||||
|
|
@ -1252,15 +1352,24 @@ func exit_pipe(pipe: PipeArea) -> void:
|
|||
func jump() -> void:
|
||||
if spring_bouncing:
|
||||
return
|
||||
velocity.y = calculate_jump_height() * gravity_vector.y
|
||||
velocity.y = calculate_jump_height(calculate_speed_param("JUMP_SPEED")) * gravity_vector.y
|
||||
velocity_x_jump_stored = velocity.x
|
||||
gravity = physics_params("JUMP_GRAVITY")
|
||||
gravity = calculate_speed_param("JUMP_GRAVITY")
|
||||
AudioManager.play_sfx(physics_params("JUMP_SFX", COSMETIC_PARAMETERS), global_position)
|
||||
has_jumped = true
|
||||
await get_tree().physics_frame
|
||||
has_jumped = true
|
||||
|
||||
func calculate_jump_height(jump_height = physics_params("JUMP_SPEED"), jump_incr = physics_params("JUMP_INCR")) -> float: # Thanks wye love you xxx
|
||||
func calculate_speed_param(param = ""):
|
||||
if abs(velocity.x) < physics_params("JUMP_WALK_THRESHOLD"):
|
||||
param += "_IDLE"
|
||||
elif abs(velocity.x) < physics_params("JUMP_RUN_THRESHOLD"):
|
||||
param += "_WALK"
|
||||
else:
|
||||
param += "_RUN"
|
||||
return physics_params(param)
|
||||
|
||||
func calculate_jump_height(jump_height = physics_params("JUMP_SPEED_IDLE"), jump_incr = physics_params("JUMP_INCR")) -> float: # Thanks wye love you xxx
|
||||
return -(jump_height + jump_incr * int(abs(velocity.x) / 25))
|
||||
|
||||
const SMOKE_PARTICLE = preload("res://Scenes/Prefabs/Particles/SmokeParticle.tscn")
|
||||
|
|
@ -1341,9 +1450,9 @@ func water_exited() -> void:
|
|||
velocity.y = sign(gravity_vector.y) * -physics_params("SWIM_EXIT_SPEED") if actual_velocity_y() < -50.0 or holding_up else velocity.y
|
||||
has_jumped = true
|
||||
if Global.player_action_pressed("move_up", player_id):
|
||||
gravity = physics_params("JUMP_GRAVITY")
|
||||
gravity = calculate_speed_param("JUMP_GRAVITY")
|
||||
else:
|
||||
gravity = physics_params("FALL_GRAVITY")
|
||||
gravity = calculate_speed_param("FALL_GRAVITY")
|
||||
|
||||
func reset_camera_to_center() -> void:
|
||||
animating_camera = true
|
||||
|
|
|
|||
|
|
@ -9,8 +9,12 @@ extends Enemy
|
|||
@export var PARTICLE_ON_CONTACT := false
|
||||
## Determines what sound will play when the projectile makes contact with something.
|
||||
@export var SFX_COLLIDE := "bump"
|
||||
## Determines if the projectile will be destroyed after damaging an entity.
|
||||
@export var DESTROY_ON_HIT := false
|
||||
## Determines how many entities a projectile can hit before being destroyed. Negative values are considered infinite.
|
||||
@export var PIERCE_COUNT: int = -1
|
||||
## Determines how much time must pass in seconds before the projectile can hit the same enemy it is currently intersecting with again. Negative values are considered infinite.
|
||||
@export var PIERCE_HITRATE := -1
|
||||
## Determines how many times a projectile can bounce on tiles before being destroyed. Negative values are considered infinite.
|
||||
@export var BOUNCE_COUNT: int = -1
|
||||
## Controls if the projectile will make contact with the environment.
|
||||
@export var HAS_COLLISION := false
|
||||
## Controls if the projectile will bounce on the ground rather than being destroyed.
|
||||
|
|
@ -25,6 +29,8 @@ extends Enemy
|
|||
@export var LIFETIME := -1
|
||||
## Controls the horizontal speed of the projectile.
|
||||
@export var MOVE_SPEED := 0
|
||||
## Controls the horizontal speed of the projectile.
|
||||
@export var MOVE_SPEED_CAP := [-INF, INF]
|
||||
## Controls the amount of deceleration the projectile will experience on the ground.
|
||||
@export var GROUND_DECEL := 0
|
||||
## Controls the amount of deceleration the projectile will experience in the air.
|
||||
|
|
@ -37,7 +43,8 @@ extends Enemy
|
|||
@export var MAX_FALL_SPEED := 280.0
|
||||
|
||||
func _ready() -> void:
|
||||
if not HAS_COLLISION: $Collision.disabled = true
|
||||
var collision = get_node_or_null("Collision")
|
||||
if not HAS_COLLISION and collision != null: collision.disabled = true
|
||||
if LIFETIME >= 0:
|
||||
await get_tree().create_timer(LIFETIME).timeout
|
||||
hit(true, true)
|
||||
|
|
@ -53,30 +60,43 @@ func handle_movement(delta: float) -> void:
|
|||
velocity.y += (CUR_GRAVITY / delta) * delta
|
||||
velocity.y = clamp(velocity.y, -INF, MAX_FALL_SPEED)
|
||||
if is_on_floor():
|
||||
if GROUND_BOUNCE: velocity.y = -BOUNCE_HEIGHT
|
||||
else: hit()
|
||||
if GROUND_BOUNCE and BOUNCE_COUNT != 0:
|
||||
BOUNCE_COUNT -= 1
|
||||
velocity.y = -BOUNCE_HEIGHT
|
||||
else: hit(true, true)
|
||||
if is_on_ceiling():
|
||||
if CEIL_BOUNCE: velocity.y = BOUNCE_HEIGHT
|
||||
else: hit()
|
||||
if CEIL_BOUNCE and BOUNCE_COUNT != 0:
|
||||
BOUNCE_COUNT -= 1
|
||||
velocity.y = BOUNCE_HEIGHT
|
||||
else: hit(true, true)
|
||||
if is_on_wall():
|
||||
if WALL_BOUNCE:
|
||||
if WALL_BOUNCE and BOUNCE_COUNT != 0:
|
||||
BOUNCE_COUNT -= 1
|
||||
direction *= -1
|
||||
else: hit()
|
||||
MOVE_SPEED = move_toward(MOVE_SPEED, 0, (DECEL_TYPE / delta) * delta)
|
||||
else: hit(true, true)
|
||||
MOVE_SPEED = clamp(move_toward(MOVE_SPEED, 0, (DECEL_TYPE / delta) * delta), MOVE_SPEED_CAP[0], MOVE_SPEED_CAP[1])
|
||||
velocity.x = MOVE_SPEED * direction
|
||||
move_and_slide()
|
||||
|
||||
|
||||
func damage_player(player: Player) -> void:
|
||||
if !is_friendly:
|
||||
player.damage(damage_type if damage_type != "Normal" else "")
|
||||
hit()
|
||||
|
||||
func hit(play_sfx := true, force_destroy := false) -> void:
|
||||
if play_sfx and SFX_COLLIDE != "":
|
||||
AudioManager.play_sfx(SFX_COLLIDE, global_position)
|
||||
if PIERCE_COUNT == 0 or BOUNCE_COUNT == 0 or force_destroy:
|
||||
summon_explosion()
|
||||
if DESTROY_ON_HIT or force_destroy:
|
||||
queue_free()
|
||||
else:
|
||||
var hitbox = get_node_or_null("Hitbox")
|
||||
PIERCE_COUNT -= 1
|
||||
if PARTICLE_ON_CONTACT: summon_explosion()
|
||||
if PIERCE_HITRATE >= 0 and hitbox != null:
|
||||
hitbox.monitoring = false
|
||||
await get_tree().create_timer(PIERCE_HITRATE, false).timeout
|
||||
hitbox.monitoring = true
|
||||
|
||||
func summon_explosion() -> void:
|
||||
if PARTICLE is PackedScene and PARTICLE.can_instantiate():
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ func play_sfx(stream_name = "", position := Vector2.ZERO, pitch := 1.0, can_over
|
|||
add_child(player)
|
||||
active_sfxs[stream_name] = player
|
||||
queued_sfxs.erase(stream_name)
|
||||
print(active_sfxs)
|
||||
#print(active_sfxs)
|
||||
await player.finished
|
||||
active_sfxs.erase(stream_name)
|
||||
player.queue_free()
|
||||
|
|
|
|||
|
|
@ -84,7 +84,8 @@ var file := {
|
|||
"extra_checkpoints": 0,
|
||||
"back_scroll": 0,
|
||||
"time_limit": 1,
|
||||
"lakitu_style": 0
|
||||
"lakitu_style": 0,
|
||||
"physics_style": 1
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@ func physics_update(_delta: float) -> void:
|
|||
if vine.can_tele and player.global_position.y - 64 < vine.top_point and climb_direction == -1:
|
||||
climb_direction = -1
|
||||
auto_climb = true
|
||||
player.velocity.y = player.physics_params("CLIMB_SPEED") * climb_direction
|
||||
var climb_speed = player.physics_params("CLIMB_DOWN_SPEED") if climb_direction >= 1 else player.physics_params("CLIMB_UP_SPEED")
|
||||
player.velocity.y = climb_speed * climb_direction
|
||||
player.sprite.play("Climb")
|
||||
player.sprite.speed_scale = abs(climb_direction * 1.5)
|
||||
player.move_and_slide()
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@ func handle_ground_movement(delta: float) -> void:
|
|||
if player.skidding:
|
||||
ground_skid(delta)
|
||||
elif sign(player.input_direction * player.velocity_direction) < 0.0 and abs(player.velocity.x) > player.physics_params("SKID_THRESHOLD") and not player.crouching:
|
||||
print([player.input_direction, player.velocity_direction])
|
||||
player.skidding = true
|
||||
elif player.input_direction != 0 and not player.crouching:
|
||||
ground_acceleration(delta)
|
||||
|
|
@ -123,16 +122,19 @@ func ground_acceleration(delta: float) -> void:
|
|||
player.velocity.x = move_toward(player.velocity.x, target_move_speed * player.input_direction, (target_accel / delta) * delta)
|
||||
|
||||
func deceleration(delta: float, airborne := false) -> void:
|
||||
var decel_type = player.physics_params("DECEL") if not airborne else player.physics_params("AIR_DECEL")
|
||||
var decel_type = player.physics_params("GROUND_DECEL") if not airborne else player.physics_params("AIR_DECEL")
|
||||
if player.in_water: decel_type = player.physics_params("SWIM_DECEL")
|
||||
player.velocity.x = move_toward(player.velocity.x, 0, (decel_type / delta) * delta)
|
||||
|
||||
func ground_skid(delta: float) -> void:
|
||||
var target_skid: float = player.physics_params("RUN_SKID")
|
||||
var target_skid: float = player.physics_params("RUN_SKID") if Global.player_action_pressed("run", player.player_id) and player.can_run else player.physics_params("WALK_SKID")
|
||||
player.skid_frames += 1
|
||||
player.velocity.x = move_toward(player.velocity.x, 1 * player.input_direction, (target_skid / delta) * delta)
|
||||
if abs(player.velocity.x) < 10 or player.input_direction == player.velocity_direction or player.input_direction == 0:
|
||||
if abs(player.velocity.x) < player.physics_params("SKID_STOP_THRESHOLD") or sign(player.input_direction * player.velocity_direction) > 0:
|
||||
player.skidding = false
|
||||
player.skid_frames = 0
|
||||
if abs(player.velocity.x) < player.physics_params("SKID_STOP_THRESHOLD") and player.physics_params("CAN_INSTANT_STOP_SKID"):
|
||||
player.velocity.x = 0
|
||||
|
||||
func in_air() -> void:
|
||||
if Global.player_action_just_pressed("jump", player.player_id):
|
||||
|
|
@ -154,13 +156,20 @@ func handle_air_movement(delta: float) -> void:
|
|||
player.jump_cancelled = true
|
||||
if sign(player.gravity_vector.y * player.velocity.y) < 0.0:
|
||||
player.velocity.y /= player.physics_params("JUMP_CANCEL_DIVIDE")
|
||||
player.gravity = player.physics_params("FALL_GRAVITY")
|
||||
player.gravity = player.calculate_speed_param("FALL_GRAVITY")
|
||||
|
||||
func air_acceleration(delta: float) -> void:
|
||||
var backwards_accel = player.physics_params("AIR_BACKWARDS_ACCEL_MULT") if sign(player.velocity.x * player.direction) < 0.0 else 1
|
||||
var target_speed = player.physics_params("WALK_SPEED")
|
||||
if abs(player.velocity.x) >= player.physics_params("WALK_SPEED") and Global.player_action_pressed("run", player.player_id) and player.can_run:
|
||||
var target_accel = player.physics_params("AIR_WALK_ACCEL") * backwards_accel
|
||||
var lock_air_speed = (abs(player.velocity.x) > player.physics_params("WALK_SPEED") or player.has_spring_jumped) if player.physics_params("LOCK_AIR_ACCEL") else abs(player.velocity.x) >= player.physics_params("WALK_SPEED")
|
||||
if lock_air_speed and Global.player_action_pressed("run", player.player_id) and player.can_run:
|
||||
target_speed = player.physics_params("RUN_SPEED")
|
||||
player.velocity.x = move_toward(player.velocity.x, target_speed * player.input_direction, (player.physics_params("AIR_ACCEL") / delta) * delta)
|
||||
target_accel = player.physics_params("AIR_RUN_ACCEL") * backwards_accel
|
||||
if not player.physics_params("CAN_BACKWARDS_ACCEL_RUN") and sign(player.velocity.x * player.direction) < 0.0:
|
||||
target_accel = player.physics_params("AIR_WALK_ACCEL") * backwards_accel
|
||||
print([target_speed, target_accel, player.physics_params("CAN_BACKWARDS_ACCEL_RUN")])
|
||||
player.velocity.x = move_toward(player.velocity.x, target_speed * player.input_direction, (target_accel / delta) * delta)
|
||||
|
||||
func air_skid(delta: float) -> void:
|
||||
player.velocity.x = move_toward(player.velocity.x, 1 * player.input_direction, (player.physics_params("AIR_SKID") / delta) * delta)
|
||||
|
|
@ -196,7 +205,7 @@ func handle_animations() -> void:
|
|||
var animation = get_animation_name()
|
||||
player.sprite.speed_scale = 1
|
||||
if ["Walk", "Move", "Run"].has(animation):
|
||||
player.sprite.speed_scale = abs(player.velocity.x) / 40
|
||||
player.sprite.speed_scale = abs(player.velocity.x) / player.physics_params("MOVE_ANIM_SPEED_DIV", player.COSMETIC_PARAMETERS)
|
||||
player.play_animation(animation)
|
||||
if player.sprite.animation == "Move":
|
||||
walk_frame = player.sprite.frame
|
||||
|
|
|
|||
|
|
@ -30,6 +30,11 @@ func extra_checkpoints_changed(new_value := 0) -> void:
|
|||
func lakitu_style_changed(new_value := 0) -> void:
|
||||
Settings.file.difficulty.lakitu_style = new_value
|
||||
|
||||
func physics_style_changed(new_value := 0):
|
||||
Settings.file.difficulty.physics_style = new_value
|
||||
for player in get_tree().get_nodes_in_group("Players"):
|
||||
player.apply_character_physics()
|
||||
|
||||
func set_value(value_name := "", value := 0) -> void:
|
||||
{
|
||||
"damage_style": damage_style_changed,
|
||||
|
|
@ -40,5 +45,6 @@ func set_value(value_name := "", value := 0) -> void:
|
|||
"game_over_behaviour": game_over_changed,
|
||||
"level_design": level_design_changed,
|
||||
"extra_checkpoints": extra_checkpoints_changed,
|
||||
"back_scroll": backscroll_changed
|
||||
"back_scroll": backscroll_changed,
|
||||
"physics_style": physics_style_changed
|
||||
}[value_name].call(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue