diff --git a/assets/audio/Digital Lemonade.mp3 b/assets/audio/Digital Lemonade.mp3 new file mode 100644 index 0000000..f066889 Binary files /dev/null and b/assets/audio/Digital Lemonade.mp3 differ diff --git a/assets/audio/Digital Lemonade.mp3.import b/assets/audio/Digital Lemonade.mp3.import new file mode 100644 index 0000000..b4ef175 --- /dev/null +++ b/assets/audio/Digital Lemonade.mp3.import @@ -0,0 +1,15 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +path="res://.import/Digital Lemonade.mp3-117f36e8b4d12c34581035c9cb7975cb.mp3str" + +[deps] + +source_file="res://assets/audio/Digital Lemonade.mp3" +dest_files=[ "res://.import/Digital Lemonade.mp3-117f36e8b4d12c34581035c9cb7975cb.mp3str" ] + +[params] + +loop=true +loop_offset=0 diff --git a/assets/images/blue.png b/assets/images/blue.png new file mode 100644 index 0000000..98cdbbb Binary files /dev/null and b/assets/images/blue.png differ diff --git a/assets/images/blue.png.import b/assets/images/blue.png.import new file mode 100644 index 0000000..6547b9c --- /dev/null +++ b/assets/images/blue.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/blue.png-df15fb05c84a20375dc06447376a8162.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/images/blue.png" +dest_files=[ "res://.import/blue.png-df15fb05c84a20375dc06447376a8162.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/default_bus_layout.tres b/default_bus_layout.tres new file mode 100644 index 0000000..a28dfc8 --- /dev/null +++ b/default_bus_layout.tres @@ -0,0 +1,9 @@ +[gd_resource type="AudioBusLayout" format=2] + +[resource] +bus/1/name = "Music" +bus/1/solo = false +bus/1/mute = false +bus/1/bypass_fx = false +bus/1/volume_db = 0.0 +bus/1/send = "Master" diff --git a/game/Game.gd b/game/Game.gd index 2bf346f..4ce8957 100644 --- a/game/Game.gd +++ b/game/Game.gd @@ -1,18 +1,5 @@ extends Node2D - -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" - - -# Called when the node enters the scene tree for the first time. func _ready(): pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -#func _process(delta): - -# pass diff --git a/game/Game.tscn b/game/Game.tscn index ccfd590..fa51378 100644 --- a/game/Game.tscn +++ b/game/Game.tscn @@ -1,23 +1,22 @@ -[gd_scene load_steps=9 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://game/Game.gd" type="Script" id=1] [ext_resource path="res://game/Interface.tscn" type="PackedScene" id=2] [ext_resource path="res://assets/tilemap.tres" type="TileSet" id=3] -[ext_resource path="res://assets/images/white.png" type="Texture" id=4] -[ext_resource path="res://game/characters/player/Player.gd" type="Script" id=5] +[ext_resource path="res://game/characters/player/Player.tscn" type="PackedScene" id=4] +[ext_resource path="res://game/characters/victor/Victor.tscn" type="PackedScene" id=5] [ext_resource path="res://game/Pause.gd" type="Script" id=6] [ext_resource path="res://assets/audio/Happy Bee.mp3" type="AudioStream" id=7] - -[sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 8, 8 ) +[ext_resource path="res://game/objects/Shop.tscn" type="PackedScene" id=8] +[ext_resource path="res://game/characters/victor/Victor.gd" type="Script" id=9] [node name="World" type="Node2D"] script = ExtResource( 1 ) [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] -pause_mode = 2 stream = ExtResource( 7 ) autoplay = true +bus = "Music" [node name="HUD" type="CanvasLayer" parent="."] @@ -59,35 +58,66 @@ margin_right = 64.0 margin_bottom = 38.0 text = "Resume" +[node name="Mute" type="Button" parent="Pause/Pause/Overlay/CenterContainer/VBoxContainer"] +visible = false +margin_right = 12.0 +margin_bottom = 20.0 +text = "Mute" + [node name="Quit" type="Button" parent="Pause/Pause/Overlay/CenterContainer/VBoxContainer"] margin_top = 42.0 margin_right = 64.0 margin_bottom = 62.0 text = "Quit" +[node name="Game Over" type="CanvasLayer" parent="."] + +[node name="Game Over" type="Control" parent="Game Over"] +pause_mode = 2 +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="Overlay" type="ColorRect" parent="Game Over/Game Over"] +anchor_right = 1.0 +anchor_bottom = 1.0 +color = Color( 0, 0, 0, 0.352941 ) + +[node name="CenterContainer" type="CenterContainer" parent="Game Over/Game Over/Overlay"] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="VBoxContainer" type="VBoxContainer" parent="Game Over/Game Over/Overlay/CenterContainer"] +margin_left = 461.0 +margin_top = 344.0 +margin_right = 818.0 +margin_bottom = 375.0 + +[node name="Label" type="Label" parent="Game Over/Game Over/Overlay/CenterContainer/VBoxContainer"] +margin_right = 357.0 +margin_bottom = 31.0 +text = "Game Over! +Victor has banned you from b&B for taking his Up card..." +align = 1 + [node name="TileMap" type="TileMap" parent="."] tile_set = ExtResource( 3 ) cell_size = Vector2( 16, 16 ) +bake_navigation = true format = 1 tile_data = PoolIntArray( 2424870, 0, 0, 2424871, 0, 0, 2424872, 0, 0, 2424873, 0, 0, 2424874, 0, 0, 2424875, 0, 0, 2424876, 0, 0, 2424877, 0, 0, 2424878, 0, 0, 2424879, 0, 0, 2424880, 0, 0, 2424881, 0, 0, 2424882, 0, 0, 2424883, 0, 0, 2424884, 0, 0, 2424885, 0, 0, 2424886, 0, 0, 2424887, 0, 0, 2424888, 0, 0, 2424889, 0, 0, 2424890, 0, 0, 2424891, 0, 0, 2424892, 0, 0, 2424893, 0, 0, 2424894, 0, 0, 2424895, 0, 0, 2424896, 0, 0, 2424897, 0, 0, 2424898, 0, 0, 2424899, 0, 0, 2424900, 0, 0, 2424901, 0, 0, 2424902, 0, 0, 2424903, 0, 0, 2424904, 0, 0, 2424905, 0, 0, 2424906, 0, 0, 2424907, 0, 0, 2424908, 0, 0, 2424909, 0, 0, 2424910, 0, 0, 2424911, 0, 0, 2818048, 0, 0, 2818049, 0, 0, 2818050, 0, 0, 2818051, 0, 0, 2818052, 0, 0, 2818053, 0, 0, 2818054, 0, 0, 2818055, 0, 0, 2818056, 0, 0, 2818057, 0, 0, 2818058, 0, 0, 2818059, 0, 0, 2818060, 0, 0, 2818061, 0, 0, 2818062, 0, 0, 2818063, 0, 0, 2818064, 0, 0, 2818065, 0, 0, 2818066, 0, 0, 2818067, 0, 0, 2818068, 0, 0, 2818069, 0, 0, 2818070, 0, 0, 2818071, 0, 0, 2818072, 0, 0, 2818073, 0, 0, 2818074, 0, 0, 2818075, 0, 0, 2818076, 0, 0, 2818077, 0, 0, 2818078, 0, 0, 2818079, 0, 0, 2818080, 0, 0, 2818081, 0, 0, 2818082, 0, 0, 2818083, 0, 0, 2818084, 0, 0, 2818085, 0, 0, 2818086, 0, 0, 2818087, 0, 0, 2818088, 0, 0, 2818089, 0, 0, 2818090, 0, 0, 2818091, 0, 0, 2818092, 0, 0, 2818093, 0, 0, 2818094, 0, 0, 2818095, 0, 0, 2818096, 0, 0, 2818097, 0, 0, 2818098, 0, 0, 2818099, 0, 0, 2818100, 0, 0, 2818101, 0, 0, 2818102, 0, 0, 2818103, 0, 0, 2818104, 0, 0, 2818105, 0, 0, 2818106, 0, 0, 2818107, 0, 0, 2818108, 0, 0, 2818109, 0, 0, 2818110, 0, 0, 2818111, 0, 0, 2818112, 0, 0, 2818113, 0, 0, 2818114, 0, 0, 2818115, 0, 0, 2818116, 0, 0, 2818117, 0, 0, 2818118, 0, 0, 2818119, 0, 0, 2818120, 0, 0, 2818121, 0, 0, 2818122, 0, 0, 2818123, 0, 0, 2818124, 0, 0, 2818125, 0, 0, 2818126, 0, 0, 2818127, 0, 0, 2883584, 0, 0, 2883585, 0, 0, 2883586, 0, 0, 2883587, 0, 0, 2883588, 0, 0, 2883589, 0, 0, 2883590, 0, 0, 2883591, 0, 0, 2883592, 0, 0, 2883593, 0, 0, 2883594, 0, 0, 2883595, 0, 0, 2883596, 0, 0, 2883597, 0, 0, 2883598, 0, 0, 2883599, 0, 0, 2883600, 0, 0, 2883601, 0, 0, 2883602, 0, 0, 2883603, 0, 0, 2883604, 0, 0, 2883605, 0, 0, 2883606, 0, 0, 2883607, 0, 0, 2883608, 0, 0, 2883609, 0, 0, 2883610, 0, 0, 2883611, 0, 0, 2883612, 0, 0, 2883613, 0, 0, 2883614, 0, 0, 2883615, 0, 0, 2883616, 0, 0, 2883617, 0, 0, 2883618, 0, 0, 2883619, 0, 0, 2883620, 0, 0, 2883621, 0, 0, 2883622, 0, 0, 2883623, 0, 0, 2883624, 0, 0, 2883625, 0, 0, 2883626, 0, 0, 2883627, 0, 0, 2883628, 0, 0, 2883629, 0, 0, 2883630, 0, 0, 2883631, 0, 0, 2883632, 0, 0, 2883633, 0, 0, 2883634, 0, 0, 2883635, 0, 0, 2883636, 0, 0, 2883637, 0, 0, 2883638, 0, 0, 2883639, 0, 0, 2883640, 0, 0, 2883641, 0, 0, 2883642, 0, 0, 2883643, 0, 0, 2883644, 0, 0, 2883645, 0, 0, 2883646, 0, 0, 2883647, 0, 0, 2883648, 0, 0, 2883649, 0, 0, 2883650, 0, 0, 2883651, 0, 0, 2883652, 0, 0, 2883653, 0, 0, 2883654, 0, 0, 2883655, 0, 0, 2883656, 0, 0, 2883657, 0, 0, 2883658, 0, 0, 2883659, 0, 0, 2883660, 0, 0, 2883661, 0, 0, 2883662, 0, 0, 2883663, 0, 0 ) -[node name="Player" type="KinematicBody2D" parent="."] -position = Vector2( 50, 600 ) -script = ExtResource( 5 ) -MAXSPEED = 200 -JUMPFORCE = 500 -ACCEL = 100 +[node name="Player" parent="." instance=ExtResource( 4 )] -[node name="Sprite" type="Sprite" parent="Player"] -texture = ExtResource( 4 ) +[node name="Shop" parent="." instance=ExtResource( 8 )] +light_mask = 3 +position = Vector2( 478, 673 ) +scale = Vector2( 2.61361, 1.88 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"] -shape = SubResource( 1 ) - -[node name="Camera2D" type="Camera2D" parent="Player"] -current = true -zoom = Vector2( 0.5, 0.5 ) -smoothing_enabled = true +[node name="Victor" parent="." instance=ExtResource( 5 )] +position = Vector2( 8, 680 ) +script = ExtResource( 9 ) [connection signal="pressed" from="Pause/Pause/Overlay/CenterContainer/VBoxContainer/Resume" to="Pause/Pause" method="_on_Resume_pressed"] +[connection signal="pressed" from="Pause/Pause/Overlay/CenterContainer/VBoxContainer/Mute" to="Pause/Pause" method="_on_Mute_pressed"] [connection signal="pressed" from="Pause/Pause/Overlay/CenterContainer/VBoxContainer/Quit" to="Pause/Pause" method="_on_Quit_pressed"] diff --git a/game/Pause.gd b/game/Pause.gd index ccdf132..e04e94d 100644 --- a/game/Pause.gd +++ b/game/Pause.gd @@ -12,6 +12,11 @@ func _on_Resume_pressed(): get_tree().paused = new_pause_state visible = new_pause_state +func _on_Mute_pressed(): + var player = get_node("../../AudioStreamPlayer") + var player_paused = not player.stream_paused + player.stream_paused = player_paused func _on_Quit_pressed(): get_tree().quit() + diff --git a/game/characters/player/Player.tscn b/game/characters/player/Player.tscn index a7ee0e4..3a3bba7 100644 --- a/game/characters/player/Player.tscn +++ b/game/characters/player/Player.tscn @@ -1,38 +1,25 @@ [gd_scene load_steps=4 format=2] +[ext_resource path="res://game/characters/player/Player.gd" type="Script" id=1] [ext_resource path="res://assets/images/white.png" type="Texture" id=2] -[sub_resource type="GDScript" id=2] -script/source = "extends KinematicBody2D - - -# Declare member variables here. Examples: -# var a = 2 -# var b = \"text\" - - -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -#func _process(delta): -# pass -" - [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 160, 160 ) +extents = Vector2( 8, 8 ) [node name="Player" type="KinematicBody2D"] -script = SubResource( 2 ) +position = Vector2( 50, 600 ) +script = ExtResource( 1 ) +MAXSPEED = 200 +JUMPFORCE = 500 +ACCEL = 100 -[node name="White" type="Sprite" parent="."] -position = Vector2( -4.76837e-07, 0 ) -scale = Vector2( 20, 20 ) +[node name="Sprite" type="Sprite" parent="."] texture = ExtResource( 2 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource( 1 ) [node name="Camera2D" type="Camera2D" parent="."] +current = true +zoom = Vector2( 0.5, 0.5 ) +smoothing_enabled = true diff --git a/game/characters/victor/Victor.gd b/game/characters/victor/Victor.gd new file mode 100644 index 0000000..7d8259f --- /dev/null +++ b/game/characters/victor/Victor.gd @@ -0,0 +1,7 @@ +extends KinematicBody2D + +var speed = 100 +var velocity = Vector2(0, 0) + +func _physics_process(_delta): + pass diff --git a/game/characters/victor/Victor.tscn b/game/characters/victor/Victor.tscn new file mode 100644 index 0000000..1cd8f7a --- /dev/null +++ b/game/characters/victor/Victor.tscn @@ -0,0 +1,14 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://assets/images/blue.png" type="Texture" id=1] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 8, 8 ) + +[node name="Victor" type="KinematicBody2D"] + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 1 ) diff --git a/game/objects/Shop.tscn b/game/objects/Shop.tscn new file mode 100644 index 0000000..c34640d --- /dev/null +++ b/game/objects/Shop.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://assets/images/green.png" type="Texture" id=1] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 8, 8 ) + +[node name="Shop" type="Node2D"] + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="Area2D" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +shape = SubResource( 1 ) diff --git a/menu/Menu.tscn b/menu/Menu.tscn index 60a2797..57dc608 100644 --- a/menu/Menu.tscn +++ b/menu/Menu.tscn @@ -55,7 +55,7 @@ margin_bottom = 238.0 margin_top = 242.0 margin_right = 463.0 margin_bottom = 256.0 -text = "Made for the bits & Bytes Unofficial Game Jam! August 2022." +text = "Made for the bits & Bytes Unofficial Game Jam August 2022." align = 1 [node name="Copyright" type="Label" parent="MarginContainer/CenterContainer/VBoxContainer"] @@ -108,6 +108,14 @@ margin_right = 521.0 margin_bottom = 68.0 text = "Powered by the Godot Engine" +[node name="Label5" type="Label" parent="CreditsDialog/MarginContainer/VBoxContainer"] +margin_top = 72.0 +margin_right = 521.0 +margin_bottom = 120.0 +text = "Music used for this game: +Digital Lemonade by Kevin Macleod +Happy Bee by Kevin Macleod" + [connection signal="button_up" from="MarginContainer/CenterContainer/VBoxContainer/Play" to="." method="_on_Play_button_up"] [connection signal="button_up" from="MarginContainer/CenterContainer/VBoxContainer/Credits" to="." method="_on_Credits_button_up"] [connection signal="button_up" from="MarginContainer/CenterContainer/VBoxContainer/Quit" to="." method="_on_Quit_button_up"] diff --git a/project.godot b/project.godot index 51b6099..b0afca1 100644 --- a/project.godot +++ b/project.godot @@ -21,6 +21,10 @@ window/size/height=720 window/stretch/mode="viewport" window/stretch/aspect="expand" +[global] + +layer=false + [input] jump={ @@ -44,6 +48,11 @@ pause={ ] } +[layer_names] + +2d_render/layer_1="Default" +2d_render/layer_2="Shops" + [physics] common/enable_pause_aware_picking=true