Compare commits

...

7 commits

Author SHA1 Message Date
John Cooper McDonald
b5206d4e2d
Fix Thwomp not awarding any points (#653) 2025-10-22 21:12:34 +01:00
JHDev2006
aa5c50accb Merge branch 'main' of https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public 2025-10-22 21:10:23 +01:00
JHDev2006
a30e359f4e removed window size saving, not too happy with how it was implemented, and think it would be better off saving it for later, so i can get it right 2025-10-22 21:10:22 +01:00
John Cooper McDonald
f228ea51f6
Match SMM2 points with Flagpole Lives on (#627)
* Match SMM2 points with Flagpole Lives on

* Update EndFlagpole.gd

* Update EndFlagpole.gd
2025-10-22 21:08:14 +01:00
SkyanUltra
bc73dc899b
Implement WaterCrouchMove and WingCrouchMove (and fix an incorrect default value on small crouch height) (#643)
* Add WaterCrouchMove and WingCrouchMove states

* Implement WaterCrouchMove and WingCrouchMove

* Quick patch for incorrect crouch height

im adding this to this branch for this since its literally just a number change lol
2025-10-22 19:51:52 +01:00
John Cooper McDonald
1e2d4d9404
Fix Extra Checkpoint option not doing anything + other checkpoint fixes (#649)
* Fix Extra Checkpoint option not doing anything + other checkpoint fixes

* Remove redundancy
2025-10-22 19:51:22 +01:00
JHDev2006
b54c4b5913 fixed a bug where the invincibility palette would stop after collecting a starman at the last second 2025-10-22 17:24:41 +01:00
12 changed files with 34 additions and 25 deletions

View file

@ -334,4 +334,4 @@
}
}
}
}
}

View file

@ -253,13 +253,8 @@ position = Vector2(2624, -32)
pipe_id = 3
exit_only = true
[node name="Checkpoint2" parent="." instance=ExtResource("10_q2h2g")]
position = Vector2(1296, 0)
optional = true
[node name="CheckpointFlag" parent="." instance=ExtResource("24_v8ufo")]
position = Vector2(1296, 0)
optional = true
[connection signal="block_destroyed" from="Tiles/BrickBlock" to="Tiles/BrickBlock/LevelPersistance" method="set_as_active_2"]
[connection signal="block_emptied" from="Tiles/BrickBlock" to="Tiles/BrickBlock/LevelPersistance" method="set_as_active"]

View file

@ -204,6 +204,7 @@ position = Vector2(2200, -136)
[node name="CheckpointFlag" parent="." node_paths=PackedStringArray("nodes_to_delete") instance=ExtResource("22_686wu")]
position = Vector2(1328, 0)
nodes_to_delete = [NodePath("../Enemies/Blooper6")]
optional = true
[node name="EntityGenerator" parent="." instance=ExtResource("22_lnx6r")]
position = Vector2(-72, -176)

View file

@ -236,6 +236,7 @@ position = Vector2(3432, -120)
[node name="CheckpointFlag" parent="." instance=ExtResource("24_osugw")]
position = Vector2(2056, -64)
optional = true
[node name="BrickBlock" parent="." instance=ExtResource("21_u54v8")]
position = Vector2(2040, -120)

View file

@ -141,11 +141,14 @@ metadata/_custom_type_script = "uid://d4a7yp6e55u8t"
[node name="ScoreNoteSpawner" type="Node" parent="."]
script = ExtResource("11_jkv5r")
add_score = true
metadata/_custom_type_script = "uid://5octqlf4ohel"
[connection signal="killed" from="." to="GibSpawner" method="summon_gib"]
[connection signal="hammer_player_hit" from="EnemyPlayerDetection" to="." method="die_from_hammer"]
[connection signal="hammer_player_hit" from="EnemyPlayerDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]
[connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="." method="die_from_object"]
[connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]
[connection signal="player_hit" from="EnemyPlayerDetection" to="." method="damage_player"]
[connection signal="player_stomped_on" from="EnemyPlayerDetection" to="." method="damage_player"]
[connection signal="block_bounced" from="BlockBouncingDetection" to="." method="die_from_object"]

View file

@ -43,6 +43,7 @@ region_rect = Rect2(0, 16, 32, 16)
shape = SubResource("RectangleShape2D_4k6gi")
[node name="PlacePreview" type="Node2D" parent="."]
visible = false
z_index = 1
[node name="NW" type="Sprite2D" parent="PlacePreview"]

View file

@ -6,9 +6,6 @@ static var character_save := "Mario"
func _ready() -> void:
activated.get_node("ResourceSetterNew").resource_json = load(get_character_sprite_path(0))
if Settings.file.difficulty.checkpoint_style == 0 and (Global.current_game_mode != Global.GameMode.LEVEL_EDITOR and Global.current_game_mode != Global.GameMode.CUSTOM_LEVEL) or Global.current_campaign == "SMBANN":
owner.queue_free()
return
owner.show()
if owner.passed:
sprite.hide()

View file

@ -161,6 +161,8 @@ const ANIMATION_FALLBACKS := {
"CrouchJump": "Crouch",
"CrouchBump": "Bump",
"CrouchMove": "Crouch",
"WaterCrouchMove": "CrouchMove",
"WingCrouchMove": "WaterCrouchMove",
"IdleAttack": "MoveAttack",
"CrouchAttack": "IdleAttack",
"MoveAttack": "Attack",
@ -247,7 +249,7 @@ func apply_character_physics(apply: bool) -> void:
for i in get_tree().get_nodes_in_group("SmallCollisions"):
var hitbox_scale = json.get("small_hitbox_scale", [1, 1]) if apply else [1, 1]
i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("small_crouch_scale", 0.75) if apply else 0.5)
i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("small_crouch_scale", 0.75) if apply else 0.75)
i._physics_process(0)
for i in get_tree().get_nodes_in_group("BigCollisions"):
var hitbox_scale = json.get("big_hitbox_scale", [1, 1]) if apply else [1, 1]
@ -891,7 +893,8 @@ func do_smoke_effect() -> void:
func on_timeout() -> void:
AudioManager.stop_music_override(AudioManager.MUSIC_OVERRIDES.STAR)
await get_tree().create_timer(1, false).timeout
is_invincible = false
if $StarTimer.is_stopped():
is_invincible = false
func on_area_entered(area: Area2D) -> void:

View file

@ -221,13 +221,19 @@ func get_animation_name() -> String:
return "CrouchJump"
elif player.is_actually_on_floor():
if abs(player.velocity.x) >= 5 and not player.is_actually_on_wall():
return "CrouchMove"
elif player.in_water:
return "WaterCrouch"
elif player.flight_meter > 0:
return "WingCrouch"
if player.in_water:
return "WaterCrouchMove"
elif player.flight_meter > 0:
return "WingCrouchMove"
else:
return "CrouchMove"
else:
return "Crouch"
if player.in_water:
return "WaterCrouch"
elif player.flight_meter > 0:
return "WingCrouch"
else:
return "Crouch"
if player.is_actually_on_floor():
if player.skidding:
return "Skid"

View file

@ -27,7 +27,7 @@ func _enter_tree() -> void:
LevelPersistance.active_nodes = old_state.duplicate(true)
func _ready() -> void:
if [Global.GameMode.CHALLENGE, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) or Global.current_campaign == "SMBANN":
if [Global.GameMode.CHALLENGE, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) or Global.current_campaign == "SMBANN" or (Settings.file.difficulty.extra_checkpoints == 0 and optional):
queue_free()
return
if has_meta("is_flag") == false:
@ -71,6 +71,3 @@ func get_id() -> String:
return str(Global.level_editor.sub_level_id) + "," + str(Vector2i(global_position)) + "," + get_parent().name
else:
return Global.current_level.scene_file_path + "," + str(Vector2i(global_position)) + "," + get_parent().name
func on_tree_exiting() -> void:
pass # Replace with function body.

View file

@ -2,6 +2,8 @@ extends Node2D
const FLAG_POINTS := [100, 400, 800, 2000, 5000]
const FLAG_POINTS_MODERN := [100, 200, 800, 4000, 8000]
signal player_reached
signal sequence_begin
@ -42,8 +44,10 @@ func player_touch(player: Player) -> void:
func give_points(player: Player) -> void:
var value = clamp(int(lerp(0, 4, (player.global_position.y / -144))), 0, 4)
var nearest_value = FLAG_POINTS[value]
if Settings.file.difficulty.flagpole_lives:
nearest_value = FLAG_POINTS_MODERN[value]
$Score.text = str(nearest_value)
if nearest_value == 5000 and Settings.file.difficulty.flagpole_lives and not [Global.GameMode.CHALLENGE, Global.GameMode.BOO_RACE].has(Global.current_game_mode) and not Settings.file.difficulty.inf_lives:
if nearest_value == 8000 and not [Global.GameMode.CHALLENGE, Global.GameMode.BOO_RACE].has(Global.current_game_mode) and not Settings.file.difficulty.inf_lives:
AudioManager.play_sfx("1_up", global_position)
Global.lives += 1
$ScoreNoteSpawner.spawn_one_up_note()

View file

@ -60,10 +60,11 @@ func frame_limit_changed(new_value := 0) -> void:
Settings.file.video.frame_limit = new_value
func set_window_size(value := []) -> void:
pass
# nabbup: Recenter resized window on launch
var newpos = get_window().position - Vector2i((value[0]-get_window().size.x), (value[1]-get_window().size.y))/2
get_window().size = Vector2(value[0], value[1])
get_window().position = newpos
#var newpos = get_window().position - Vector2i((value[0]-get_window().size.x), (value[1]-get_window().size.y))/2
#get_window().size = Vector2(value[0], value[1])
#get_window().position = newpos
func set_value(value_name := "", value = null) -> void:
{