This commit is contained in:
Jonas Braus committed 2024-07-31 20:52:28 +02:00
1 parent b18dfee7dc
commit a4476f2ce2
6 files changed
+219 -12

No files matched your search

+85 -10
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=16 format=3 uid="uid://dv50be68omp73"]
[gd_scene load_steps=21 format=3 uid="uid://dv50be68omp73"]
[ext_resource type="Texture2D" uid="uid://chrld8oybp4me" path="res://assets/bg-1-1.png" id="1_rxc3r"]
[ext_resource type="PackedScene" uid="uid://dk1aby88pygtr" path="res://scenes/player.tscn" id="2_ru48y"]
@@ -11,6 +11,9 @@
[ext_resource type="PackedScene" uid="uid://cwviqxncs4fom" path="res://scenes/enemies/gumba.tscn" id="8_be76n"]
[ext_resource type="AudioStream" uid="uid://cdtrw675os7dh" path="res://assets/sounds/01. Ground Theme.mp3" id="9_xkthi"]
[ext_resource type="FontFile" uid="uid://cpwx7datjer6s" path="res://assets/PixelOperator8.ttf" id="10_b277n"]
[ext_resource type="Script" path="res://scripts/WorldBoundDown.gd" id="12_58dsg"]
[ext_resource type="Script" path="res://scripts/Label_Platform.gd" id="12_lves8"]
[ext_resource type="Script" path="res://scripts/Flag.gd" id="14_e0s4v"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_sdqov"]
texture = ExtResource("1_rxc3r")
@@ -19059,6 +19062,13 @@ size = Vector2(16, 16)
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_tuxwn"]
[sub_resource type="SegmentShape2D" id="SegmentShape2D_khpgg"]
a = Vector2(3435, -6.03052)
b = Vector2(-161, -6.99857)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ihwdr"]
size = Vector2(6, 201)
[node name="level1" type="Node2D"]
[node name="TileMap" type="TileMap" parent="."]
@@ -19070,6 +19080,7 @@ layer_1/name = "mid"
layer_1/tile_data = PackedInt32Array(-65544, 1, 10, -65533, 720897, 12, -524291, 524289, 3, -65529, 1048577, 11, -65523, 1507329, 12, 65526, 1, 13, 131062, 1, 13, 65527, 1, 13, 131063, 1, 13, 65528, 1, 13, 131064, 1, 13, 65529, 1, 13, 131065, 1, 13, 65530, 1, 13, 131066, 1, 13, 65531, 1, 13, 131067, 1, 13, 65532, 1, 13, 131068, 1, 13, 65533, 1, 13, 131069, 1, 13, 65534, 1, 13, 131070, 1, 13, 65535, 1, 13, 131071, 1, 13, 0, 1, 13, 65536, 1, 13, 1, 1, 13, 65537, 1, 13, 2, 1, 13, 65538, 1, 13, 3, 1, 13, 65539, 1, 13, 4, 1, 13, 65540, 1, 13, 5, 1, 13, 65541, 1, 13, 6, 1, 13, 65542, 1, 13, 7, 1, 13, 65543, 1, 13, 8, 1, 13, 65544, 1, 13, 9, 1, 13, 65545, 1, 13, 10, 1, 13, 65546, 1, 13, 11, 1, 13, 65547, 1, 13, 12, 1, 13, 65548, 1, 13, 13, 1, 13, 65549, 1, 13, 14, 1, 13, 65550, 1, 13, 15, 1, 13, 65551, 1, 13, 16, 1, 13, 65552, 1, 13, 17, 1, 13, 65553, 1, 13, 18, 1, 13, 65554, 1, 13, 19, 1, 13, 65555, 1, 13, 20, 1, 13, 65556, 1, 13, 21, 1, 13, 65557, 1, 13, 22, 1, 13, 65558, 1, 13, 23, 1, 13, 65559, 1, 13, 24, 1, 13, 65560, 1, 13, 25, 1, 13, 65561, 1, 13, 26, 1, 13, 65562, 1, 13, 27, 1, 13, 65563, 1, 13, 28, 1, 13, 65564, 1, 13, 29, 1, 13, 65565, 1, 13, 30, 1, 13, 65566, 1, 13, 31, 1, 13, 65567, 1, 13, 32, 1, 13, 65568, 1, 13, 33, 1, 13, 65569, 1, 13, 34, 1, 13, 65570, 1, 13, 35, 1, 13, 65571, 1, 13, 36, 1, 13, 65572, 1, 13, 37, 1, 13, 65573, 1, 13, 38, 1, 13, 65574, 1, 13, 39, 1, 13, 65575, 1, 13, 40, 1, 13, 65576, 1, 13, 41, 1, 13, 65577, 1, 13, 42, 1, 13, 65578, 1, 13, 43, 1, 13, 65579, 1, 13, 44, 1, 13, 65580, 1, 13, 45, 1, 13, 65581, 1, 13, 46, 1, 13, 65582, 1, 13, 47, 1, 13, 65583, 1, 13, 48, 1, 13, 65584, 1, 13, -720888, 1245185, 2, -655340, 1769473, 3, -65517, 1835009, 12, -65516, 1900545, 12, -131053, 1835009, 11, -131052, 1900545, 11, -65504, 2555905, 12, -65505, 2490369, 12, -131041, 2490369, 12, -131040, 2555905, 12, -196577, 2490369, 10, -196576, 2555905, 10, -65500, 2686977, 12, -65496, 3014657, 12, -131032, 3014657, 12, -196568, 3014657, 12, -65495, 3080193, 12, -131031, 3080193, 12, -196567, 3080193, 12, -262104, 3014657, 9, -262103, 3080193, 9, 49, 65537, 13, 65585, 65537, 13, 65586, 65537, 13, 65587, 65537, 13, 65588, 65537, 13, 65589, 65537, 13, 65590, 65537, 13, 65598, 65537, 14, 65599, 65537, 14, 50, 65537, 13, 51, 65537, 13, 52, 65537, 13, 53, 65537, 13, 54, 65537, 13, 55, 65537, 13, 65591, 65537, 13, 56, 65537, 13, 65592, 65537, 13, 57, 65537, 13, 65593, 65537, 13, 58, 65537, 13, 65594, 65537, 13, 59, 65537, 13, 65595, 65537, 13, 60, 65537, 14, 65596, 65537, 14, 61, 65537, 14, 65597, 65537, 14, 62, 65537, 14, 63, 65537, 14, -131028, 1, 10, -65484, 3014657, 12, -131020, 3014657, 12, -196556, 3014657, 12, -262092, 3014657, 9, -262091, 3080193, 9, -196555, 3080193, 11, -131019, 3801089, 12, -65483, 3801089, 12, -65480, 720897, 12, -720867, 2359297, 2, -655308, 1245185, 2, 262186, 3407873, 17, 262187, 3407873, 17, 262188, 3407873, 17, 262189, 3407873, 17, 262190, 3407873, 17, 262191, 3407873, 17, 262192, 3407873, 17, 786476, 3407873, 17, 786474, 3407873, 17, 786475, 3407873, 17, 786477, 3407873, 17, 786478, 3407873, 17, 786479, 3407873, 17, 786480, 3407873, 17, 852016, 3407873, 17, 852015, 3407873, 17, 852014, 3407873, 17, 852013, 3407873, 17, 852012, 3407873, 17, 852011, 3407873, 17, 852010, 3407873, 17, 917546, 3407873, 17, 917547, 3407873, 17, 917548, 3407873, 17, 917549, 3407873, 17, 917550, 3407873, 17, 917551, 3407873, 17, 917552, 3407873, 17, 983089, 3145729, 28, 983090, 3145729, 28, 983091, 3145729, 28, 983092, 3145729, 28, 983093, 3145729, 28, 983081, 3145729, 28, 983080, 3145729, 28, 983079, 3145729, 28, 983078, 3145729, 28, 917542, 3145729, 27, 852006, 3145729, 27, 786470, 3145729, 27, 458790, 3145729, 27, 393254, 3145729, 27, 327718, 3145729, 27, 262182, 3145729, 27, 196646, 3145729, 27, 131110, 3145729, 27, 524326, 3145729, 27, 720934, 3145729, 27, 655398, 3145729, 27, 589862, 3145729, 27, 917555, 3997697, 27, 852019, 3997697, 26, 852020, 4063233, 26, 917556, 4063233, 27, 917557, 4128769, 27, 852021, 4128769, 26, 786485, 4128769, 25, 720949, 4128769, 25, 655413, 4128769, 25, 589877, 4128769, 25, 524341, 4128769, 25, 458805, 4128769, 25, 393269, 4128769, 25, 327733, 4128769, 25, 262197, 4128769, 25, 196661, 4128769, 25, 131125, 4128769, 25, 983094, 3801089, 28, 917558, 3801089, 28, 852022, 3801089, 28, 786486, 3801089, 28, 720950, 3801089, 28, 655414, 3801089, 28, 589878, 3801089, 28, 524342, 3801089, 28, 458806, 3801089, 28, 393270, 3801089, 28, 327734, 3801089, 28, 262198, 3801089, 28, 196662, 3801089, 28, 131126, 3801089, 28, 131127, 3801089, 28, 196663, 3801089, 28, 262199, 3801089, 28, 327735, 3801089, 28, 393271, 3801089, 28, 458807, 3801089, 28, 524343, 3801089, 28, 589879, 3801089, 28, 655415, 3801089, 28, 720951, 3801089, 28, 786487, 3801089, 28, 852023, 3801089, 28, 917559, 3801089, 28, 983095, 3801089, 28, 131128, 3801089, 28, 196664, 3801089, 28, 262200, 3801089, 28, 327736, 3801089, 28, 393272, 3801089, 28, 458808, 3801089, 28, 524344, 3801089, 28, 589880, 3801089, 28, 6Line truncated
[node name="player" parent="." instance=ExtResource("2_ru48y")]
unique_name_in_owner = true
z_index = 5
position = Vector2(1, -90)
@@ -19362,28 +19373,92 @@ rotation = -1.5708
target = Vector2(2592, -48)
[node name="Music" type="AudioStreamPlayer" parent="."]
unique_name_in_owner = true
stream = ExtResource("9_xkthi")
volume_db = -5.0
autoplay = true
[node name="Label" type="Label" parent="."]
offset_left = -144.0
offset_top = -96.0
offset_right = 6.0
offset_bottom = -73.0
offset_left = -136.0
offset_top = -111.0
offset_right = 98.0
offset_bottom = -88.0
theme_override_colors/font_color = Color(0.25332, 0.473895, 1, 1)
theme_override_fonts/font = ExtResource("10_b277n")
text = "Swipe Left To Move"
horizontal_alignment = 1
vertical_alignment = 1
script = ExtResource("12_lves8")
[node name="Label2" type="Label" parent="."]
offset_left = -144.0
offset_top = -64.0
offset_right = 90.0
offset_bottom = -41.0
offset_left = -151.0
offset_top = -87.0
offset_right = 105.0
offset_bottom = -64.0
theme_override_colors/font_color = Color(0.25332, 0.473895, 1, 1)
theme_override_fonts/font = ExtResource("10_b277n")
text = "Tap Right To Jump"
text = "Right Down Tap Jump"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Label3" type="Label" parent="."]
offset_left = 1048.0
offset_top = -98.0
offset_right = 1304.0
offset_bottom = -75.0
theme_override_colors/font_color = Color(0.25332, 0.473895, 1, 1)
theme_override_fonts/font = ExtResource("10_b277n")
text = "Right Up Tap Fire"
horizontal_alignment = 1
vertical_alignment = 1
[node name="WorldBoundDown" type="Area2D" parent="."]
collision_layer = 32768
collision_mask = 2
script = ExtResource("12_58dsg")
[node name="CollisionShape2D" type="CollisionShape2D" parent="WorldBoundDown"]
position = Vector2(0, 22)
rotation = -6.28318
shape = SubResource("SegmentShape2D_khpgg")
[node name="Timer" type="Timer" parent="WorldBoundDown"]
wait_time = 180.0
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="Control" type="Control" parent="CanvasLayer"]
layout_mode = 3
anchors_preset = 10
anchor_right = 1.0
grow_horizontal = 2
mouse_filter = 1
[node name="Label" type="Label" parent="CanvasLayer/Control"]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -155.0
offset_top = 56.0
offset_right = -71.0
offset_bottom = 88.0
grow_horizontal = 0
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_fonts/font = ExtResource("10_b277n")
theme_override_font_sizes/font_size = 32
text = "120"
[node name="Flag" type="Area2D" parent="."]
position = Vector2(3176, -19)
collision_layer = 32769
collision_mask = 2
script = ExtResource("14_e0s4v")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Flag"]
position = Vector2(0, -98.5)
shape = SubResource("RectangleShape2D_ihwdr")
[connection signal="body_entered" from="WorldBoundDown" to="WorldBoundDown" method="_on_body_entered"]
[connection signal="timeout" from="WorldBoundDown/Timer" to="WorldBoundDown" method="_on_timer_timeout"]
[connection signal="body_entered" from="Flag" to="Flag" method="_on_body_entered"]
+86 -1
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=29 format=3 uid="uid://dk1aby88pygtr"]
[gd_scene load_steps=33 format=3 uid="uid://dk1aby88pygtr"]
[ext_resource type="Script" path="res://scripts/player.gd" id="1_lm7ix"]
[ext_resource type="Texture2D" uid="uid://dhw3lpuskbvku" path="res://assets/mario-luigi-4.png" id="1_w3chr"]
@@ -8,6 +8,7 @@
[ext_resource type="AudioStream" uid="uid://cbs4okawh444d" path="res://assets/sounds/NES - Super Mario Bros - Sound Effects/Super Mario Bros 1 and 2(JP)/Warp.wav" id="5_kvw73"]
[ext_resource type="AudioStream" uid="uid://bo4big602rvtr" path="res://assets/sounds/NES - Super Mario Bros - Sound Effects/Super Mario Bros 1 and 2(JP)/Jump.wav" id="6_aq3u4"]
[ext_resource type="AudioStream" uid="uid://bh8t167vl6j2n" path="res://assets/sounds/NES - Super Mario Bros - Sound Effects/Super Mario Bros 1 and 2(JP)/Kick.wav" id="8_6t158"]
[ext_resource type="AudioStream" uid="uid://b0h07g0c8i84c" path="res://assets/sounds/NES - Super Mario Bros - Sound Effects/Super Mario Bros 1 and 2(JP)/Die.wav" id="9_pu5vq"]
[sub_resource type="AtlasTexture" id="AtlasTexture_l22ll"]
atlas = ExtResource("1_w3chr")
@@ -184,6 +185,81 @@ size = Vector2(8, 1)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_okc7h"]
size = Vector2(1, 2)
[sub_resource type="Animation" id="Animation_miyjx"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera2D/ColorRect:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("dieSound:playing")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_jgvs8"]
resource_name = "die"
length = 3.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera2D/ColorRect:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("dieSound:playing")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.1),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "method"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(3),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"reload_scene"
}]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_uuoiq"]
_data = {
"RESET": SubResource("Animation_miyjx"),
"die": SubResource("Animation_jgvs8")
}
[node name="player" type="CharacterBody2D"]
position = Vector2(0, -10)
collision_layer = 2
@@ -259,6 +335,7 @@ offset_right = 241.0
offset_bottom = 104.0
mouse_filter = 1
theme_override_colors/font_color = Color(1, 0.627451, 0.266667, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_fonts/font = ExtResource("3_mkgvb")
theme_override_font_sizes/font_size = 40
text = "0
@@ -282,6 +359,14 @@ stream = ExtResource("6_aq3u4")
[node name="shrinkSound" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("8_6t158")
[node name="dieSound" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("9_pu5vq")
[node name="diePlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_uuoiq")
}
[connection signal="area_entered" from="pipedetector_ground" to="." method="_on_pipedetector_area_entered"]
[connection signal="area_exited" from="pipedetector_ground" to="." method="_on_pipedetector_area_exited"]
[connection signal="area_entered" from="pipedetector_right" to="." method="_on_pipedetector_right_area_entered"]
+5
View File
@@ -0,0 +1,5 @@
extends Area2D
func _on_body_entered(body):
pass
+16
View File
@@ -0,0 +1,16 @@
extends Label
@onready var label = $"."
@onready var label_2 = $"../Label2"
@onready var label_3 = $"../Label3"
func _ready():
var platform = ""
match OS.get_name():
"Windows", "macOS", "Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD", "Web":
label.text = "A, S, D To Move"
label_2.text = "Space To Jump"
label_3.text = "E To Fire"
"Android", "iOS":
pass
+17
View File
@@ -0,0 +1,17 @@
extends Area2D
@onready var timer = $Timer
@onready var label = $"../CanvasLayer/Control/Label"
@onready var player = %player
func _on_body_entered(body):
body.player_die()
func _ready():
timer.start()
func _process(delta):
var x = str(int(timer.time_left))
label.text = x
func _on_timer_timeout():
player.player_die()
+10 -1
View File
@@ -10,6 +10,8 @@ extends CharacterBody2D
@onready var pipe_sound = $PipeSound
@onready var jump_sound = $JumpSound
@onready var shrink_sound = $shrinkSound
@onready var die_player = $diePlayer
@onready var music = %Music
const SPEED = 130.0
@@ -174,7 +176,14 @@ func shrink():
pipedetector_ground.position.y -= 8
shrink_sound.play()
else:
print("dead")
player_die()
func player_die():
die_player.play("die")
music.stop()
func reload_scene():
get_tree().reload_current_scene()
func increase_coins():
coins += 1