diff --git a/Scenes/game_over_menu.tscn b/Scenes/game_over_menu.tscn index 9aefbca..5519b46 100644 --- a/Scenes/game_over_menu.tscn +++ b/Scenes/game_over_menu.tscn @@ -17,6 +17,7 @@ script = ExtResource("1_arass") [node name="FinalScore" type="Label" parent="."] layout_mode = 2 text = "Final Score + 0" label_settings = SubResource("LabelSettings_7upku") horizontal_alignment = 1 diff --git a/Scenes/level.tscn b/Scenes/level.tscn index b3049ae..69eecb3 100644 --- a/Scenes/level.tscn +++ b/Scenes/level.tscn @@ -24,5 +24,6 @@ monitorable = false shape = SubResource("RectangleShape2D_51e2h") [node name="MeshInstance2D" type="MeshInstance2D" parent="CollisionShape2D"] +visible = false mesh = SubResource("QuadMesh_tumq0") texture = SubResource("GradientTexture2D_6phgx") diff --git a/Scenes/main.tscn b/Scenes/main.tscn index 9f29c9f..63247c8 100644 --- a/Scenes/main.tscn +++ b/Scenes/main.tscn @@ -1,11 +1,14 @@ -[gd_scene load_steps=9 format=4 uid="uid://bs6an72avch86"] +[gd_scene load_steps=12 format=4 uid="uid://bs6an72avch86"] +[ext_resource type="Texture2D" uid="uid://dxdtqv4do4x31" path="res://Sprites/background.png" id="1_6bp64"] [ext_resource type="PackedScene" uid="uid://gkqku38yb2ng" path="res://Scenes/level.tscn" id="1_bo1nx"] [ext_resource type="PackedScene" uid="uid://d0okbjqyaoe0w" path="res://Scenes/snake_part.tscn" id="2_8gbba"] [ext_resource type="PackedScene" uid="uid://bldekmt1rakjl" path="res://Scenes/fruit.tscn" id="3_8gbba"] [ext_resource type="PackedScene" uid="uid://mp03fsd536be" path="res://Scenes/score_display.tscn" id="4_jjvhh"] [ext_resource type="PackedScene" uid="uid://bqg3ohs1gwofr" path="res://Scenes/game_over_menu.tscn" id="5_kry3j"] [ext_resource type="Texture2D" uid="uid://dr54j1cutgpf2" path="res://Sprites/tile.png" id="6_21xkr"] +[ext_resource type="Texture2D" uid="uid://c6kno4vjbvu28" path="res://Sprites/ouroboros.png" id="8_ynf5e"] +[ext_resource type="Script" uid="uid://8jbramxjbw1w" path="res://Scripts/ouroboros.gd" id="9_hptm8"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_6bp64"] resource_name = "Tile" @@ -19,6 +22,10 @@ sources/0 = SubResource("TileSetAtlasSource_6bp64") [node name="Main" type="Node2D"] +[node name="Background" type="Sprite2D" parent="."] +texture = ExtResource("1_6bp64") +centered = false + [node name="Level" parent="." instance=ExtResource("1_bo1nx")] position = Vector2(640, 320) scale = Vector2(24, 14) @@ -49,9 +56,9 @@ position = Vector2(707, 325) [node name="ScoreDisplay" parent="." instance=ExtResource("4_jjvhh")] offset_left = 4.0 -offset_top = 42.0 +offset_top = 188.0 offset_right = 156.0 -offset_bottom = 197.0 +offset_bottom = 602.0 [node name="GameOverMenu" parent="." instance=ExtResource("5_kry3j")] z_index = 1 @@ -60,9 +67,21 @@ offset_top = 173.0 offset_right = 812.0 offset_bottom = 475.0 +[node name="Ouroboros2" type="Sprite2D" parent="GameOverMenu"] +position = Vector2(237, 118) +scale = Vector2(0.5, 0.5) +texture = ExtResource("8_ynf5e") +script = ExtResource("9_hptm8") + [node name="TileMapLayer" type="TileMapLayer" parent="."] position = Vector2(20, 20) tile_map_data = PackedByteArray("AAADAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAJAAAAAAAAAAAAAAAKAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAANAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAARAAAAAAAAAAAAAAASAAAAAAAAAAAAAAATAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAVAAAAAAAAAAAAAAAWAAAAAAAAAAAAAAAXAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAZAAAAAAAAAAAAAAAaAAAAAAAAAAAAAAAbAAAAAAA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AAAAYAAQAAAAAAAAAAAAYAAUAAAAAAAAAAAAYAAYAAAAAAAAAAAAYAAcAAAAAAAAAAAAYAAgAAAAAAAAAAAAYAAkAAAAAAAAAAAAYAAoAAAAAAAAAAAAYAAsAAAAAAAAAAAAYAAwAAAAAAAAAAAAYAA0AAAAAAAAAAAAZAA0AAAAAAAAAAAAZAAwAAAAAAAAAAAAZAAsAAAAAAAAAAAAZAAoAAAAAAAAAAAAZAAkAAAAAAAAAAAAaAAkAAAAAAAAAAAAaAAoAAAAAAAAAAAAaAAsAAAAAAAAAAAAaAAwAAAAAAAAAAAAaAA0AAAAAAAAAAAAZAAYAAAAAAAAAAAAZAAUAAAAAAAAAAAAZAAQAAAAAAAAAAAAZAAMAAAAAAAAAAAAZAAIAAAAAAAAAAAA=") tile_set = SubResource("TileSet_344ge") +[node name="Ouroboros" type="Sprite2D" parent="."] +position = Vector2(86, 97) +scale = Vector2(0.5, 0.5) +texture = ExtResource("8_ynf5e") +script = ExtResource("9_hptm8") + [connection signal="timeout" from="RestartTimer" to="Timer" method="start" binds= [0.3]] diff --git a/Scenes/main_menu.tscn b/Scenes/main_menu.tscn index 3101117..40eb0f3 100644 --- a/Scenes/main_menu.tscn +++ b/Scenes/main_menu.tscn @@ -1,9 +1,29 @@ -[gd_scene load_steps=3 format=3 uid="uid://bu5cwjawsnb1q"] +[gd_scene load_steps=10 format=3 uid="uid://bu5cwjawsnb1q"] [ext_resource type="Script" uid="uid://bomw4j2mmerry" path="res://Scripts/main_menu.gd" id="1_28flt"] +[ext_resource type="Texture2D" uid="uid://dxdtqv4do4x31" path="res://Sprites/background.png" id="2_48xlc"] +[ext_resource type="Texture2D" uid="uid://c6kno4vjbvu28" path="res://Sprites/ouroboros.png" id="3_ce3w2"] +[ext_resource type="Script" uid="uid://dp3dc6g76g8wq" path="res://Scripts/menu_ouroboros.gd" id="4_n45e2"] -[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_erv1k"] -size = Vector2(800, 160) +[sub_resource type="LabelSettings" id="LabelSettings_ce3w2"] +font_size = 160 +font_color = Color(1, 0.271, 0, 1) + +[sub_resource type="LabelSettings" id="LabelSettings_n45e2"] +font_size = 160 +font_color = Color(1, 1, 0, 1) + +[sub_resource type="LabelSettings" id="LabelSettings_opfnp"] +font_size = 160 +font_color = Color(0, 0, 1, 1) + +[sub_resource type="LabelSettings" id="LabelSettings_cp0ys"] +font_size = 160 +font_color = Color(0.545098, 0, 0, 1) + +[sub_resource type="LabelSettings" id="LabelSettings_yhxw7"] +font_size = 160 +font_color = Color(1, 1, 0, 1) [node name="MainMenu" type="Control"] layout_mode = 3 @@ -14,6 +34,10 @@ grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_28flt") +[node name="Background" type="Sprite2D" parent="."] +texture = ExtResource("2_48xlc") +centered = false + [node name="Container" type="Control" parent="."] layout_mode = 1 anchors_preset = 0 @@ -42,17 +66,79 @@ text = "Options" layout_mode = 2 text = "Quit" -[node name="TextureRect" type="TextureRect" parent="."] -layout_mode = 1 -anchors_preset = -1 -anchor_left = 0.1 -anchor_top = 0.045 -anchor_right = 0.9 -anchor_bottom = 0.284 -grow_horizontal = 2 -grow_vertical = 2 -texture = SubResource("PlaceholderTexture2D_erv1k") -expand_mode = 2 +[node name="Title" type="Control" parent="."] +anchors_preset = 0 +offset_left = -34.0 +offset_top = -2.0 +offset_right = 6.0 +offset_bottom = 38.0 + +[node name="Ouroboros" type="Sprite2D" parent="Title"] +modulate = Color(0.545, 0, 0, 1) +position = Vector2(241, 130) +texture = ExtResource("3_ce3w2") +script = ExtResource("4_n45e2") + +[node name="Ouroboros2" type="Sprite2D" parent="Title"] +modulate = Color(0, 0.502, 0, 1) +position = Vector2(574, 176) +scale = Vector2(0.5, 0.5) +texture = ExtResource("3_ce3w2") +script = ExtResource("4_n45e2") + +[node name="Ouroboros3" type="Sprite2D" parent="Title"] +modulate = Color(0.4, 0.2, 0.6, 1) +position = Vector2(776, 178) +scale = Vector2(0.5, 0.5) +texture = ExtResource("3_ce3w2") +script = ExtResource("4_n45e2") + +[node name="Ouroboros4" type="Sprite2D" parent="Title"] +modulate = Color(1, 0.270588, 0, 1) +position = Vector2(947, 181) +scale = Vector2(0.5, 0.5) +texture = ExtResource("3_ce3w2") +script = ExtResource("4_n45e2") + +[node name="Label" type="Label" parent="Title"] +offset_left = 351.0 +offset_top = 49.0 +offset_right = 522.0 +offset_bottom = 268.0 +text = "u" +label_settings = SubResource("LabelSettings_ce3w2") + +[node name="Label5" type="Label" parent="Title"] +offset_left = 453.0 +offset_top = 49.0 +offset_right = 624.0 +offset_bottom = 268.0 +text = "r" +label_settings = SubResource("LabelSettings_n45e2") + +[node name="Label2" type="Label" parent="Title"] +offset_left = 625.0 +offset_top = 50.0 +offset_right = 725.0 +offset_bottom = 269.0 +text = "b" +label_settings = SubResource("LabelSettings_opfnp") + +[node name="Label3" type="Label" parent="Title"] +offset_left = 827.0 +offset_top = 52.0 +offset_right = 927.0 +offset_bottom = 271.0 +text = "r" +label_settings = SubResource("LabelSettings_cp0ys") + +[node name="Label4" type="Label" parent="Title"] +offset_left = 998.0 +offset_top = 51.0 +offset_right = 1098.0 +offset_bottom = 270.0 +text = "s" +label_settings = SubResource("LabelSettings_yhxw7") [connection signal="pressed" from="Buttons/Start" to="." method="start_game"] [connection signal="pressed" from="Buttons/Quit" to="." method="quit"] diff --git a/Scenes/score_display.tscn b/Scenes/score_display.tscn index 4c8dbe2..0117f01 100644 --- a/Scenes/score_display.tscn +++ b/Scenes/score_display.tscn @@ -1,7 +1,10 @@ -[gd_scene load_steps=2 format=3 uid="uid://mp03fsd536be"] +[gd_scene load_steps=3 format=3 uid="uid://mp03fsd536be"] [ext_resource type="Script" uid="uid://bwiflwp3hufyu" path="res://Scripts/score_display.gd" id="1_abl27"] +[sub_resource type="LabelSettings" id="LabelSettings_abl27"] +font_size = 22 + [node name="ScoreDisplay" type="VBoxContainer"] anchors_preset = 15 anchor_right = 1.0 @@ -14,22 +17,40 @@ script = ExtResource("1_abl27") layout_mode = 2 text = "Score 0" +label_settings = SubResource("LabelSettings_abl27") horizontal_alignment = 1 +[node name="Spacer" type="Control" parent="."] +layout_mode = 2 +size_flags_vertical = 3 + [node name="LengthLabel" type="Label" parent="."] layout_mode = 2 text = "Length 3" +label_settings = SubResource("LabelSettings_abl27") horizontal_alignment = 1 +[node name="Spacer2" type="Control" parent="."] +layout_mode = 2 +size_flags_vertical = 3 + [node name="PendingLengthLabel" type="Label" parent="."] layout_mode = 2 -text = "Length +text = "Eventual +Length 3" +label_settings = SubResource("LabelSettings_abl27") horizontal_alignment = 1 +[node name="Spacer3" type="Control" parent="."] +layout_mode = 2 +size_flags_vertical = 3 + [node name="OuroborosPossibleLabel" type="Label" parent="."] layout_mode = 2 -text = "Ouroboros Possible +text = "Ouroboros +Possible? No" +label_settings = SubResource("LabelSettings_abl27") horizontal_alignment = 1 diff --git a/Scripts/fruit.gd b/Scripts/fruit.gd index ad8e007..27725ee 100644 --- a/Scripts/fruit.gd +++ b/Scripts/fruit.gd @@ -20,8 +20,8 @@ func _ready() -> void: var y_bounds : Vector2 = level.position.y * Vector2.ONE + Vector2(-TILE_SIZE, TILE_SIZE) * level.scale.y / 2 # Determine the possible x and y coordinates - var possible_x : Array = range(x_bounds.x, x_bounds.y, TILE_SIZE) - var possible_y : Array = range(y_bounds.x, y_bounds.y, TILE_SIZE) + var possible_x : Array = range(x_bounds.x, x_bounds.y + 20, TILE_SIZE) + var possible_y : Array = range(y_bounds.x, y_bounds.y + 20, TILE_SIZE) # Add each combination of x and y to the list of positions for x in possible_x: diff --git a/Scripts/game_over_menu.gd b/Scripts/game_over_menu.gd index 1853a12..4467db7 100644 --- a/Scripts/game_over_menu.gd +++ b/Scripts/game_over_menu.gd @@ -7,7 +7,7 @@ var score_label : Label = $FinalScore func update_score() -> void: if score_label != null: - score_label.text = "Final Score\n{score}".format(GameManager) + score_label.text = "Final Score\n\n{score}".format(GameManager) func restart(): get_tree().change_scene_to_packed(load("res://Scenes/main.tscn")) diff --git a/Scripts/menu_ouroboros.gd b/Scripts/menu_ouroboros.gd new file mode 100644 index 0000000..4257ffd --- /dev/null +++ b/Scripts/menu_ouroboros.gd @@ -0,0 +1,6 @@ +extends Sprite2D + +const ROTATION_SPEED = 0.2 + +func _process(delta: float) -> void: + rotate(delta * ROTATION_SPEED) diff --git a/Scripts/menu_ouroboros.gd.uid b/Scripts/menu_ouroboros.gd.uid new file mode 100644 index 0000000..160de6f --- /dev/null +++ b/Scripts/menu_ouroboros.gd.uid @@ -0,0 +1 @@ +uid://dp3dc6g76g8wq diff --git a/Scripts/ouroboros.gd b/Scripts/ouroboros.gd new file mode 100644 index 0000000..fd0d340 --- /dev/null +++ b/Scripts/ouroboros.gd @@ -0,0 +1,9 @@ +extends Sprite2D + +const ROTATION_SPEED = 0.2 + +func _process(delta: float) -> void: + var head = get_tree().get_first_node_in_group("Head") + if head is SnakePart: + rotate(delta * ROTATION_SPEED * (head.colour_index + 1)) + modulate = head.COLOURS[head.colour_index] diff --git a/Scripts/ouroboros.gd.uid b/Scripts/ouroboros.gd.uid new file mode 100644 index 0000000..b5c1267 --- /dev/null +++ b/Scripts/ouroboros.gd.uid @@ -0,0 +1 @@ +uid://8jbramxjbw1w diff --git a/Scripts/score_display.gd b/Scripts/score_display.gd index de1ffe4..cfe6902 100644 --- a/Scripts/score_display.gd +++ b/Scripts/score_display.gd @@ -16,11 +16,11 @@ func _process(_delta: float) -> void: length_label.text = "Length\n{0}".format([get_snake_length()]) var head : Node = get_tree().get_first_node_in_group("Head") if head is SnakePart: - pending_length_label.text = "Eventual Length\n{0}".format([get_snake_length() + head.queued_growth]) + pending_length_label.text = "Eventual\nLength\n{0}".format([get_snake_length() + head.queued_growth]) if ouroboros_possible: - ouroboros_label.text = "Ouroboros Possible\nYes" + ouroboros_label.text = "Ouroboros\nPossible?\nYes" else: - ouroboros_label.text = "Ouroboros Possible\nNo" + ouroboros_label.text = "Ouroboros\nPossible?\nNo" func get_snake_length() -> int: var length : int = 0 diff --git a/Scripts/snake_part.gd b/Scripts/snake_part.gd index df2dc44..cdc4053 100644 --- a/Scripts/snake_part.gd +++ b/Scripts/snake_part.gd @@ -54,7 +54,7 @@ var image_tail : CompressedTexture2D = preload("res://Sprites/snake_tail.png") var next_part : SnakePart = null var commanding_head : SnakePart = null var skip_next_move_propagation : bool = false -var queued_growth : int = 999 +var queued_growth : int = 0 signal on_movement(new_dir, prevent_move) signal on_death @@ -74,8 +74,8 @@ func _ready() -> void: var y_bounds : Vector2 = level.position.y * Vector2.ONE + Vector2(-TILE_SIZE, TILE_SIZE) * level.scale.y / 2 # Determine the possible x and y coordinates - possible_x = range(x_bounds.x, x_bounds.y, TILE_SIZE) - possible_y = range(y_bounds.x, y_bounds.y, TILE_SIZE) + possible_x = range(x_bounds.x, x_bounds.y + 20, TILE_SIZE) + possible_y = range(y_bounds.x, y_bounds.y + 20, TILE_SIZE) # Attach clock var timer : Node = get_tree().get_first_node_in_group("GameClock") diff --git a/Sprites/background.kra b/Sprites/background.kra new file mode 100644 index 0000000..6063fa5 Binary files /dev/null and b/Sprites/background.kra differ diff --git a/Sprites/background.kra~ b/Sprites/background.kra~ new file mode 100644 index 0000000..6e48f17 Binary files /dev/null and b/Sprites/background.kra~ differ diff --git a/Sprites/background.png b/Sprites/background.png new file mode 100644 index 0000000..2bae79e Binary files /dev/null and b/Sprites/background.png differ diff --git a/Sprites/background.png.import b/Sprites/background.png.import new file mode 100644 index 0000000..d6a5472 --- /dev/null +++ b/Sprites/background.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dxdtqv4do4x31" +path="res://.godot/imported/background.png-4fa92766cad903a1a79b587b09bd47c5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/background.png" +dest_files=["res://.godot/imported/background.png-4fa92766cad903a1a79b587b09bd47c5.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/ouroboros.kra b/Sprites/ouroboros.kra new file mode 100644 index 0000000..6dad06f Binary files /dev/null and b/Sprites/ouroboros.kra differ diff --git a/Sprites/ouroboros.png b/Sprites/ouroboros.png new file mode 100644 index 0000000..9a9c1da Binary files /dev/null and b/Sprites/ouroboros.png differ diff --git a/Sprites/ouroboros.png.import b/Sprites/ouroboros.png.import new file mode 100644 index 0000000..673df98 --- /dev/null +++ b/Sprites/ouroboros.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c6kno4vjbvu28" +path="res://.godot/imported/ouroboros.png-da3a5483a878ddf056c771fe7aa64ca9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/ouroboros.png" +dest_files=["res://.godot/imported/ouroboros.png-da3a5483a878ddf056c771fe7aa64ca9.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/project.godot b/project.godot index 63134d2..fa73e90 100644 --- a/project.godot +++ b/project.godot @@ -61,3 +61,4 @@ up={ renderer/rendering_method="gl_compatibility" renderer/rendering_method.mobile="gl_compatibility" +2d/snap/snap_2d_transforms_to_pixel=true