diff --git a/general_theme.tres b/general_theme.tres index 5f955ab..5f8b61b 100644 --- a/general_theme.tres +++ b/general_theme.tres @@ -3,10 +3,7 @@ [ext_resource type="FontFile" uid="uid://d04y8053bm382" path="res://assets/fonts/pixelmix/pixelmix.ttf" id="1"] [sub_resource type="FontFile" id="5"] -fallbacks = [ExtResource("1")] -face_index = null -embolden = null -transform = null +fallbacks = Array[Font]([ExtResource("1")]) cache/0/16/0/ascent = 0.0 cache/0/16/0/descent = 0.0 cache/0/16/0/underline_position = 0.0 diff --git a/nodes/Enemies/basic_enemy.tscn b/nodes/Enemies/basic_enemy.tscn index 17d36f2..ca7baf6 100644 --- a/nodes/Enemies/basic_enemy.tscn +++ b/nodes/Enemies/basic_enemy.tscn @@ -50,8 +50,7 @@ script = ExtResource("2_hefj0") [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="CharacterBody2D"] texture_filter = 1 -frames = SubResource("2") -playing = true +sprite_frames = SubResource("2") [node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"] scale = Vector2(0.35, 0.45) diff --git a/nodes/equipment/saber.tscn b/nodes/equipment/saber.tscn index 65d4801..95d1033 100644 --- a/nodes/equipment/saber.tscn +++ b/nodes/equipment/saber.tscn @@ -10,34 +10,6 @@ radius = 32.0 height = 96.0 -[sub_resource type="Animation" id="Animation_dbnl7"] -resource_name = "idle" -length = 0.1 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [0] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Sprite2D/Area2D:monitoring") -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_toqbl"] length = 0.001 tracks/0/type = "value" @@ -105,6 +77,35 @@ tracks/2/keys = { }], "times": PackedFloat32Array(0.3) } +tracks/2/use_blend = true + +[sub_resource type="Animation" id="Animation_dbnl7"] +resource_name = "idle" +length = 0.1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Sprite2D/Area2D:monitoring") +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_qbfwu"] resource_name = "sheathed" @@ -162,7 +163,6 @@ scale = Vector2(0.5, 0.5) shape = SubResource("2") [node name="AnimationPlayer" type="AnimationPlayer" parent="."] -playback_speed = 2.0 libraries = { "": SubResource("AnimationLibrary_77vfc") } diff --git a/nodes/player.tscn b/nodes/player.tscn index 37379e0..c90d514 100644 --- a/nodes/player.tscn +++ b/nodes/player.tscn @@ -17,6 +17,21 @@ radius = 4.0 height = 15.0 +[sub_resource type="Animation" id="Animation_jp12d"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [ExtResource("3_ysyyu")] +} + [sub_resource type="Animation" id="Animation_ofhi2"] resource_name = "idle" loop_mode = 1 @@ -33,8 +48,9 @@ tracks/0/keys = { "values": [ExtResource("3_ysyyu"), ExtResource("4_585xo")] } -[sub_resource type="Animation" id="Animation_jp12d"] -length = 0.001 +[sub_resource type="Animation" id="Animation_7msof"] +resource_name = "jump" +length = 0.1 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -45,7 +61,7 @@ tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [ExtResource("3_ysyyu")] +"values": [ExtResource("5_6hboq")] } [sub_resource type="Animation" id="Animation_pjs8v"] @@ -65,22 +81,6 @@ tracks/0/keys = { "values": [ExtResource("6_k4y2d"), ExtResource("7_4r16g"), ExtResource("8_whu83")] } -[sub_resource type="Animation" id="Animation_7msof"] -resource_name = "jump" -length = 0.1 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:texture") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [ExtResource("5_6hboq")] -} - [sub_resource type="AnimationLibrary" id="AnimationLibrary_6ihh4"] _data = { "RESET": SubResource("Animation_jp12d"), @@ -100,7 +100,6 @@ equipment_dir = "res://nodes/equipment" equipment_node = NodePath("Equipment") [node name="Camera2D" type="Camera2D" parent="."] -current = true zoom = Vector2(2, 2) [node name="Sprite2D" type="Sprite2D" parent="."] diff --git a/project.godot b/project.godot index 9f4612f..378d9fb 100644 --- a/project.godot +++ b/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="Glitch in the System" run/main_scene="res://scenes/intro.tscn" -config/features=PackedStringArray("4.0") +config/features=PackedStringArray("4.1") boot_splash/image="res://wallpaper.png" config/icon="res://assets/art/player_saber_icon.png" @@ -26,10 +26,6 @@ MusicPlayer="*res://nodes/MusicPlayer.tscn" window/stretch/mode="2d" window/stretch/aspect="keep_width" -[editor] - -export/convert_text_resources_to_binary=true - [input] ui_accept={ @@ -82,53 +78,53 @@ ui_end={ } move_left={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194319,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194319,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) ] } move_right={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194321,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194321,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) ] } jump={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":87,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194320,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":87,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194320,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) ] } move_down={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194322,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194322,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) ] } attack={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":90,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"pressed":false,"double_click":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":90,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null) ] } sheath={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194328,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194328,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) ] } equip_slot_1={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"key_label":0,"unicode":0,"echo":false,"script":null) ] } equip_slot_2={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"key_label":0,"unicode":0,"echo":false,"script":null) ] } equip_slot_3={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":51,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":51,"key_label":0,"unicode":0,"echo":false,"script":null) ] } diff --git a/scenes/dev/test_zone.tscn b/scenes/dev/test_zone.tscn index 6551b74..6c12e81 100644 --- a/scenes/dev/test_zone.tscn +++ b/scenes/dev/test_zone.tscn @@ -14,7 +14,7 @@ script/source = "extends Node2D # Called when the node enters the scene tree for the first time. func _ready(): - $Player/Camera2D.current = true + $Player/Camera2D.make_current() # Called every frame. 'delta' is the elapsed time since the previous frame. #func _process(delta): diff --git a/scenes/game.tscn b/scenes/game.tscn index f5994f8..b3f0b5a 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -82,7 +82,6 @@ format = 2 [node name="Camera2D" type="Camera2D" parent="."] scale = Vector2(10, 10) -current = true script = ExtResource("4_3v8j0") [node name="CanvasModulate" type="CanvasModulate" parent="."] diff --git a/scenes/title_screen.tscn b/scenes/title_screen.tscn index 9a641fa..753b20f 100644 --- a/scenes/title_screen.tscn +++ b/scenes/title_screen.tscn @@ -3,7 +3,7 @@ [ext_resource type="Theme" uid="uid://x4at2pluavto" path="res://general_theme.tres" id="1"] [ext_resource type="Script" path="res://scripts/title_screen.gd" id="2_o32of"] [ext_resource type="AudioStream" uid="uid://dyywryu8rhlhx" path="res://assets/music/dos-88/race_to_mars.ogg" id="3_otmaj"] -[ext_resource type="PackedScene" uid="uid://lvot4p62fxa8" path="res://scenes/game.tscn" id="4_3155t"] +[ext_resource type="PackedScene" uid="uid://c7cvc4y0kpl3g" path="res://scenes/v2/world.tscn" id="4_f5imb"] [ext_resource type="Texture2D" uid="uid://d08p0mamsxnvh" path="res://assets/art/general_bkg.png" id="5_y6rms"] [ext_resource type="Texture2D" uid="uid://b5q202ja5gj34" path="res://assets/art/Grid/agrid1.png" id="6_xwd2a"] [ext_resource type="Texture2D" uid="uid://duebi3omvs87x" path="res://assets/art/Grid/agrid2.png" id="7_qnlu0"] @@ -43,7 +43,7 @@ grow_vertical = 2 theme = ExtResource("1") script = ExtResource("2_o32of") music = ExtResource("3_otmaj") -new_game_scene = ExtResource("4_3155t") +new_game_scene = ExtResource("4_f5imb") [node name="ColorRect" type="ColorRect" parent="."] layout_mode = 0 diff --git a/scenes/v2/world.tscn b/scenes/v2/world.tscn new file mode 100644 index 0000000..dc01049 --- /dev/null +++ b/scenes/v2/world.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=5 format=3 uid="uid://c7cvc4y0kpl3g"] + +[ext_resource type="Script" path="res://scripts/v2/world.gd" id="1_cgytt"] +[ext_resource type="Script" path="res://scripts/v2/worldgen/standard_generator.gd" id="2_3jlht"] +[ext_resource type="TileSet" uid="uid://cluemfplimly4" path="res://assets/tiles.tres" id="3_5mj08"] + +[sub_resource type="Resource" id="Resource_kbdfk"] +script = ExtResource("2_3jlht") +parts = Array[PackedScene]([]) + +[node name="World" type="Node2D" node_paths=PackedStringArray("map")] +script = ExtResource("1_cgytt") +generator = SubResource("Resource_kbdfk") +map = NodePath("TileMap") + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource("3_5mj08") +format = 2 diff --git a/scripts/v2/world.gd b/scripts/v2/world.gd new file mode 100644 index 0000000..ae51c30 --- /dev/null +++ b/scripts/v2/world.gd @@ -0,0 +1,10 @@ +extends Node + +@export +var generator: WorldGenerator + +@export +var map: TileMap + +func _ready() -> void: + self.generator.generate(map) diff --git a/scripts/v2/worldgen/standard_generator.gd b/scripts/v2/worldgen/standard_generator.gd new file mode 100644 index 0000000..e30d874 --- /dev/null +++ b/scripts/v2/worldgen/standard_generator.gd @@ -0,0 +1,8 @@ +class_name StandardWorldGenerator +extends WorldGenerator + +@export +var parts: Array[PackedScene] = [] + +func _generate(map: TileMap) -> void: + pass diff --git a/scripts/v2/worldgen/world_generator.gd b/scripts/v2/worldgen/world_generator.gd new file mode 100644 index 0000000..ec1136a --- /dev/null +++ b/scripts/v2/worldgen/world_generator.gd @@ -0,0 +1,9 @@ +class_name WorldGenerator +extends Resource + +func generate(map: TileMap) -> void: + if self.has_method("_generate"): + push_error("Generator missing `_generate` method") + return + + self.call("_generate", map)