diff --git a/bugs.md b/bugs.md index e833cc3..14ab296 100644 --- a/bugs.md +++ b/bugs.md @@ -1,51 +1,5 @@ # Post jam changes -- [x] asteroids just kills you - - [x] start by disabling game overs so we can watch the game loop - - [x] maybe also extend the display of ticks and crosses for testing - - [x] issue is also present in bullet hell, likely somehting to do with area detection - - [x] bullets are created outside of the game node causing them to persist over games - - [x] if you lose the scene doesnt remove itself (probably removes one of the bullets instead) -- [x] can leave level in bullet hell - -# Games -- [x] Finish Platformer -- [-] Finish Space Invaders -- [x] Finish Bullet Hell -- [x] Finish Bomb Defusal -- [x] Finish DDR -- [x] Finish Asteroids -- [x] Finish Crafting -- [x] Game Over - -# High Priority -- [x] 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 -- [x] platformer works once but having trouble getting it to replay -- [x] menu credits -- [x] menu exit? (not visible in web build) -- [x] still need a player!!! (make it the cat from catdash?) - -## Publishing -- [x] check if web build works well -- [x] finish itch page -- [x] upload game and possible executable -- [x] submit to jam! - -# Minor -- [x] score text is infront of the player -- [x] warning areas are infront of the player -- [x] make score and life only appear when game starts - -# Ideas -- [x] Have tick/cross effect appear on a won/failed game -- [-] 1 more game -- [-] 2 more games -- [x] standardized timer display - -# Sounds -- [x] win sound -- [x] lose sound -- [x] kanes zoom out sound -- [-] music - electronic msuic? +- [x] score can change after game end +- [x] press enter not needed on item get popup +- [x] make space invaders no movement, just have to press the shoot button and hit the ufo +- [x] simplified bomb defusal code diff --git a/game_logic.gd b/game_logic.gd index 3d78b48..d6c2dc9 100644 --- a/game_logic.gd +++ b/game_logic.gd @@ -115,12 +115,14 @@ func rec_channel_lose(): func game_over_gg(): zoom_in() GameManager.send_game_over() + if gameplay: + game_over_score.text = str(score) gameplay = false main_channel.end_channel() for channel in outer_channels: channel.make_offline() game_over_screen.show() - game_over_score.text = str(score) + func _on_play_again_button_pressed() -> void: diff --git a/game_scene.tscn b/game_scene.tscn index 8af0863..9a88527 100644 --- a/game_scene.tscn +++ b/game_scene.tscn @@ -69,9 +69,8 @@ channel_scene = ExtResource("3_mj2jn") [node name="Control9" parent="GridContainer" instance=ExtResource("1_mlf6e")] layout_mode = 2 -channel_name = "Asteroids" -channel_scene = ExtResource("3_mj2jn") -dead_channel = true +channel_name = "Invaders" +channel_scene = ExtResource("9_miq82") [node name="Control6" parent="GridContainer" instance=ExtResource("1_mlf6e")] layout_mode = 2 @@ -196,6 +195,7 @@ fit_content = true horizontal_alignment = 1 [node name="Label3" type="Label" parent="Popup and Chat/Item Get Popup/MarginContainer/VBoxContainer"] +visible = false layout_mode = 2 size_flags_horizontal = 8 size_flags_vertical = 8 diff --git a/games/bomb defusal/bomb_defusal.gd b/games/bomb defusal/bomb_defusal.gd index 971ea86..6ff3e73 100644 --- a/games/bomb defusal/bomb_defusal.gd +++ b/games/bomb defusal/bomb_defusal.gd @@ -44,26 +44,29 @@ func _process(delta: float) -> void: camera.rotation_degrees = rot_dir * (1-timer/time_limit) * 15 #TODO Surely theres a better way - if Input.is_action_just_pressed("bomb_0"): - enter_number(0) - elif Input.is_action_just_pressed("bomb_1"): - enter_number(1) - elif Input.is_action_just_pressed("bomb_2"): - enter_number(2) - elif Input.is_action_just_pressed("bomb_3"): - enter_number(3) - elif Input.is_action_just_pressed("bomb_4"): - enter_number(4) - elif Input.is_action_just_pressed("bomb_5"): - enter_number(5) - elif Input.is_action_just_pressed("bomb_6"): - enter_number(6) - elif Input.is_action_just_pressed("bomb_7"): - enter_number(7) - elif Input.is_action_just_pressed("bomb_8"): - enter_number(8) - elif Input.is_action_just_pressed("bomb_9"): - enter_number(9) + for i : int in range(10): + if Input.is_action_just_pressed("bomb_" + str(i)): + enter_number(i) + #if Input.is_action_just_pressed("bomb_0"): + #enter_number(0) + #elif Input.is_action_just_pressed("bomb_1"): + #enter_number(1) + #elif Input.is_action_just_pressed("bomb_2"): + #enter_number(2) + #elif Input.is_action_just_pressed("bomb_3"): + #enter_number(3) + #elif Input.is_action_just_pressed("bomb_4"): + #enter_number(4) + #elif Input.is_action_just_pressed("bomb_5"): + #enter_number(5) + #elif Input.is_action_just_pressed("bomb_6"): + #enter_number(6) + #elif Input.is_action_just_pressed("bomb_7"): + #enter_number(7) + #elif Input.is_action_just_pressed("bomb_8"): + #enter_number(8) + #elif Input.is_action_just_pressed("bomb_9"): + #enter_number(9) func enter_number(number : int): if(number == current_number): diff --git a/games/space invaders/invadersBullet.tscn b/games/space invaders/invadersBullet.tscn new file mode 100644 index 0000000..a5eb39a --- /dev/null +++ b/games/space invaders/invadersBullet.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=4 format=3 uid="uid://ci31lqth7avk3"] + +[ext_resource type="Texture2D" uid="uid://d3gtcjbsp5da1" path="res://sprites/invadersBullet.png" id="1_kq8vf"] +[ext_resource type="Script" uid="uid://bmjqhgclmoohl" path="res://games/space invaders/invaders_bullet.gd" id="1_xysrh"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_xysrh"] +radius = 7.07107 + +[node name="InvadersBullet" type="Area2D"] +script = ExtResource("1_xysrh") +speed = 160.0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_xysrh") + +[node name="Sprite2D" type="Sprite2D" parent="."] +scale = Vector2(2, 2) +texture = ExtResource("1_kq8vf") diff --git a/games/space invaders/invaders_bullet.gd b/games/space invaders/invaders_bullet.gd new file mode 100644 index 0000000..843bd48 --- /dev/null +++ b/games/space invaders/invaders_bullet.gd @@ -0,0 +1,12 @@ +extends Area2D + +@export var speed : float = 100 + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + position.y -= delta * speed diff --git a/games/space invaders/invaders_bullet.gd.uid b/games/space invaders/invaders_bullet.gd.uid new file mode 100644 index 0000000..8bed213 --- /dev/null +++ b/games/space invaders/invaders_bullet.gd.uid @@ -0,0 +1 @@ +uid://bmjqhgclmoohl diff --git a/games/space invaders/ship.gd b/games/space invaders/ship.gd index b17ce1f..7ba0dba 100644 --- a/games/space invaders/ship.gd +++ b/games/space invaders/ship.gd @@ -4,23 +4,23 @@ extends CharacterBody2D const SPEED = 300.0 const JUMP_VELOCITY = -400.0 -@export var time_per_bullet : float = 2 -var next_bullet : float =2 +@export var bullet_cooldown : float = 1 +var cooldown : float = 0 @export var bullet_spawn : Marker2D @export var bullet_goal : Marker2D func _ready() -> void: - next_bullet = time_per_bullet + cooldown = 0 func _process(delta: float) -> void: - next_bullet -= delta - if next_bullet <= 0: + cooldown -= delta + if cooldown <= 0 and Input.is_action_just_pressed("invaders_shoot"): shoot() func shoot(): - next_bullet = time_per_bullet - var new_bullet : Node2D = load("res://games/asteroids/bullet.tscn").instantiate() as Node2D - new_bullet.goal = bullet_goal.global_position + cooldown = bullet_cooldown + var new_bullet : Node2D = load("res://games/space invaders/invadersBullet.tscn").instantiate() as Node2D + #new_bullet.goal = bullet_goal.global_position new_bullet.position = bullet_spawn.global_position get_parent().add_child(new_bullet) @@ -28,10 +28,11 @@ func _physics_process(delta: float) -> void: # Get the input direction and handle the movement/deceleration. # As good practice, you should replace UI actions with custom gameplay actions. - var direction := Input.get_axis("invaders_left", "invaders_right") - if direction: - velocity.x = direction * SPEED - else: - velocity.x = move_toward(velocity.x, 0, SPEED) + #var direction := Input.get_axis("invaders_left", "invaders_right") + #if direction: + #velocity.x = direction * SPEED + #else: + #velocity.x = move_toward(velocity.x, 0, SPEED) + move_and_slide() diff --git a/games/space invaders/space_invaders.gd b/games/space invaders/space_invaders.gd index a679519..93775f0 100644 --- a/games/space invaders/space_invaders.gd +++ b/games/space invaders/space_invaders.gd @@ -3,6 +3,12 @@ extends Node signal game_win signal game_lose +@export var ufo_speed : float = 0.1 +@export_group("Node References") +@export var ufo_path : PathFollow2D + +var ufo_progress : float + # Called when the node enters the scene tree for the first time. func _ready() -> void: pass # Replace with function body. @@ -10,4 +16,13 @@ func _ready() -> void: # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: - pass + ufo_progress += delta * ufo_speed + ufo_path.progress_ratio = ufo_progress + if ufo_progress >= 1: + print("invaders lose") + game_lose.emit() + + +func _on_ufo_area_entered(area: Area2D) -> void: + print("invaders win") + game_win.emit() diff --git a/games/space invaders/space_invaders.tscn b/games/space invaders/space_invaders.tscn index fd460e8..c558c71 100644 --- a/games/space invaders/space_invaders.tscn +++ b/games/space invaders/space_invaders.tscn @@ -1,9 +1,9 @@ -[gd_scene load_steps=10 format=3 uid="uid://bkabgl6p44c5b"] +[gd_scene load_steps=12 format=3 uid="uid://bkabgl6p44c5b"] -[ext_resource type="Texture2D" uid="uid://dqorec3q3h3pp" path="res://sprites/asteroidsShip.png" id="1_8m3yy"] [ext_resource type="Script" uid="uid://c1e46eu5tbni0" path="res://games/space invaders/ship.gd" id="1_jsxp6"] [ext_resource type="Script" uid="uid://0v0y62pyhpq4" path="res://games/space invaders/space_invaders.gd" id="1_k5cbn"] -[ext_resource type="Texture2D" uid="uid://by327tfhk6xrs" path="res://sprites/invadersBarrier.png" id="2_jsxp6"] +[ext_resource type="Texture2D" uid="uid://d1p5uve4nterl" path="res://sprites/invadersShip.png" id="3_k5cbn"] +[ext_resource type="Texture2D" uid="uid://yff1qo402ihn" path="res://sprites/ufo.png" id="4_k5cbn"] [sub_resource type="Gradient" id="Gradient_4laqq"] interpolation_mode = 1 @@ -21,11 +21,21 @@ noise = SubResource("FastNoiseLite_ceqm6") [sub_resource type="CircleShape2D" id="CircleShape2D_jdxs5"] radius = 24.1868 -[sub_resource type="RectangleShape2D" id="RectangleShape2D_gagve"] -size = Vector2(56, 28) +[sub_resource type="Curve2D" id="Curve2D_jdxs5"] +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 40, 70, 0, 0, 0, 0, 600, 70, 0, 0, 0, 0, 600, 150, 0, 0, 0, 0, 40, 150, 0, 0, 0, 0, 40, 230, 0, 0, 0, 0, 600, 230) +} +point_count = 6 -[node name="SpaceInvaders" type="Node"] +[sub_resource type="CircleShape2D" id="CircleShape2D_gagve"] +radius = 32.0 + +[sub_resource type="LabelSettings" id="LabelSettings_k5cbn"] +font_size = 36 + +[node name="SpaceInvaders" type="Node" node_paths=PackedStringArray("ufo_path")] script = ExtResource("1_k5cbn") +ufo_path = NodePath("UfoPath/PathFollow2D") [node name="TextureRect" type="TextureRect" parent="."] anchors_preset = 15 @@ -44,7 +54,9 @@ bullet_spawn = NodePath("Spawn") bullet_goal = NodePath("Goal") [node name="Sprite2D" type="Sprite2D" parent="Ship"] -texture = ExtResource("1_8m3yy") +rotation = 1.5708 +scale = Vector2(3, 3) +texture = ExtResource("3_k5cbn") [node name="CollisionShape2D" type="CollisionShape2D" parent="Ship"] shape = SubResource("CircleShape2D_jdxs5") @@ -55,13 +67,33 @@ position = Vector2(34, 1.48619e-06) [node name="Goal" type="Marker2D" parent="Ship"] position = Vector2(335, 1.46433e-05) -[node name="Barrier" type="StaticBody2D" parent="."] -position = Vector2(334, 264) +[node name="UfoPath" type="Path2D" parent="."] +position = Vector2(0, 23) +curve = SubResource("Curve2D_jdxs5") -[node name="Sprite2D" type="Sprite2D" parent="Barrier"] -scale = Vector2(2, 2) -texture = ExtResource("2_jsxp6") +[node name="PathFollow2D" type="PathFollow2D" parent="UfoPath"] +position = Vector2(40, 70) +rotates = false +loop = false -[node name="CollisionShape2D" type="CollisionShape2D" parent="Barrier"] -position = Vector2(0, 2) -shape = SubResource("RectangleShape2D_gagve") +[node name="UFO" type="Area2D" parent="UfoPath/PathFollow2D"] + +[node name="Sprite2D" type="Sprite2D" parent="UfoPath/PathFollow2D/UFO"] +scale = Vector2(3, 3) +texture = ExtResource("4_k5cbn") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="UfoPath/PathFollow2D/UFO"] +shape = SubResource("CircleShape2D_gagve") + +[node name="Label" type="Label" parent="."] +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -196.0 +offset_right = 196.0 +offset_bottom = 50.0 +grow_horizontal = 2 +text = "Shoot The UFO with O!" +label_settings = SubResource("LabelSettings_k5cbn") + +[connection signal="area_entered" from="UfoPath/PathFollow2D/UFO" to="." method="_on_ufo_area_entered"] diff --git a/project.godot b/project.godot index e1dd99f..7be5023 100644 --- a/project.godot +++ b/project.godot @@ -182,16 +182,11 @@ crafting_m={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":77,"key_label":0,"unicode":109,"location":0,"echo":false,"script":null) ] } -invaders_left={ +invaders_shoot={ "deadzone": 0.2, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":79,"key_label":0,"unicode":111,"location":0,"echo":false,"script":null) ] } -invaders_right={ -"deadzone": 0.2, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":80,"key_label":0,"unicode":112,"location":0,"echo":false,"script":null) -] -} ddr_up={ "deadzone": 0.2, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) diff --git a/sprites/invadersBullet.png b/sprites/invadersBullet.png new file mode 100644 index 0000000..c3daf84 Binary files /dev/null and b/sprites/invadersBullet.png differ diff --git a/sprites/invadersBullet.png.import b/sprites/invadersBullet.png.import new file mode 100644 index 0000000..82e5432 --- /dev/null +++ b/sprites/invadersBullet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d3gtcjbsp5da1" +path="res://.godot/imported/invadersBullet.png-5c6ca626291ba8772f908719ba0580c4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/invadersBullet.png" +dest_files=["res://.godot/imported/invadersBullet.png-5c6ca626291ba8772f908719ba0580c4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/invadersShip.png b/sprites/invadersShip.png new file mode 100644 index 0000000..426d19d Binary files /dev/null and b/sprites/invadersShip.png differ diff --git a/sprites/invadersShip.png.import b/sprites/invadersShip.png.import new file mode 100644 index 0000000..47d3662 --- /dev/null +++ b/sprites/invadersShip.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d1p5uve4nterl" +path="res://.godot/imported/invadersShip.png-1d152b13cf308ec7080f2e751e00d236.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/invadersShip.png" +dest_files=["res://.godot/imported/invadersShip.png-1d152b13cf308ec7080f2e751e00d236.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/ufo.png b/sprites/ufo.png new file mode 100644 index 0000000..08d7949 Binary files /dev/null and b/sprites/ufo.png differ diff --git a/sprites/ufo.png.import b/sprites/ufo.png.import new file mode 100644 index 0000000..38c63d6 --- /dev/null +++ b/sprites/ufo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://yff1qo402ihn" +path="res://.godot/imported/ufo.png-e2aa7aa747dae874681794e9d6674c7d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/ufo.png" +dest_files=["res://.godot/imported/ufo.png-e2aa7aa747dae874681794e9d6674c7d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1