From 1be2a4424406143bf967c1a023cb7dcbe16f143d Mon Sep 17 00:00:00 2001 From: Tabby <41929769+tabby-cat-nya@users.noreply.github.com> Date: Sat, 17 May 2025 13:05:08 +1000 Subject: [PATCH] platformer now reactivating! --- base modules/test_channel.tscn | 1 + bugs.md | 17 ++++++++++++++--- game_logic.gd | 18 +++++++++--------- games/bomb defusal/bomb_defusal.tscn | 3 +++ games/platformer/platformer.tscn | 4 ++++ 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/base modules/test_channel.tscn b/base modules/test_channel.tscn index ae1f422..12c3cd2 100644 --- a/base modules/test_channel.tscn +++ b/base modules/test_channel.tscn @@ -79,6 +79,7 @@ texture = SubResource("AnimatedTexture_8t1w7") expand_mode = 2 [node name="GameResult" type="TextureRect" parent="."] +modulate = Color(1, 1, 1, 0) layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 diff --git a/bugs.md b/bugs.md index 4a40745..64af132 100644 --- a/bugs.md +++ b/bugs.md @@ -1,14 +1,25 @@ +# Games +- [x] Finish Platformer +- [ ] Finish Space Invaders +- [ ] Finish Bullet Hell +- [ ] Finish Bomb Defusal +- [ ] Finish DDR +- [ ] Finish Asteroids +- [ ] Finish Crafting + # High Priority - [ ] remote breaking animation not working - [x] pressing enter causes the platformer channel to restart event after the intiial prompt dismissial - [x] lasers not appearing - [x] only 1 lane getting warning -- [ ] platformer works once but having trouble getting it to replay - +- [x] platformer works once but having trouble getting it to replay # Minor - [ ] score text is infront of the player - [ ] warning areas are infront of the player # Ideas -- [ ] Have tick/cross effect appear on a won/failed game +- [x] Have tick/cross effect appear on a won/failed game +- [ ] 1 more game +- [ ] 2 more games +- [ ] standardized timer display diff --git a/game_logic.gd b/game_logic.gd index bc447c5..abecfa0 100644 --- a/game_logic.gd +++ b/game_logic.gd @@ -45,7 +45,7 @@ func _ready() -> void: # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: #if(Input.is_action_just_pressed("ui_down")): - #zoom_out() + #main_channel.start_channel() #so this works if(zooming_out): var zoom_amount : float = clampf(main_camera.zoom.x - delta * zoom_speed,1, 4 ) main_camera.zoom = Vector2(zoom_amount,zoom_amount) @@ -68,11 +68,11 @@ func game_loop(delta : float): var online_channels : Array[Channel] var offline_channels : Array[Channel] # sort all the channels into online and offline - if main_channel.channel_mode == Channel.Mode.Online: - #if main_channel.platformer_online: + #if main_channel.channel_mode == Channel.Mode.Online: + if main_channel.platformer_online: online_channels.append(main_channel) else: - online_channels.append(main_channel) + offline_channels.append(main_channel) for channel in outer_channels: if(channel.channel_mode == Channel.Mode.Online): online_channels.append(channel) @@ -83,13 +83,13 @@ func game_loop(delta : float): if(online_channels.size() < target_channels and offline_channels.size() > 0): var random_channel_number = randi_range(0, offline_channels.size()-1) var random_game = randi_range(0, games.size()-1) - #offline_channels[random_channel_number].start_channel() - if(offline_channels[random_channel_number] != main_channel): - offline_channels[random_channel_number].start_channel() + offline_channels[random_channel_number].start_channel() + #if(offline_channels[random_channel_number] != main_channel): + #offline_channels[random_channel_number].start_channel() #picking a random game is cool but we cant have two of the same! #offline_channels[random_channel_number].start_specific_channel(games[random_game]) - else: - main_channel.start_channel() + #else: + #main_channel.start_channel() func rec_channel_win(): score += 1 diff --git a/games/bomb defusal/bomb_defusal.tscn b/games/bomb defusal/bomb_defusal.tscn index 44ede40..6642a4d 100644 --- a/games/bomb defusal/bomb_defusal.tscn +++ b/games/bomb defusal/bomb_defusal.tscn @@ -68,3 +68,6 @@ max_value = 8.0 step = 1.0 fill_mode = 3 show_percentage = false + +[node name="Camera2D" type="Camera2D" parent="."] +position = Vector2(320, 180) diff --git a/games/platformer/platformer.tscn b/games/platformer/platformer.tscn index 90df04d..7111f6b 100644 --- a/games/platformer/platformer.tscn +++ b/games/platformer/platformer.tscn @@ -328,6 +328,7 @@ open = false move_speed = 1000.0 [node name="Score" type="Label" parent="."] +z_index = -1 offset_left = 208.0 offset_top = 160.0 offset_right = 432.0 @@ -410,6 +411,7 @@ debug_color = Color(0.977603, 0, 0.402823, 0.42) [node name="WarningNode" type="Node2D" parent="Warnings"] visible = false +z_index = -1 position = Vector2(320, 64) [node name="Sprite2D" type="Sprite2D" parent="Warnings/WarningNode"] @@ -420,6 +422,7 @@ script = ExtResource("18_x1jr7") [node name="WarningNode2" type="Node2D" parent="Warnings"] visible = false +z_index = -1 position = Vector2(320, 160) [node name="Sprite2D" type="Sprite2D" parent="Warnings/WarningNode2"] @@ -430,6 +433,7 @@ script = ExtResource("18_x1jr7") [node name="WarningNode3" type="Node2D" parent="Warnings"] visible = false +z_index = -1 position = Vector2(320, 256) [node name="Sprite2D" type="Sprite2D" parent="Warnings/WarningNode3"]