This commit is contained in:
Layla 2023-10-18 15:26:27 -04:00
parent 5dac6ced93
commit 0fa604298f
12 changed files with 114 additions and 79 deletions

View File

@ -3,10 +3,7 @@
[ext_resource type="FontFile" uid="uid://d04y8053bm382" path="res://assets/fonts/pixelmix/pixelmix.ttf" id="1"] [ext_resource type="FontFile" uid="uid://d04y8053bm382" path="res://assets/fonts/pixelmix/pixelmix.ttf" id="1"]
[sub_resource type="FontFile" id="5"] [sub_resource type="FontFile" id="5"]
fallbacks = [ExtResource("1")] fallbacks = Array[Font]([ExtResource("1")])
face_index = null
embolden = null
transform = null
cache/0/16/0/ascent = 0.0 cache/0/16/0/ascent = 0.0
cache/0/16/0/descent = 0.0 cache/0/16/0/descent = 0.0
cache/0/16/0/underline_position = 0.0 cache/0/16/0/underline_position = 0.0

View File

@ -50,8 +50,7 @@ script = ExtResource("2_hefj0")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="CharacterBody2D"] [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="CharacterBody2D"]
texture_filter = 1 texture_filter = 1
frames = SubResource("2") sprite_frames = SubResource("2")
playing = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"] [node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
scale = Vector2(0.35, 0.45) scale = Vector2(0.35, 0.45)

View File

@ -10,34 +10,6 @@
radius = 32.0 radius = 32.0
height = 96.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"] [sub_resource type="Animation" id="Animation_toqbl"]
length = 0.001 length = 0.001
tracks/0/type = "value" tracks/0/type = "value"
@ -105,6 +77,35 @@ tracks/2/keys = {
}], }],
"times": PackedFloat32Array(0.3) "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"] [sub_resource type="Animation" id="Animation_qbfwu"]
resource_name = "sheathed" resource_name = "sheathed"
@ -162,7 +163,6 @@ scale = Vector2(0.5, 0.5)
shape = SubResource("2") shape = SubResource("2")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
playback_speed = 2.0
libraries = { libraries = {
"": SubResource("AnimationLibrary_77vfc") "": SubResource("AnimationLibrary_77vfc")
} }

View File

@ -17,6 +17,21 @@
radius = 4.0 radius = 4.0
height = 15.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"] [sub_resource type="Animation" id="Animation_ofhi2"]
resource_name = "idle" resource_name = "idle"
loop_mode = 1 loop_mode = 1
@ -33,8 +48,9 @@ tracks/0/keys = {
"values": [ExtResource("3_ysyyu"), ExtResource("4_585xo")] "values": [ExtResource("3_ysyyu"), ExtResource("4_585xo")]
} }
[sub_resource type="Animation" id="Animation_jp12d"] [sub_resource type="Animation" id="Animation_7msof"]
length = 0.001 resource_name = "jump"
length = 0.1
tracks/0/type = "value" tracks/0/type = "value"
tracks/0/imported = false tracks/0/imported = false
tracks/0/enabled = true tracks/0/enabled = true
@ -45,7 +61,7 @@ tracks/0/keys = {
"times": PackedFloat32Array(0), "times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1),
"update": 1, "update": 1,
"values": [ExtResource("3_ysyyu")] "values": [ExtResource("5_6hboq")]
} }
[sub_resource type="Animation" id="Animation_pjs8v"] [sub_resource type="Animation" id="Animation_pjs8v"]
@ -65,22 +81,6 @@ tracks/0/keys = {
"values": [ExtResource("6_k4y2d"), ExtResource("7_4r16g"), ExtResource("8_whu83")] "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"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_6ihh4"]
_data = { _data = {
"RESET": SubResource("Animation_jp12d"), "RESET": SubResource("Animation_jp12d"),
@ -100,7 +100,6 @@ equipment_dir = "res://nodes/equipment"
equipment_node = NodePath("Equipment") equipment_node = NodePath("Equipment")
[node name="Camera2D" type="Camera2D" parent="."] [node name="Camera2D" type="Camera2D" parent="."]
current = true
zoom = Vector2(2, 2) zoom = Vector2(2, 2)
[node name="Sprite2D" type="Sprite2D" parent="."] [node name="Sprite2D" type="Sprite2D" parent="."]

View File

@ -12,7 +12,7 @@ config_version=5
config/name="Glitch in the System" config/name="Glitch in the System"
run/main_scene="res://scenes/intro.tscn" run/main_scene="res://scenes/intro.tscn"
config/features=PackedStringArray("4.0") config/features=PackedStringArray("4.1")
boot_splash/image="res://wallpaper.png" boot_splash/image="res://wallpaper.png"
config/icon="res://assets/art/player_saber_icon.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/mode="2d"
window/stretch/aspect="keep_width" window/stretch/aspect="keep_width"
[editor]
export/convert_text_resources_to_binary=true
[input] [input]
ui_accept={ ui_accept={
@ -82,53 +78,53 @@ ui_end={
} }
move_left={ move_left={
"deadzone": 0.5, "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) "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,"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={ move_right={
"deadzone": 0.5, "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) "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,"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={ jump={
"deadzone": 0.5, "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) "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,"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,"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={ move_down={
"deadzone": 0.5, "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) "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,"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={ attack={
"deadzone": 0.5, "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) "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,"pressed":false,"double_click":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={ sheath={
"deadzone": 0.5, "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={ equip_slot_1={
"deadzone": 0.5, "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={ equip_slot_2={
"deadzone": 0.5, "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={ equip_slot_3={
"deadzone": 0.5, "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)
] ]
} }

View File

@ -14,7 +14,7 @@ script/source = "extends Node2D
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
$Player/Camera2D.current = true $Player/Camera2D.make_current()
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta): #func _process(delta):

View File

@ -82,7 +82,6 @@ format = 2
[node name="Camera2D" type="Camera2D" parent="."] [node name="Camera2D" type="Camera2D" parent="."]
scale = Vector2(10, 10) scale = Vector2(10, 10)
current = true
script = ExtResource("4_3v8j0") script = ExtResource("4_3v8j0")
[node name="CanvasModulate" type="CanvasModulate" parent="."] [node name="CanvasModulate" type="CanvasModulate" parent="."]

View File

@ -3,7 +3,7 @@
[ext_resource type="Theme" uid="uid://x4at2pluavto" path="res://general_theme.tres" id="1"] [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="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="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://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://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"] [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") theme = ExtResource("1")
script = ExtResource("2_o32of") script = ExtResource("2_o32of")
music = ExtResource("3_otmaj") music = ExtResource("3_otmaj")
new_game_scene = ExtResource("4_3155t") new_game_scene = ExtResource("4_f5imb")
[node name="ColorRect" type="ColorRect" parent="."] [node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 0 layout_mode = 0

18
scenes/v2/world.tscn Normal file
View File

@ -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

10
scripts/v2/world.gd Normal file
View File

@ -0,0 +1,10 @@
extends Node
@export
var generator: WorldGenerator
@export
var map: TileMap
func _ready() -> void:
self.generator.generate(map)

View File

@ -0,0 +1,8 @@
class_name StandardWorldGenerator
extends WorldGenerator
@export
var parts: Array[PackedScene] = []
func _generate(map: TileMap) -> void:
pass

View File

@ -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)