Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/basic run tree #2

Merged
merged 8 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ data_*/
mono_crash.*.json

# Mac-specific ignores
.DS_Store
.DS_Store

# Repomix-specific ignores
repomix-output.txt
7 changes: 7 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ config/features=PackedStringArray("4.3", "GL Compatibility")

ConfigManager="*res://scripts/managers/config_manager.gd"
GameState="*res://scripts/autoload/game_state.gd"
AdventureSystem="*res://scripts/systems/adventure_system.gd"
BackgroundSystem="*res://scripts/systems/background_system.gd"
CutsceneSystem="*res://scripts/systems/cutscene_system.gd"

[display]

Expand All @@ -39,6 +42,10 @@ enabled=PackedStringArray()
config/itch_username=""
config/itch_project_name=""

[global_group]

encounter_nodes="All currently present encounter nodes"

[maaacks_options_menus]

disable_plugin_dialogues=true
Expand Down
15 changes: 15 additions & 0 deletions resources/adventures/ingame_tutorial/0_combat.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[gd_resource type="Resource" script_class="CombatEncounterNodeData" load_steps=7 format=3 uid="uid://dsohl2qco44tx"]

[ext_resource type="Texture2D" uid="uid://dxq4fe4rkpgs6" path="res://assets/backgrounds/combat_bg.png" id="1_msf4q"]
[ext_resource type="Script" path="res://scripts/data/encounter_node_data.gd" id="1_w06wc"]
[ext_resource type="Script" path="res://scripts/data/enemy_data.gd" id="2_7oxnr"]
[ext_resource type="Resource" uid="uid://b61wo0msir67x" path="res://resources/adventures/ingame_tutorial/1_combat.tres" id="2_lvvpg"]
[ext_resource type="Script" path="res://scripts/data/combat_encounter_node_data.gd" id="3_1bpls"]
[ext_resource type="Resource" uid="uid://bjkxuf2s1608i" path="res://resources/enemies/cultist.tres" id="4_sukwl"]

[resource]
script = ExtResource("3_1bpls")
enemies = Array[ExtResource("2_7oxnr")]([ExtResource("4_sukwl")])
childNodes = Array[ExtResource("1_w06wc")]([ExtResource("2_lvvpg")])
completed = false
background = ExtResource("1_msf4q")
14 changes: 14 additions & 0 deletions resources/adventures/ingame_tutorial/1_combat.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[gd_resource type="Resource" script_class="CombatEncounterNodeData" load_steps=7 format=3 uid="uid://b61wo0msir67x"]

[ext_resource type="Script" path="res://scripts/data/encounter_node_data.gd" id="1_q1hg8"]
[ext_resource type="Resource" uid="uid://hixs5ub5k4we" path="res://resources/adventures/ingame_tutorial/2a_combat.tres" id="2_km8iu"]
[ext_resource type="Script" path="res://scripts/data/enemy_data.gd" id="2_t0t55"]
[ext_resource type="Script" path="res://scripts/data/combat_encounter_node_data.gd" id="3_s4ptf"]
[ext_resource type="Resource" uid="uid://cxl62hprsbcw1" path="res://resources/adventures/ingame_tutorial/2b_event.tres" id="3_yhy31"]
[ext_resource type="Resource" uid="uid://bjkxuf2s1608i" path="res://resources/enemies/cultist.tres" id="5_ad11l"]

[resource]
script = ExtResource("3_s4ptf")
enemies = Array[ExtResource("2_t0t55")]([ExtResource("5_ad11l"), ExtResource("5_ad11l")])
childNodes = Array[ExtResource("1_q1hg8")]([ExtResource("2_km8iu"), ExtResource("3_yhy31")])
completed = false
13 changes: 13 additions & 0 deletions resources/adventures/ingame_tutorial/2a_combat.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[gd_resource type="Resource" script_class="CombatEncounterNodeData" load_steps=6 format=3 uid="uid://hixs5ub5k4we"]

[ext_resource type="Script" path="res://scripts/data/encounter_node_data.gd" id="1_eejxk"]
[ext_resource type="Script" path="res://scripts/data/enemy_data.gd" id="2_dr5jw"]
[ext_resource type="Resource" uid="uid://xpw7xp6klhla" path="res://resources/adventures/ingame_tutorial/3_combat.tres" id="2_fxa05"]
[ext_resource type="Script" path="res://scripts/data/combat_encounter_node_data.gd" id="3_qyrbs"]
[ext_resource type="Resource" uid="uid://bjkxuf2s1608i" path="res://resources/enemies/cultist.tres" id="4_cwl26"]

[resource]
script = ExtResource("3_qyrbs")
enemies = Array[ExtResource("2_dr5jw")]([ExtResource("4_cwl26"), ExtResource("4_cwl26"), ExtResource("4_cwl26")])
childNodes = Array[ExtResource("1_eejxk")]([ExtResource("2_fxa05")])
completed = false
10 changes: 10 additions & 0 deletions resources/adventures/ingame_tutorial/2b_event.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="EventEncounterNodeData" load_steps=4 format=3 uid="uid://cxl62hprsbcw1"]

[ext_resource type="Script" path="res://scripts/data/encounter_node_data.gd" id="1_xxh5h"]
[ext_resource type="Script" path="res://scripts/data/event_encounter_node_data.gd" id="2_811ok"]
[ext_resource type="Resource" uid="uid://xpw7xp6klhla" path="res://resources/adventures/ingame_tutorial/3_combat.tres" id="2_n5lnf"]

[resource]
script = ExtResource("2_811ok")
childNodes = Array[ExtResource("1_xxh5h")]([ExtResource("2_n5lnf")])
completed = false
13 changes: 13 additions & 0 deletions resources/adventures/ingame_tutorial/3_combat.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[gd_resource type="Resource" script_class="CombatEncounterNodeData" load_steps=6 format=3 uid="uid://xpw7xp6klhla"]

[ext_resource type="Script" path="res://scripts/data/encounter_node_data.gd" id="1_o4v54"]
[ext_resource type="Script" path="res://scripts/data/enemy_data.gd" id="2_y3pue"]
[ext_resource type="Resource" uid="uid://h7ww7yma5ddj" path="res://resources/adventures/ingame_tutorial/finish.tres" id="2_yb1tn"]
[ext_resource type="Script" path="res://scripts/data/combat_encounter_node_data.gd" id="3_kx66a"]
[ext_resource type="Resource" uid="uid://bjkxuf2s1608i" path="res://resources/enemies/cultist.tres" id="4_hhtf0"]

[resource]
script = ExtResource("3_kx66a")
enemies = Array[ExtResource("2_y3pue")]([ExtResource("4_hhtf0"), ExtResource("4_hhtf0"), ExtResource("4_hhtf0"), ExtResource("4_hhtf0")])
childNodes = Array[ExtResource("1_o4v54")]([ExtResource("2_yb1tn")])
completed = false
9 changes: 9 additions & 0 deletions resources/adventures/ingame_tutorial/adventure_map.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="AdventureMapData" load_steps=3 format=3 uid="uid://cq1h50d6agd3j"]

[ext_resource type="Resource" uid="uid://cldmpsek0wxvd" path="res://resources/adventures/ingame_tutorial/start.tres" id="1_l4584"]
[ext_resource type="Script" path="res://scripts/data/adventure_map_data.gd" id="2_ic3nw"]

[resource]
script = ExtResource("2_ic3nw")
rootEncounterNode = ExtResource("1_l4584")
auto_start = true
9 changes: 9 additions & 0 deletions resources/adventures/ingame_tutorial/finish.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="FinishEncounterNodeData" load_steps=3 format=3 uid="uid://h7ww7yma5ddj"]

[ext_resource type="Script" path="res://scripts/data/encounter_node_data.gd" id="1_h5xn1"]
[ext_resource type="Script" path="res://scripts/data/finish_encounter_node_data.gd" id="2_isi6o"]

[resource]
script = ExtResource("2_isi6o")
childNodes = Array[ExtResource("1_h5xn1")]([])
completed = false
10 changes: 10 additions & 0 deletions resources/adventures/ingame_tutorial/start.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="StartEncounterNodeData" load_steps=4 format=3 uid="uid://cldmpsek0wxvd"]

[ext_resource type="Script" path="res://scripts/data/encounter_node_data.gd" id="1_72qi4"]
[ext_resource type="Script" path="res://scripts/data/start_encounter_node_data.gd" id="2_r3cwx"]
[ext_resource type="Resource" uid="uid://dsohl2qco44tx" path="res://resources/adventures/ingame_tutorial/0_combat.tres" id="2_y55f8"]

[resource]
script = ExtResource("2_r3cwx")
childNodes = Array[ExtResource("1_72qi4")]([ExtResource("2_y55f8")])
completed = true
10 changes: 10 additions & 0 deletions resources/enemies/cultist.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="EnemyData" load_steps=3 format=3 uid="uid://bjkxuf2s1608i"]

[ext_resource type="Script" path="res://scripts/data/enemy_data.gd" id="1_g2v6o"]
[ext_resource type="PackedScene" uid="uid://cbtac01eivwim" path="res://scenes/enemies/cultist.tscn" id="1_uchoq"]

[resource]
script = ExtResource("1_g2v6o")
enemy_scene = ExtResource("1_uchoq")
health = 10
abilities = []
33 changes: 33 additions & 0 deletions scenes/adventure_map.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[gd_scene load_steps=2 format=3 uid="uid://b7vx0syoj8olw"]

[ext_resource type="Script" path="res://scripts/managers/adventure_manager.gd" id="1_ryxis"]

[node name="AdventureMap" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3

[node name="ScrollContainer" type="ScrollContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
horizontal_scroll_mode = 2
vertical_scroll_mode = 0

[node name="AdventureStages" type="HBoxContainer" parent="ScrollContainer"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hebben nu sidescrolling voor de adventuremap, maar lijkt me ook leuk als we naar 'onder' gaan.
Aangezien we in een grot zitten (ik baseer me nu op de intro)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice one, tis inderdaad side-scrolling en ik voel mij even niet geroepen om die graph al aan te passen, misschien moeten we dit registreren als enhancement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was ook als suggestion voor later 👍

layout_mode = 2
size_flags_vertical = 3

[node name="LinesContainer" type="Node2D" parent="ScrollContainer"]
z_index = -1

[node name="AdventureManager" type="Node" parent="."]
script = ExtResource("1_ryxis")
60 changes: 18 additions & 42 deletions scenes/combat.tscn
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
[gd_scene load_steps=11 format=3 uid="uid://c8frb1w88o0u0"]
[gd_scene load_steps=7 format=3 uid="uid://b3l57gnlln63g"]

[ext_resource type="Script" path="res://scripts/scenes/combat.gd" id="1_n5yyl"]
[ext_resource type="Script" path="res://scripts/managers/combat_manager.gd" id="2_305ab"]
[ext_resource type="Script" path="res://scripts/managers/hand_manager.gd" id="3_bdk6y"]
[ext_resource type="Script" path="res://scripts/managers/decoder_manager.gd" id="4_vgm5a"]
[ext_resource type="Script" path="res://scripts/managers/pause_manager.gd" id="5_pl43j"]
[ext_resource type="Script" path="res://scripts/systems/background_system.gd" id="6_l1wfx"]
[ext_resource type="Script" path="res://scripts/player.gd" id="7_dwwk6"]
[ext_resource type="Script" path="res://scripts/enemy.gd" id="8_grmhu"]
[ext_resource type="PackedScene" uid="uid://duyk27ghemr8s" path="res://scenes/decode_ui.tscn" id="9_1iax2"]
[ext_resource type="Texture2D" uid="uid://dyx76tn885md3" path="res://assets/ui/energy_orb.png" id="9_e0ys4"]

[node name="Combat" type="Node2D"]
Expand All @@ -20,14 +16,26 @@ script = ExtResource("2_305ab")
[node name="HandManager" type="Node" parent="."]
script = ExtResource("3_bdk6y")

[node name="DecoderManager" type="Node" parent="."]
script = ExtResource("4_vgm5a")

[node name="PauseManager" type="Node" parent="."]
script = ExtResource("5_pl43j")

[node name="BackgroundSystem" type="Node" parent="."]
script = ExtResource("6_l1wfx")
[node name="Player" type="Node2D" parent="."]
position = Vector2(300, 420)
script = ExtResource("7_dwwk6")

[node name="Visual" type="ColorRect" parent="Player"]
offset_right = 100.0
offset_bottom = 100.0
color = Color(0, 1, 0, 1)

[node name="HealthLabel" type="Label" parent="Player"]
offset_right = 40.0
offset_bottom = 23.0
theme_override_font_sizes/font_size = 70
text = "40/40"

[node name="EnemiesContainer" type="Node2D" parent="."]
position = Vector2(1200, 420)

[node name="UI" type="CanvasLayer" parent="."]

Expand Down Expand Up @@ -105,35 +113,3 @@ theme_override_font_sizes/font_size = 140
text = "3"
horizontal_alignment = 1
vertical_alignment = 1

[node name="DecodeUI" parent="UI" instance=ExtResource("9_1iax2")]

[node name="Player" type="Node2D" parent="."]
position = Vector2(300, 300)
script = ExtResource("7_dwwk6")

[node name="Visual" type="ColorRect" parent="Player"]
offset_right = 100.0
offset_bottom = 100.0
color = Color(0, 1, 0, 1)

[node name="HealthLabel" type="Label" parent="Player"]
offset_right = 40.0
offset_bottom = 23.0
theme_override_font_sizes/font_size = 70
text = "40/40"

[node name="Enemy" type="Node2D" parent="."]
position = Vector2(700, 300)
script = ExtResource("8_grmhu")

[node name="Visual" type="ColorRect" parent="Enemy"]
offset_right = 100.0
offset_bottom = 100.0
color = Color(1, 0, 0, 1)

[node name="HealthLabel" type="Label" parent="Enemy"]
offset_right = 40.0
offset_bottom = 23.0
theme_override_font_sizes/font_size = 70
text = "30/30"
38 changes: 38 additions & 0 deletions scenes/encounter_node.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[gd_scene load_steps=3 format=3 uid="uid://cidwq7l0x54g7"]

[ext_resource type="Script" path="res://scripts/scenes/encounter_node.gd" id="1_6g2l7"]
[ext_resource type="Script" path="res://scripts/utils/circle.gd" id="2_kg7rm"]

[node name="EncounterNode" type="Control" groups=["encounter_nodes"]]
custom_minimum_size = Vector2(100, 100)
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_6g2l7")

[node name="CenterContainer" type="CenterContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
layout_mode = 2
theme_override_constants/separation = 8
alignment = 1

[node name="Circle" type="ColorRect" parent="CenterContainer/VBoxContainer"]
custom_minimum_size = Vector2(40, 40)
layout_mode = 2
script = ExtResource("2_kg7rm")

[node name="Label" type="Label" parent="CenterContainer/VBoxContainer"]
layout_mode = 2
text = "Encounter"
horizontal_alignment = 1
vertical_alignment = 1
16 changes: 16 additions & 0 deletions scenes/enemies/cultist.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[gd_scene load_steps=2 format=3 uid="uid://cbtac01eivwim"]

[ext_resource type="Script" path="res://scripts/enemy.gd" id="1_c11yq"]

[node name="Cultist" type="Node2D"]
script = ExtResource("1_c11yq")

[node name="ColorRect" type="ColorRect" parent="."]
custom_minimum_size = Vector2(100, 200)
offset_right = 40.0
offset_bottom = 40.0
color = Color(0.394879, 0.000106898, 0.394876, 1)

[node name="HealthLabel" type="Label" parent="."]
offset_right = 40.0
offset_bottom = 23.0
67 changes: 67 additions & 0 deletions scenes/home_base.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[gd_scene load_steps=3 format=3 uid="uid://bnk32gyp3bsir"]

[ext_resource type="Script" path="res://scripts/scenes/home_base.gd" id="1_07xob"]
[ext_resource type="Script" path="res://scripts/managers/pause_manager.gd" id="2_5cg8f"]

[node name="HomeBase" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_07xob")

[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="Label" type="Label" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 105
text = "Home base"
horizontal_alignment = 1

[node name="GridContainer" type="GridContainer" parent="VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme_override_constants/h_separation = 40
theme_override_constants/v_separation = 40
columns = 2

[node name="AdventureButton" type="Button" parent="VBoxContainer/GridContainer"]
custom_minimum_size = Vector2(400, 400)
layout_mode = 2
theme_override_font_sizes/font_size = 87
text = "Go on an adventure"

[node name="DecoderButton" type="Button" parent="VBoxContainer/GridContainer"]
custom_minimum_size = Vector2(400, 400)
layout_mode = 2
theme_override_font_sizes/font_size = 87
text = "Decode cards"

[node name="StoneButton" type="Button" parent="VBoxContainer/GridContainer"]
custom_minimum_size = Vector2(400, 400)
layout_mode = 2
theme_override_font_sizes/font_size = 87
text = "Magical stone"

[node name="LoadoutButton" type="Button" parent="VBoxContainer/GridContainer"]
custom_minimum_size = Vector2(400, 400)
layout_mode = 2
theme_override_font_sizes/font_size = 87
text = "Deck and inventory"

[node name="PauseManager" type="Node" parent="."]
script = ExtResource("2_5cg8f")

[connection signal="pressed" from="VBoxContainer/GridContainer/AdventureButton" to="." method="_on_adventure_button_pressed"]
[connection signal="pressed" from="VBoxContainer/GridContainer/DecoderButton" to="." method="_on_decoder_button_pressed"]
[connection signal="pressed" from="VBoxContainer/GridContainer/StoneButton" to="." method="_on_stone_button_pressed"]
[connection signal="pressed" from="VBoxContainer/GridContainer/LoadoutButton" to="." method="_on_loadout_button_pressed"]
Loading