Compare commits

..

2 Commits

Author SHA1 Message Date
bog fbf2657995 DONT JUDGE ME 2024-04-14 17:43:40 +02:00
bog 838de303e4 🎉 a terrible game. 2024-04-13 16:20:07 +02:00
93 changed files with 2751 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.import
*~*
*\#*

2
src/.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

2
src/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# Godot 4+ specific ignores
.godot/

18
src/Data/action.gd Normal file
View File

@ -0,0 +1,18 @@
extends Node
class_name Action
var action_name: String
var damages: int
var rune = null
func _init(rune, action_name, damages=0):
self.rune = rune
self.action_name = action_name
self.damages = damages
func _ready():
pass
func _process(delta):
pass

100
src/Data/actor.gd Normal file
View File

@ -0,0 +1,100 @@
extends Node
class_name Actor
var runes: Array = []
var actor_name: String
func _init(actor_name: String):
self.actor_name = actor_name
self.give_rune('hp')
self.give_rune('ap')
self.give_rune('atk')
self.give_rune('def')
self.give_rune('ini')
func execute_action():
var target_rune = null
for rune in self.runes:
if rune.state.ap > 0 and (target_rune == null or rune.state.ap > target_rune.state.ap):
target_rune = rune
if target_rune:
target_rune.state.ap -= 1
return true
return false
func hurt(damages):
var target_rune = null
for rune in self.runes:
if rune.state.hp > 0 and (target_rune == null or rune.state.hp > target_rune.state.hp):
target_rune = rune
if target_rune:
target_rune.state.hp -= damages
func give_rune(rune_name: String):
var lib = RuneLib.new()
var rune = lib.find(rune_name)
rune.actor = self
runes.push_back(rune)
func get_rune(slot_id: int):
if slot_id < self.runes.size():
return self.runes[slot_id]
return null
func get_rune_by_name(rune_name: String):
for rune in self.runes:
if rune.rune_name == rune_name:
return rune
return null
func get_rune_by_slot(slot: int):
for rune in self.runes:
if rune.slot == slot:
return rune
return null
func get_actor_name() -> String:
return self.actor_name
func get_hp() -> int:
var res = 0
for rune in self.runes:
if rune.has_slot():
res += rune.state.hp
return res
func get_ap() -> int:
var res = 0
for rune in self.runes:
if rune.has_slot():
res = max(res, rune.state.ap)
return max(1, res)
func get_atk() -> int:
var res = 0
for rune in self.runes:
if rune.has_slot():
res += rune.state.atk
return res
func get_def() -> int:
var res = 0
for rune in self.runes:
if rune.has_slot():
res += rune.state.def
return res
func get_ini() -> int:
var res = 0
for rune in self.runes:
if rune.has_slot():
res = max(res, rune.state.ini)
return res
func is_dead():
return self.get_hp() <= 0

20
src/Data/effect.gd Normal file
View File

@ -0,0 +1,20 @@
extends Node
class_name Effect
class Base:
var rune = null
func _init(_rune):
self.rune = _rune
func exec():
pass
class IncrAp:
extends Base
func _init(_rune):
super(_rune)
func exec():
self.rune.state.ap += 1

35
src/Data/rune.gd Normal file
View File

@ -0,0 +1,35 @@
extends Node
class_name Rune
var rune_name: String
var state: State
var slot: int
const NO_SLOT = -1
var actions: Array = []
var actor: Actor
var pre_fx = null
var post_fx = null
# TODO appli consume AP
func _init(actor, rune_name, state: State):
self.actor = actor
self.rune_name = rune_name
self.state = state
self.slot = NO_SLOT
self.pre_fx = Effect.Base.new(self)
self.post_fx = Effect.Base.new(self)
func set_slot(slot: int):
self.slot = slot
func has_slot() -> bool:
return self.slot != NO_SLOT
func add_action(action):
self.actions.push_back(action)
func has_action(action):
for a in self.actions:
if a == action:
return true
return false

25
src/Data/runelib.gd Normal file
View File

@ -0,0 +1,25 @@
extends Node
class_name RuneLib
var all_runes: Dictionary = {}
func _init():
var hp = add_rune('hp', State.new(100, 0, 0, 0, 0))
hp.add_action(Action.new(hp, 'Frappe I', 4))
hp.add_action(Action.new(hp, 'Frappe II', 40))
hp.add_action(Action.new(hp, 'Frappe III', 75))
var ap = add_rune('ap', State.new(0, 1, 0, 0, 0))
ap.pre_fx = Effect.IncrAp.new(ap)
add_rune('atk', State.new(0, 0, 2, 0, 0))
add_rune('def', State.new(0, 0, 0, 1, 0))
add_rune('ini', State.new(0, 0, 0, 0, 1))
func add_rune(rune_name: String, state: State):
self.all_runes[rune_name] = Rune.new(null, rune_name, state)
return self.all_runes[rune_name]
func find(rune_name: String) -> Rune:
assert(rune_name in self.all_runes.keys())
return self.all_runes[rune_name]

4
src/Data/slots.gd Normal file
View File

@ -0,0 +1,4 @@
extends Node
class_name Slots
var runes: Array = []

15
src/Data/state.gd Normal file
View File

@ -0,0 +1,15 @@
extends Node
class_name State
var hp: int
var ap: int
var atk: int
var def: int
var ini: int
func _init(_hp, _ap, _atk, _def, _ini):
self.hp = _hp
self.ap = _ap
self.atk = _atk
self.def = _def
self.ini = _ini

16
src/EnemyUI/enemy_ui.gd Normal file
View File

@ -0,0 +1,16 @@
extends Control
var actor: Actor
func _ready():
self.actor = Gactor.current_enemy
get_node('%RuneSlots').actor = self.actor
Gai.rune_slots = get_node('%RuneSlots')
func _process(delta):
get_node('%ActorName').text = str(self.actor.get_actor_name())
get_node('%HP').text = str(self.actor.get_hp())
get_node('%AP').text = str(self.actor.get_ap())
get_node('%ATK').text = str(self.actor.get_atk())
get_node('%DEF').text = str(self.actor.get_def())
get_node('%INI').text = str(self.actor.get_ini())

80
src/EnemyUI/enemy_ui.tscn Normal file
View File

@ -0,0 +1,80 @@
[gd_scene load_steps=3 format=3 uid="uid://bmug7u0mpwj7a"]
[ext_resource type="Script" path="res://EnemyUI/enemy_ui.gd" id="1_1sdxq"]
[ext_resource type="PackedScene" uid="uid://crngpd2jeu4sx" path="res://RuneSlots/rune_slots.tscn" id="2_le6ii"]
[node name="EnemyUI" type="Control"]
layout_mode = 3
anchor_left = 0.5
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_1sdxq")
[node name="Panel" type="Panel" 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="Panel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="ActorName" type="Label" parent="Panel/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="HUD" type="HBoxContainer" parent="Panel/VBoxContainer"]
layout_mode = 2
[node name="HP_LABEL" type="Label" parent="Panel/VBoxContainer/HUD"]
layout_mode = 2
text = "HP:"
[node name="HP" type="Label" parent="Panel/VBoxContainer/HUD"]
unique_name_in_owner = true
layout_mode = 2
[node name="AP_LABEL" type="Label" parent="Panel/VBoxContainer/HUD"]
layout_mode = 2
text = "AP:"
[node name="AP" type="Label" parent="Panel/VBoxContainer/HUD"]
unique_name_in_owner = true
layout_mode = 2
[node name="ATK_LABEL" type="Label" parent="Panel/VBoxContainer/HUD"]
layout_mode = 2
text = "ATK:"
[node name="ATK" type="Label" parent="Panel/VBoxContainer/HUD"]
unique_name_in_owner = true
layout_mode = 2
[node name="DEF_LABEL" type="Label" parent="Panel/VBoxContainer/HUD"]
layout_mode = 2
text = "DEF:"
[node name="DEF" type="Label" parent="Panel/VBoxContainer/HUD"]
unique_name_in_owner = true
layout_mode = 2
[node name="INI_LABEL" type="Label" parent="Panel/VBoxContainer/HUD"]
layout_mode = 2
text = "INI:"
[node name="INI" type="Label" parent="Panel/VBoxContainer/HUD"]
unique_name_in_owner = true
layout_mode = 2
[node name="RuneSlots" parent="Panel/VBoxContainer" instance=ExtResource("2_le6ii")]
unique_name_in_owner = true
layout_mode = 2

16
src/Global/gactor.gd Normal file
View File

@ -0,0 +1,16 @@
extends Node
var player: Actor
var current_enemy: Actor
func _ready():
self.player = Actor.new('Player')
self.current_enemy = Actor.new('Jason')
func _process(delta):
pass
func opponent(actor):
if actor == self.player:
return self.current_enemy
return self.player

44
src/Global/gai.gd Normal file
View File

@ -0,0 +1,44 @@
extends Node
var actor: Actor
var rune_slots
var timer = 0.0
var time = 2.0
func _process(delta):
if self.timer >= self.time:
if Gturn.current_turn == Gturn.TURN.AI:
if Gturn.current_phase == Gturn.PHASE.RUNES:
self.place_runes()
Gturn.next_phase()
elif Gturn.current_phase == Gturn.PHASE.ACTIONS:
self.select_actions()
Gturn.next_phase()
self.timer = 0.0
self.time = randf_range(2.0, 3.0)
self.timer += delta
func can_place_rune_in_slot(slot):
for rune in self.actor.runes:
if rune.slot == slot:
return false
return true
func place_runes():
randomize()
for rune in self.actor.runes:
if not rune.has_slot():
while true:
var i = floor(randf_range(0, 5))
if can_place_rune_in_slot(i):
self.rune_slots.select_rune(rune, i)
return
func select_actions():
for rune in self.actor.runes:
if rune.has_slot() and rune.actions.size() > 0:
var action = rune.actions[0]
Gturn.add_action(action)
return

73
src/Global/gturn.gd Normal file
View File

@ -0,0 +1,73 @@
extends Node
enum TURN {
PLAYER,
AI
}
enum PHASE {
RUNES,
ACTIONS,
RESOLUTION
}
var PHASE_NAMES = ['READY', 'ATTACK', 'RESOLUTION']
var current_turn = TURN.PLAYER
var current_phase = PHASE.RUNES
var current_actions = []
var phases = [PHASE.RUNES, PHASE.ACTIONS, PHASE.RESOLUTION]
var phase_idx = 0
func _ready():
pass
func _process(delta):
pass
func next_phase():
if self.current_phase == PHASE.RUNES and self.current_turn == TURN.PLAYER:
self.current_turn = TURN.AI
elif self.current_phase == PHASE.RUNES and self.current_turn == TURN.AI:
self.current_turn = TURN.PLAYER
self.current_phase = PHASE.ACTIONS
elif self.current_phase == PHASE.ACTIONS and self.current_turn == TURN.PLAYER:
self.current_turn = TURN.AI
elif self.current_phase == PHASE.ACTIONS and self.current_turn == TURN.AI:
self.turn_end()
self.current_turn = TURN.PLAYER
self.current_phase = PHASE.RUNES
self.resolve()
self.turn_start()
func add_action(action):
self.current_actions.push_back(action)
func rune_already_played(rune):
for action in self.current_actions:
if rune.has_action(action):
return true
return false
func compare_per_ini(lhs, rhs):
return lhs.rune.actor.get_ini() > rhs.rune.actor.get_ini()
func resolve():
self.current_actions.sort_custom(self.compare_per_ini)
for action in self.current_actions:
Gactor.opponent(action.rune.actor).hurt(action.damages)
self.current_actions = []
if Gactor.player.is_dead():
print('OPPONENT WON')
elif Gactor.current_enemy.is_dead():
print('PLAYER WON')
func turn_start():
for rune in Gactor.player.runes:
if rune.pre_fx != null:
rune.pre_fx.exec()
func turn_end():
pass

21
src/PlayerUI/player_ui.gd Normal file
View File

@ -0,0 +1,21 @@
extends Control
var actor: Actor
func _ready():
self.actor = Gactor.player
get_node('%RuneSlots').actor = self.actor
func _process(delta):
get_node('%ActorName').text = str(self.actor.get_actor_name())
get_node('%HP').text = str(self.actor.get_hp())
get_node('%AP').text = str(self.actor.get_ap())
get_node('%ATK').text = str(self.actor.get_atk())
get_node('%DEF').text = str(self.actor.get_def())
get_node('%INI').text = str(self.actor.get_ini())
get_node('%NextButton').visible = Gturn.current_phase != Gturn.PHASE.RESOLUTION \
and Gturn.current_turn == Gturn.TURN.PLAYER
get_node('%NextButton').text = Gturn.PHASE_NAMES[Gturn.current_phase]
func _on_next_button_pressed():
Gturn.next_phase()

View File

@ -0,0 +1,91 @@
[gd_scene load_steps=3 format=3 uid="uid://cscojpnoqu33p"]
[ext_resource type="Script" path="res://PlayerUI/player_ui.gd" id="1_dik5c"]
[ext_resource type="PackedScene" uid="uid://crngpd2jeu4sx" path="res://RuneSlots/rune_slots.tscn" id="2_6t500"]
[node name="PlayerUI" type="Control"]
layout_mode = 3
anchor_right = 0.5
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_dik5c")
[node name="ActorPanel" type="Panel" parent="."]
unique_name_in_owner = true
clip_contents = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="ActorLayout" type="VBoxContainer" parent="ActorPanel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 2
alignment = 1
[node name="ActorName" type="Label" parent="ActorPanel/ActorLayout"]
unique_name_in_owner = true
layout_mode = 2
[node name="HUD" type="HBoxContainer" parent="ActorPanel/ActorLayout"]
layout_mode = 2
size_flags_vertical = 0
[node name="HP_LABEL" type="Label" parent="ActorPanel/ActorLayout/HUD"]
layout_mode = 2
text = "HP:"
[node name="HP" type="Label" parent="ActorPanel/ActorLayout/HUD"]
unique_name_in_owner = true
layout_mode = 2
[node name="AP_LABEL" type="Label" parent="ActorPanel/ActorLayout/HUD"]
layout_mode = 2
text = "AP:"
[node name="AP" type="Label" parent="ActorPanel/ActorLayout/HUD"]
unique_name_in_owner = true
layout_mode = 2
[node name="ATK_LABEL" type="Label" parent="ActorPanel/ActorLayout/HUD"]
layout_mode = 2
text = "ATK:"
[node name="ATK" type="Label" parent="ActorPanel/ActorLayout/HUD"]
unique_name_in_owner = true
layout_mode = 2
[node name="DEF_LABEL" type="Label" parent="ActorPanel/ActorLayout/HUD"]
layout_mode = 2
text = "DEF:"
[node name="DEF" type="Label" parent="ActorPanel/ActorLayout/HUD"]
unique_name_in_owner = true
layout_mode = 2
[node name="INI_LABEL" type="Label" parent="ActorPanel/ActorLayout/HUD"]
layout_mode = 2
text = "INI:"
[node name="INI" type="Label" parent="ActorPanel/ActorLayout/HUD"]
unique_name_in_owner = true
layout_mode = 2
[node name="RuneSlots" parent="ActorPanel/ActorLayout" instance=ExtResource("2_6t500")]
unique_name_in_owner = true
layout_mode = 2
[node name="NextButton" type="Button" parent="ActorPanel/ActorLayout"]
unique_name_in_owner = true
layout_mode = 2
text = "NEXT"
[connection signal="pressed" from="ActorPanel/ActorLayout/NextButton" to="." method="_on_next_button_pressed"]

View File

@ -0,0 +1,25 @@
extends Control
var rune = null
# Called when the node enters the scene tree for the first time.
func _ready():
var items = get_node('%Items')
for action in self.rune.actions:
items.add_item(action.action_name)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_button_pressed():
var items = get_node('%Items')
for item in items.get_selected_items():
var action_name = items.get_item_text(item)
for action in self.rune.actions:
if action.action_name == action_name:
Gturn.add_action(action)
get_tree().paused = false
queue_free()

View File

@ -0,0 +1,44 @@
[gd_scene load_steps=2 format=3 uid="uid://y7flxg84p7e7"]
[ext_resource type="Script" path="res://RuneActions/rune_actions.gd" id="1_6vnp1"]
[node name="RuneActions" type="Control"]
process_mode = 2
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_6vnp1")
[node name="Panel" type="Panel" 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="Panel"]
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="Panel/VBoxContainer"]
layout_mode = 2
text = "ACTIONS"
[node name="Items" type="ItemList" parent="Panel/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
[node name="Button" type="Button" parent="Panel/VBoxContainer"]
layout_mode = 2
text = "SELECT"
[connection signal="pressed" from="Panel/VBoxContainer/Button" to="." method="_on_button_pressed"]

26
src/RuneList/rune_list.gd Normal file
View File

@ -0,0 +1,26 @@
extends Control
var actor: Actor = null
signal rune_selected
func _ready():
var items = get_node('%Items')
var runes = Gactor.player.runes
for rune in runes:
if not rune.has_slot():
items.add_item(rune.rune_name)
func _process(delta):
pass
func _on_button_pressed():
var items : ItemList = get_node('%Items')
var selected = items.get_selected_items()
for s in selected:
var item_name = items.get_item_text(s)
assert(self.actor)
var rune = self.actor.get_rune_by_name(item_name)
emit_signal("rune_selected", rune)
get_tree().paused = false
queue_free()

View File

@ -0,0 +1,52 @@
[gd_scene load_steps=2 format=3 uid="uid://bn0q76fi3711l"]
[ext_resource type="Script" path="res://RuneList/rune_list.gd" id="1_klufn"]
[node name="RuneList" type="Control"]
process_mode = 2
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_klufn")
[node name="Panel" type="Panel" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -176.0
offset_top = -195.0
offset_right = 176.0
offset_bottom = 195.0
grow_horizontal = 2
grow_vertical = 2
[node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
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="Panel/VBoxContainer"]
layout_mode = 2
text = "RUNES"
horizontal_alignment = 1
[node name="Items" type="ItemList" parent="Panel/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
auto_height = true
[node name="Button" type="Button" parent="Panel/VBoxContainer"]
layout_mode = 2
text = "TAKE"
[connection signal="pressed" from="Panel/VBoxContainer/Button" to="." method="_on_button_pressed"]

View File

@ -0,0 +1,54 @@
extends Panel
var A: Vector2
var B: Vector2
var C: Vector2
var D: Vector2
var E: Vector2
var rad: int
var center: Vector2
func _ready():
pass
func _process(delta):
var view = get_rect()
self.center = Vector2(view.size / 2)
self.rad = view.size.x/6
var v_offset = PI/5
var h_offset = PI/16
self.A = get_point(-PI/2 + v_offset)
self.B = get_point(h_offset)
self.C = get_point(PI/2)
self.D = get_point(PI - h_offset)
self.E = get_point(-PI/2 - v_offset)
queue_redraw()
func get_point(angle):
return self.center + Vector2(cos(angle), sin(angle)) * self.rad
func _draw():
draw_circle(self.center, self.rad, Color.RED)
var slot_rad = rad/8
var slot_color = Color.RED
draw_circle(self.A, slot_rad, slot_color)
draw_circle(self.B, slot_rad, slot_color)
draw_circle(self.C, slot_rad, slot_color)
draw_circle(self.D, slot_rad, slot_color)
draw_circle(self.E, slot_rad, slot_color)
var color = Color.BLACK
var width = 8
draw_line(self.A, self.C, color, width)
draw_line(self.A, self.D, color, width)
draw_line(self.B, self.E, color, width)
draw_line(self.B, self.D, color, width)
draw_line(self.C, self.E, color, width)
draw_line(self.C, self.A, color, width)
draw_line(self.D, self.A, color, width)
draw_line(self.D, self.B, color, width)

139
src/RuneSlots/rune_slots.gd Normal file
View File

@ -0,0 +1,139 @@
extends Control
var A: Vector2
var B: Vector2
var C: Vector2
var D: Vector2
var E: Vector2
var rad: int
var slot_rad: int
var center: Vector2
var rune_list: PackedScene
var mouse: Vector2
var current_point: Vector2
var points: Array
var actor: Actor
func _ready():
self.rune_list = preload("res://RuneList/rune_list.tscn")
func _process(delta):
# positions
# =========
var view = get_rect()
self.center = Vector2(view.size / 2)
self.rad = view.size.x/3
self.slot_rad = rad/6
var v_offset = PI/5
var h_offset = PI/16
self.A = get_point(-PI/2 + v_offset)
self.B = get_point(h_offset)
self.C = get_point(PI/2)
self.D = get_point(PI - h_offset)
self.E = get_point(-PI/2 - v_offset)
self.points = [self.A, self.B, self.C, self.D, self.E]
queue_redraw()
# events
# ======
self.mouse = get_local_mouse_position()
# phase runes
# ===========
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) \
and Gturn.current_phase == Gturn.PHASE.RUNES \
and Gturn.current_turn == Gturn.TURN.PLAYER \
and self.actor == Gactor.player:
var point = self.get_current_point()
var rune = self.point_to_rune(point)
if point and not rune:
var lst = self.rune_list.instantiate()
lst.actor = self.actor
lst.rune_selected.connect(self._on_rune_selected.bind(point))
add_child(lst)
get_tree().paused = true
if Input.is_mouse_button_pressed(MOUSE_BUTTON_RIGHT) \
and Gturn.current_phase == Gturn.PHASE.RUNES \
and Gturn.current_turn == Gturn.TURN.PLAYER \
and self.actor == Gactor.player:
var point = self.get_current_point()
if point:
var rune = self.point_to_rune(point)
if rune:
rune.set_slot(rune.NO_SLOT)
# phase actions
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) \
and Gturn.current_phase == Gturn.PHASE.ACTIONS \
and Gturn.current_turn == Gturn.TURN.PLAYER \
and self.actor == Gactor.player:
var actions = preload("res://RuneActions/rune_actions.tscn").instantiate()
var point = get_current_point()
var rune = point_to_rune(point)
if rune and not Gturn.rune_already_played(rune) \
and rune.actions.size() > 0:
actions.rune = rune
add_child(actions)
get_tree().paused = true
func _on_rune_selected(rune, point):
self.select_rune(rune, self.point_to_slot(point))
Gturn.next_phase()
func select_rune(rune, slot):
var res = rune.has_slot()
if res:
return false
rune.set_slot(slot)
return true
func get_point(angle):
return self.center + Vector2(cos(angle), sin(angle)) * self.rad
func get_current_point():
for point in self.points:
var dist = self.mouse.distance_squared_to(point) <= slot_rad * slot_rad
if dist:
return point
return null
func point_to_slot(point: Vector2):
var slot = self.points.find(point)
return slot
func point_to_rune(point):
if point == null:
return null
var slot = self.point_to_slot(point)
return self.actor.get_rune_by_slot(slot)
func _draw():
#draw_circle(self.center, self.rad, Color.DARK_RED)
var width = 2
for point in self.points:
var slot_color = Color(0, 0, 0, 0)
var slot = self.point_to_slot(point)
if self.actor.get_rune_by_slot(slot) != null:
slot_color = Color.BLACK
elif self.get_current_point() == point \
and self.actor == Gactor.player:
slot_color = Color.RED
width = 4
draw_circle(point, slot_rad, slot_color)
var color = Color.RED
draw_line(self.A, self.C, color, width)
draw_line(self.A, self.D, color, width)
draw_line(self.B, self.E, color, width)
draw_line(self.B, self.D, color, width)
draw_line(self.C, self.E, color, width)
draw_line(self.C, self.A, color, width)
draw_line(self.D, self.A, color, width)
draw_line(self.D, self.B, color, width)

View File

@ -0,0 +1,14 @@
[gd_scene load_steps=2 format=3 uid="uid://crngpd2jeu4sx"]
[ext_resource type="Script" path="res://RuneSlots/rune_slots.gd" id="1_qeglk"]
[node name="RuneSlots" 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
script = ExtResource("1_qeglk")

7
src/Sandbox/sandbox.gd Normal file
View File

@ -0,0 +1,7 @@
extends Control
func _ready():
Gai.actor = get_node('%EnemyUI').actor
func _process(delta):
pass

35
src/Sandbox/sandbox.tscn Normal file
View File

@ -0,0 +1,35 @@
[gd_scene load_steps=4 format=3 uid="uid://bk8owxoblg1aq"]
[ext_resource type="Script" path="res://Sandbox/sandbox.gd" id="1_e7uy8"]
[ext_resource type="PackedScene" uid="uid://cscojpnoqu33p" path="res://PlayerUI/player_ui.tscn" id="1_eowhn"]
[ext_resource type="PackedScene" uid="uid://bmug7u0mpwj7a" path="res://EnemyUI/enemy_ui.tscn" id="3_0501f"]
[node name="Sandbox" 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
script = ExtResource("1_e7uy8")
metadata/_edit_use_anchors_ = true
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PlayerUI" parent="HBoxContainer" instance=ExtResource("1_eowhn")]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
[node name="EnemyUI" parent="HBoxContainer" instance=ExtResource("3_0501f")]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3

1
src/icon.svg Normal file
View File

@ -0,0 +1 @@
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="124" height="124" rx="14" fill="#363d52" stroke="#212532" stroke-width="4"/><g transform="scale(.101) translate(122 122)"><g fill="#fff"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 813 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H447l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c3 34 55 34 58 0v-86c-3-34-55-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></g></svg>

After

Width:  |  Height:  |  Size: 950 B

27
src/project.godot Normal file
View File

@ -0,0 +1,27 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
[application]
config/name="Ludum Dare 55"
run/main_scene="res://Sandbox/sandbox.tscn"
config/features=PackedStringArray("4.2", "GL Compatibility")
config/icon="res://icon.svg"
[autoload]
Gactor="*res://Global/gactor.gd"
Gturn="*res://Global/gturn.gd"
Gai="*res://Global/gai.gd"
[rendering]
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"

2
src2/.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

2
src2/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# Godot 4+ specific ignores
.godot/

Binary file not shown.

43
src2/Game/game.gd Normal file
View File

@ -0,0 +1,43 @@
extends Node2D
var pentagram: Pentagram
var runes: Array
var drag = false
func _ready():
self.pentagram = Pentagram.new()
add_child(self.pentagram)
for idx in self.pentagram.indexes:
var x = randf_range(0, 512)
var y = randf_range(0, 512)
add_rune(Vector2(x, y), Color.DARK_RED, idx)
func add_rune(pos, color, idx):
var rune = Rune.new(color, idx)
add_child(rune)
self.runes.push_back(rune)
rune.global_position = pos
func _process(_delta):
var mouse = get_global_mouse_position()
for r in self.runes:
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) and not self.drag:
if mouse.distance_squared_to(r.global_position) <= r.radius * r.radius:
r.drag = true
r.matches = false
r.queue_redraw()
self.drag = true
else:
r.drag = false
self.drag = false
if not r.drag:
r.global_position = self.pentagram.snap(r.global_position, 96)
if self.pentagram.snaped:
r.matches = self.pentagram.snap_addr == r.idx
r.queue_redraw()
else:
r.global_position = mouse

6
src2/Game/game.tscn Normal file
View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://do7m3jpru3vjx"]
[ext_resource type="Script" path="res://Game/game.gd" id="1_ktaw1"]
[node name="Game" type="Node2D"]
script = ExtResource("1_ktaw1")

View File

@ -0,0 +1,65 @@
extends Node2D
class_name Pentagram
var A: Vector2
var B: Vector2
var C: Vector2
var D: Vector2
var E: Vector2
var center: Vector2
var radius: int
var points: Array
var indexes: Array
var snaped = false
var snap_addr = 0
func _ready():
self.refresh()
get_viewport().size_changed.connect(self.refresh)
self.indexes = [
0, 1, 2, 3, 4
]
func refresh():
var view = get_viewport()
self.radius = 256
self.center = view.size/2
var x = -PI/5
var y = -PI/16
self.A = self.center + self.get_point(-PI/2 - x) * self.radius
self.B = self.center + self.get_point(0 - y) * self.radius
self.C = self.center + self.get_point(PI/2) * self.radius
self.D = self.center + self.get_point(PI + y) * self.radius
self.E = self.center + self.get_point(-PI/2 + x) * self.radius
self.points = [self.A, self.B, self.C, self.D, self.E]
func _draw():
# draw_circle(self.center, self.radius, Color.BLACK)
var w = 8
draw_line(self.A, self.C, Color.DARK_RED, w)
draw_line(self.C, self.E, Color.DARK_RED, w)
draw_line(self.E, self.B, Color.DARK_RED, w)
draw_line(self.B, self.D, Color.DARK_RED, w)
draw_line(self.D, self.A, Color.DARK_RED, w)
func get_point(angle):
return Vector2(cos(angle), sin(angle))
func nearest(rune):
var point = null
var dist = null
for pts in self.points:
var d = rune.distance_squared_to(pts)
if dist == null or dist < d:
dist = d
point = pts
return point
func snap(pos: Vector2, dist):
self.snaped = false
for pts in self.points:
if pos.distance_squared_to(pts) < dist * dist:
self.snaped = true
self.snap_addr = self.points.find(pts)
return pts
return pos

30
src2/Rune/rune.gd Normal file
View File

@ -0,0 +1,30 @@
extends Node2D
class_name Rune
var radius = 24
var drag = false
var color: Color
var idx: int
var matches = false
func _init(_color, _index):
self.color = _color
self.idx = _index
func _ready():
pass
func _draw():
var loc = to_local(self.global_position)
draw_circle(loc, self.radius, self.color)
#draw_char(
# preload("res://Assets/NotoMono-Regular.ttf"),
# loc - Vector2(self.sz/4, -self.sz/4),
# self.letter,
# sz,
# Color.RED
#)
func _process(_delta):
pass

1
src2/icon.svg Normal file
View File

@ -0,0 +1 @@
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="124" height="124" rx="14" fill="#363d52" stroke="#212532" stroke-width="4"/><g transform="scale(.101) translate(122 122)"><g fill="#fff"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 813 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H447l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c3 34 55 34 58 0v-86c-3-34-55-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></g></svg>

After

Width:  |  Height:  |  Size: 950 B

21
src2/project.godot Normal file
View File

@ -0,0 +1,21 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
[application]
config/name="LD 55"
run/main_scene="res://Game/game.tscn"
config/features=PackedStringArray("4.2", "GL Compatibility")
config/icon="res://icon.svg"
[rendering]
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"

2
src3/.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

2
src3/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# Godot 4+ specific ignores
.godot/

44
src3/Actor/actor.gd Normal file
View File

@ -0,0 +1,44 @@
extends CharacterBody2D
class_name Actor
@export var auto_die = false
@export var player = false
var state = null
const SPEED = 400
var vel: Vector2 = Vector2(0, 0)
func _ready():
if self.auto_die:
self.set_state(ActorExplode.new(self))
func _physics_process(_delta):
pass
func set_state(new_state):
if self.state != null:
remove_child(self.state)
self.state = new_state
if self.state:
add_child(self.state)
func sprite() -> AnimatedSprite2D:
return $AnimatedSprite2D
func explode():
sprite().visible = false
$CPUParticles2D.restart()
func anim_walk():
sprite().animation = 'walk'
if not sprite().is_playing():
sprite().play()
func anim_idle():
sprite().animation = 'idle'
if not sprite().is_playing():
sprite().play()
func _on_cpu_particles_2d_finished():
self.queue_free()

43
src3/Actor/actor.tscn Normal file
View File

@ -0,0 +1,43 @@
[gd_scene load_steps=6 format=3 uid="uid://chsmfcu2ww1rf"]
[ext_resource type="Script" path="res://Actor/actor.gd" id="1_idlnt"]
[ext_resource type="Texture2D" path="res://Assets/particle.png" id="3_303hw"]
[ext_resource type="SpriteFrames" uid="uid://qasmquyomf8y" path="res://Actor/sprite_frames.tres" id="3_svw0v"]
[sub_resource type="CircleShape2D" id="CircleShape2D_4na4j"]
radius = 34.1321
[sub_resource type="Gradient" id="Gradient_qb1gn"]
offsets = PackedFloat32Array(0.048433, 0.940171)
colors = PackedColorArray(0.929412, 0, 0, 1, 1, 1, 0, 1)
[node name="Actor" type="CharacterBody2D" groups=["actors"]]
script = ExtResource("1_idlnt")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_4na4j")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = ExtResource("3_svw0v")
animation = &"walk"
frame_progress = 0.999143
[node name="CPUParticles2D" type="CPUParticles2D" parent="."]
emitting = false
amount = 64
lifetime = 0.2
one_shot = true
speed_scale = 8.0
explosiveness = 0.39
randomness = 0.32
texture = ExtResource("3_303hw")
emission_shape = 4
emission_points = PackedVector2Array()
emission_colors = PackedColorArray()
spread = 180.0
gravity = Vector2(0, 0)
initial_velocity_min = 366.83
initial_velocity_max = 814.07
color_ramp = SubResource("Gradient_qb1gn")
[connection signal="finished" from="CPUParticles2D" to="." method="_on_cpu_particles_2d_finished"]

View File

@ -0,0 +1,66 @@
extends ActorState
class_name ActorConvulse
var time = 0.7
var timer = 0.0
var initial_scale: Vector2
var current_scale: Vector2
func _init(_actor):
super(_actor)
self.initial_scale = actor.sprite().scale
self.current_scale = self.initial_scale
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func _exit_tree():
self.actor.sprite().scale = self.initial_scale
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
self.actor.sprite().scale = Vector2(0.2, 0.2) * (sin(self.timer*delta*8000) + 1.0)/2.0 \
+ self.current_scale
self.current_scale += Vector2(1, 1) * delta * 0.1
if self.timer > self.time:
var found = false
for penta in get_tree().get_nodes_in_group('pentagrams'):
if penta.position.distance_to(self.actor.position) <= Gstate.possess_dist:
if penta.try_activate():
Gstate.won_level = true
var n_actor = null
var others: Array = []
for next_actor in get_tree().get_nodes_in_group('actors'):
if next_actor == self.actor:
continue
if next_actor.position.distance_to(self.actor.position) <= Gstate.possess_dist:
var next_dist = next_actor.position.distance_to(self.actor.position)
others.push_back(next_actor)
if n_actor == null or n_actor.position.distance_to(self.actor.position) > next_dist:
n_actor = next_actor
if n_actor:
others.remove_at(others.find(n_actor))
for o in others:
o.set_state(ActorExplode.new(o))
n_actor.set_state(ActorPossessed.new(n_actor))
n_actor.player = true
Gstate.kill(n_actor)
found = true
if not found:
Gstate.kill(null)
self.actor.set_state(null)
self.actor.explode()
self.timer += delta
func _draw():
pass#draw_circle(to_local(self.actor.global_position), Gstate.possess_dist, Color(0.5, 0.0, 0.0, 0.1))

25
src3/Actor/actor_die.gd Normal file
View File

@ -0,0 +1,25 @@
extends ActorState
class_name ActorDie
var time = 2
var timer = 0.0
var current_scale: Vector2
func _init(_actor):
super(_actor)
self.current_scale = actor.sprite().scale
func _process(delta):
self.actor.sprite().scale = Vector2(0.2, 0.2) * (sin(self.timer*delta*8000) + 1.0)/2.0 \
+ self.current_scale
self.current_scale -= Vector2(1, 1) * delta * 0.3
self.current_scale.x = max(0, self.current_scale.x)
self.current_scale.y = max(0, self.current_scale.y)
if self.timer > self.time:
if self.actor.player:
get_tree().change_scene_to_file('res://GameOver/game_over.tscn')
return
self.actor.set_state(null)
self.actor.queue_free()
self.timer += delta

View File

@ -0,0 +1,21 @@
extends ActorState
class_name ActorExplode
var time = 1
var timer = 0.0
var current_scale: Vector2
func _init(_actor):
super(_actor)
self.current_scale = actor.sprite().scale
func _process(delta):
self.actor.sprite().scale = Vector2(0.1, 0.1) * (sin(self.timer*delta*10000) + 1.0)/2.0 \
+ self.current_scale
self.current_scale += Vector2(1, 1) * delta * 0.2
if self.timer > self.time:
self.actor.set_state(null)
self.actor.queue_free()
self.timer += delta

View File

@ -0,0 +1,48 @@
extends ActorState
class_name ActorPossessed
var sub_state = null
func _init(_actor):
super(_actor)
func _ready():
pass
func _process(_delta):
if Input.is_action_just_pressed("actor_convulse"):
set_sub_state(ActorConvulse.new(self.actor))
if Input.is_action_just_released("actor_convulse"):
set_sub_state(null)
func _physics_process(_delta):
self.actor.modulate = Color.RED
var mydir = Vector2(0, 0)
if Input.is_action_pressed("actor_up"):
mydir.y -= 1
if Input.is_action_pressed("actor_down"):
mydir.y += 1
if Input.is_action_pressed("actor_left"):
mydir.x -= 1
if Input.is_action_pressed("actor_right"):
mydir.x += 1
if mydir.length_squared() > 0:
mydir = mydir.normalized()
self.actor.sprite().rotation = mydir.angle() - PI/2
self.actor.anim_walk()
else:
self.actor.anim_idle()
if self.actor:
self.actor.velocity = mydir * self.actor.SPEED
self.actor.move_and_slide()
func set_sub_state(new_state):
if self.sub_state:
remove_child(self.sub_state)
self.sub_state = new_state
if self.sub_state:
add_child(self.sub_state)

15
src3/Actor/actor_state.gd Normal file
View File

@ -0,0 +1,15 @@
extends Node2D
class_name ActorState
var actor: Actor
func _init(_actor: Actor):
assert(_actor)
self.actor = _actor
func _ready():
pass
func _process(_delta):
pass

View File

@ -0,0 +1,121 @@
[gd_resource type="SpriteFrames" load_steps=17 format=3 uid="uid://qasmquyomf8y"]
[ext_resource type="Texture2D" uid="uid://byts5nsmfcfve" path="res://Assets/spritesheet.png" id="1_0a701"]
[sub_resource type="AtlasTexture" id="AtlasTexture_m3cob"]
atlas = ExtResource("1_0a701")
region = Rect2(0, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_gsqo6"]
atlas = ExtResource("1_0a701")
region = Rect2(64, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_0lvuh"]
atlas = ExtResource("1_0a701")
region = Rect2(128, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_0y6du"]
atlas = ExtResource("1_0a701")
region = Rect2(192, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_0yegb"]
atlas = ExtResource("1_0a701")
region = Rect2(256, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_wwi4l"]
atlas = ExtResource("1_0a701")
region = Rect2(320, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_vtx2x"]
atlas = ExtResource("1_0a701")
region = Rect2(384, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_b476f"]
atlas = ExtResource("1_0a701")
region = Rect2(0, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_ret2m"]
atlas = ExtResource("1_0a701")
region = Rect2(64, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_s7d6w"]
atlas = ExtResource("1_0a701")
region = Rect2(128, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_ohcd4"]
atlas = ExtResource("1_0a701")
region = Rect2(192, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_drpxs"]
atlas = ExtResource("1_0a701")
region = Rect2(256, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_0bgtq"]
atlas = ExtResource("1_0a701")
region = Rect2(320, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_cq6k0"]
atlas = ExtResource("1_0a701")
region = Rect2(384, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_rsbm3"]
atlas = ExtResource("1_0a701")
region = Rect2(448, 64, 64, 64)
[resource]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_m3cob")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gsqo6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0lvuh")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0y6du")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0yegb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wwi4l")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vtx2x")
}],
"loop": true,
"name": &"idle",
"speed": 8.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_b476f")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ret2m")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_s7d6w")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ohcd4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_drpxs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0bgtq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cq6k0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rsbm3")
}],
"loop": true,
"name": &"walk",
"speed": 18.0
}]

BIN
src3/Assets/clone.ogg Normal file

Binary file not shown.

BIN
src3/Assets/gameplay_0.mmpz Normal file

Binary file not shown.

Binary file not shown.

BIN
src3/Assets/gameplay_0.ogg Normal file

Binary file not shown.

BIN
src3/Assets/gameplay_1.mmpz Normal file

Binary file not shown.

BIN
src3/Assets/gameplay_1.ogg Normal file

Binary file not shown.

BIN
src3/Assets/gameplay_2.ogg Normal file

Binary file not shown.

BIN
src3/Assets/how_to_play.ogg Normal file

Binary file not shown.

1
src3/Assets/icon.svg Normal file
View File

@ -0,0 +1 @@
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="124" height="124" rx="14" fill="#363d52" stroke="#212532" stroke-width="4"/><g transform="scale(.101) translate(122 122)"><g fill="#fff"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 813 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H447l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c3 34 55 34 58 0v-86c-3-34-55-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></g></svg>

After

Width:  |  Height:  |  Size: 950 B

BIN
src3/Assets/menu.ogg Normal file

Binary file not shown.

BIN
src3/Assets/particle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src3/Assets/spritesheet.ase Normal file

Binary file not shown.

BIN
src3/Assets/spritesheet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
src3/Assets/teleport.ogg Normal file

Binary file not shown.

BIN
src3/Assets/tilemap.ase Normal file

Binary file not shown.

BIN
src3/Assets/tilemap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,20 @@
extends Control
# 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):
$CanvasLayer/Pentagram.rotation += delta * PI/4
func _on_try_again_button_pressed():
Gstate.restart()
get_tree().change_scene_to_file("res://Level/level.tscn")
func _on_quit_button_pressed():
get_tree().quit()

View File

@ -0,0 +1,64 @@
[gd_scene load_steps=4 format=3 uid="uid://c3brx1b41l0io"]
[ext_resource type="Script" path="res://GameOver/game_over.gd" id="1_o6k3r"]
[ext_resource type="PackedScene" uid="uid://2ld14yig6m07" path="res://Pentagram/pentagram.tscn" id="2_ajtpg"]
[sub_resource type="CanvasTexture" id="CanvasTexture_v15nk"]
[node name="GameOver" 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_o6k3r")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="TextureRect" type="TextureRect" parent="CanvasLayer"]
modulate = Color(0, 0, 0, 1)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_vertical = 3
texture = SubResource("CanvasTexture_v15nk")
[node name="Pentagram" parent="CanvasLayer" instance=ExtResource("2_ajtpg")]
position = Vector2(573, 311)
scale = Vector2(3, 3)
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer"]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -148.0
offset_top = -143.0
offset_right = 155.0
offset_bottom = 90.0
grow_horizontal = 2
grow_vertical = 2
[node name="Label" type="Label" parent="CanvasLayer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
text = "GAME OVER
"
horizontal_alignment = 1
vertical_alignment = 1
[node name="TryAgainButton" type="Button" parent="CanvasLayer/VBoxContainer"]
layout_mode = 2
text = "TRY AGAIN"
[node name="QuitButton" type="Button" parent="CanvasLayer/VBoxContainer"]
layout_mode = 2
text = "QUIT
"
[connection signal="pressed" from="CanvasLayer/VBoxContainer/TryAgainButton" to="." method="_on_try_again_button_pressed"]
[connection signal="pressed" from="CanvasLayer/VBoxContainer/QuitButton" to="." method="_on_quit_button_pressed"]

89
src3/Global/gstate.gd Normal file
View File

@ -0,0 +1,89 @@
extends Node
var level_time = 5
var time = 0
var possess_dist = 256
var kill_gain = 2.0
var camera: Camera2D
var current_actor_possessed: Actor = null
var game_over = false
var won_level = true
var levels = null
var current_level = 0
var is_final = false
var waiting = false
var transition = false
var musics: Array
func _ready():
self.time = self.level_time
self.camera = Camera2D.new()
add_child(self.camera)
self.musics = [
preload("res://Assets/gameplay_0.ogg"),
preload("res://Assets/gameplay_1.ogg"),
preload("res://Assets/gameplay_2.ogg")
]
self.levels = [
preload("res://Level/level_1.tscn"),
preload("res://Level/level_2.tscn"),
preload("res://Level/level_3.tscn"),
preload("res://Level/level_4.tscn"),
preload("res://Level/level_5.tscn"),
preload("res://Level/level_6.tscn"),
preload("res://Level/level_7.tscn"),
preload("res://Level/final_level.tscn")
]
func restart():
self.game_over = false
self.won_level = true
self.current_level -= 1
self.is_final = false
self.time = self.level_time
func next_level():
if self.won_level:
self.won_level = false
self.time = self.level_time
var n = self.levels[self.current_level].instantiate()
self.current_level += 1
self.is_final = self.current_level >= self.levels.size()
return n
return null
func kill(new_actor):
if new_actor:
self.time += self.kill_gain
self.current_actor_possessed = new_actor
func _process(delta):
if self.won_level:
return
if self.game_over:
return
if self.current_actor_possessed:
var dir = self.current_actor_possessed.position - self.camera.position
var dist = dir.length_squared()
if dir.length_squared() > 0:
dir = dir.normalized()
if dist < 8.0 * 8.0:
self.camera.position = self.current_actor_possessed.position
else:
self.camera.position += dir * delta * 640
if not self.is_final and time < 0 and not self.game_over:
self.game_over = true
if self.current_actor_possessed:
self.current_actor_possessed.set_state(ActorDie.new(self.current_actor_possessed))
else:
get_tree().change_scene_to_file('res://GameOver/game_over.tscn')
if not self.waiting:
time -= delta

12
src3/HUD/hud.gd Normal file
View File

@ -0,0 +1,12 @@
extends Control
func _ready():
pass
func _process(_delta):
if Gstate.time > -1:
if not Gstate.waiting:
get_node('%TimeLabel').text = "TIME LEFT: " + str(1 + floor(Gstate.time))
else:
get_node('%TimeLabel').text = ""

33
src3/HUD/hud.tscn Normal file
View File

@ -0,0 +1,33 @@
[gd_scene load_steps=2 format=3 uid="uid://bt5nt818fko78"]
[ext_resource type="Script" path="res://HUD/hud.gd" id="1_hs006"]
[node name="HUD" 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_hs006")
[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="TimeLabel" type="Label" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_colors/font_color = Color(0.552941, 0, 0, 1)
theme_override_font_sizes/font_size = 48
text = "-"
horizontal_alignment = 1
vertical_alignment = 1
uppercase = true
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2

8
src3/Hint/hint.gd Normal file
View File

@ -0,0 +1,8 @@
extends Label
class_name Hint
func _ready():
pass
func _process(delta):
self.position += Vector2(0, -32) * delta

14
src3/Hint/hint.tscn Normal file
View File

@ -0,0 +1,14 @@
[gd_scene load_steps=2 format=3 uid="uid://v1q36um3bukv"]
[ext_resource type="Script" path="res://Hint/hint.gd" id="1_rxt3a"]
[node name="Hint" type="Label"]
modulate = Color(0.843137, 0, 1, 1)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 16
text = "+1"
script = ExtResource("1_rxt3a")

View File

@ -0,0 +1,15 @@
extends Control
# 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):
$CanvasLayer/Pentagram.rotation += delta * PI/4
func _on_button_pressed():
get_tree().change_scene_to_file("res://Menu/menu.tscn")

File diff suppressed because one or more lines are too long

19
src3/Level/final_level.gd Normal file
View File

@ -0,0 +1,19 @@
extends Control
# 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
func _on_restart_button_pressed():
get_tree().change_scene_to_file("res://Menu/menu.tscn")
func _on_quit_button_pressed():
get_tree().quit()

View File

@ -0,0 +1,43 @@
[gd_scene load_steps=2 format=3 uid="uid://bvtot1d6jceil"]
[ext_resource type="Script" path="res://Level/final_level.gd" id="1_0ivrk"]
[node name="FinalLevel" 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_0ivrk")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
alignment = 1
[node name="Label" type="Label" parent="CanvasLayer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 64
text = "THANKS FOR PLAYING"
horizontal_alignment = 1
[node name="RestartButton" type="Button" parent="CanvasLayer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Back to main menu
"
[node name="QuitButton" type="Button" parent="CanvasLayer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Quit
"
[connection signal="pressed" from="CanvasLayer/VBoxContainer/RestartButton" to="." method="_on_restart_button_pressed"]
[connection signal="pressed" from="CanvasLayer/VBoxContainer/QuitButton" to="." method="_on_quit_button_pressed"]

49
src3/Level/level.gd Normal file
View File

@ -0,0 +1,49 @@
extends Node2D
var lvl = null
var next_level = null
func _ready():
var sz = Gstate.musics.size()
$AudioStreamPlayer.stream = Gstate.musics[randi_range(0, sz-1)]
$AudioStreamPlayer.play()
var nxt = Gstate.next_level()
if nxt:
self.next_level = nxt
go_next_level()
func _process(_delta):
var nxt = Gstate.next_level()
if nxt:
$SFXTeleport.play()
self.next_level = nxt
Gstate.waiting = true
$NextLevelTimer.start()
func go_next_level():
for c in get_node('%Slot').get_children():
get_node('%Slot').remove_child(c)
get_node('%Slot').add_child(self.next_level)
for actor in get_tree().get_nodes_in_group('actors'):
if actor.player:
Gstate.camera.position = actor.position
Gstate.current_actor_possessed = actor
actor.set_state(ActorPossessed.new(actor))
if not Gstate.is_final:
var start = preload("res://StartLevel/start_level.tscn").instantiate()
add_child(start)
get_tree().paused = true
else:
get_tree().change_scene_to_file("res://Level/final_level.tscn")
func _on_next_level_timer_timeout():
Gstate.waiting = false
go_next_level()
func _on_change_music_timer_timeout():
var sz = Gstate.musics.size()
$AudioStreamPlayer.stream = Gstate.musics[randi_range(0, sz-1)]
$AudioStreamPlayer.play()

33
src3/Level/level.tscn Normal file
View File

@ -0,0 +1,33 @@
[gd_scene load_steps=4 format=3 uid="uid://d4lvhpmnksgr4"]
[ext_resource type="Script" path="res://Level/level.gd" id="1_fv4pj"]
[ext_resource type="PackedScene" uid="uid://bt5nt818fko78" path="res://HUD/hud.tscn" id="2_gu65n"]
[ext_resource type="AudioStream" uid="uid://3t0jp7rovybl" path="res://Assets/teleport.ogg" id="3_ifc6q"]
[node name="Level" type="Node2D"]
script = ExtResource("1_fv4pj")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="HUD" parent="CanvasLayer" instance=ExtResource("2_gu65n")]
metadata/_edit_lock_ = true
[node name="Slot" type="Node2D" parent="."]
unique_name_in_owner = true
[node name="NextLevelTimer" type="Timer" parent="."]
wait_time = 1.5
one_shot = true
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
process_mode = 3
[node name="ChangeMusicTimer" type="Timer" parent="."]
wait_time = 10.0
autostart = true
[node name="SFXTeleport" type="AudioStreamPlayer" parent="."]
stream = ExtResource("3_ifc6q")
[connection signal="timeout" from="NextLevelTimer" to="." method="_on_next_level_timer_timeout"]
[connection signal="timeout" from="ChangeMusicTimer" to="." method="_on_change_music_timer_timeout"]

23
src3/Level/level_1.tscn Normal file

File diff suppressed because one or more lines are too long

23
src3/Level/level_2.tscn Normal file

File diff suppressed because one or more lines are too long

29
src3/Level/level_3.tscn Normal file

File diff suppressed because one or more lines are too long

35
src3/Level/level_4.tscn Normal file

File diff suppressed because one or more lines are too long

32
src3/Level/level_5.tscn Normal file

File diff suppressed because one or more lines are too long

75
src3/Level/level_6.tscn Normal file

File diff suppressed because one or more lines are too long

41
src3/Level/level_7.tscn Normal file

File diff suppressed because one or more lines are too long

19
src3/Map/tileset.tres Normal file
View File

@ -0,0 +1,19 @@
[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://cy6ilq1xaig2t"]
[ext_resource type="Texture2D" uid="uid://cxc4aoh3p0k2m" path="res://Assets/tilemap.png" id="1_0r1gb"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_q8ja5"]
texture = ExtResource("1_0r1gb")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/0/physics_layer_0/angular_velocity = 0.0
1:0/0 = 0
1:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
1:0/0/physics_layer_0/angular_velocity = 0.0
1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
[resource]
tile_size = Vector2i(32, 32)
physics_layer_0/collision_layer = 1
sources/1 = SubResource("TileSetAtlasSource_q8ja5")

37
src3/Menu/menu.gd Normal file
View File

@ -0,0 +1,37 @@
extends Control
# 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):
$CanvasLayer/Pentagram.rotation += PI * delta
func _on_play_button_pressed():
get_tree().change_scene_to_file("res://Level/level.tscn")
func _on_quit_button_pressed():
get_tree().quit()
func _on_how_to_play_button_pressed():
get_tree().change_scene_to_file("res://HowToPlay/how_to_play.tscn")
func _on_music_timer_timeout():
$RythmTimer.start()
func _on_rythm_timer_timeout():
var r = randf()
var g = randf()
var b = randf()
$CanvasLayer/TextureRect.modulate = Color(r, g, b)
$CanvasLayer/Pentagram.visible = not $CanvasLayer/Pentagram.visible
$CanvasLayer/Pentagram.scale.x = randf() * 2
$CanvasLayer/Pentagram.scale.y = $CanvasLayer/Pentagram.scale.x
$CanvasLayer/Pentagram.position.x = randf() * get_viewport().size.x
$CanvasLayer/Pentagram.position.y = randf() * get_viewport().size.y

94
src3/Menu/menu.tscn Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,53 @@
extends Node2D
@export var initial = false
var activated = false
# 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
func _draw():
var center = $Marker2D.position
var rad = 96
var x = -PI/5
var y = -PI/12
var A = center + get_point(-PI/2 - x) * rad
var B = center + get_point(0 - y) * rad
var C = center + get_point(PI/2) * rad
var D = center + get_point(PI + y) * rad
var E = center + get_point(-PI/2 + x) * rad
var color = Color.DARK_RED
var thick = 4
if self.activated:
color = Color.RED
thick = 16
if self.initial:
color = Color.BLUE_VIOLET
thick = 4
draw_line(A, C, color, thick)
draw_line(C, E, color, thick)
draw_line(E, B, color, thick)
draw_line(B, D, color, thick)
draw_line(D, A, color, thick)
func get_point(angle):
return Vector2(cos(angle), sin(angle))
func try_activate():
if self.initial:
return false
self.activated = true
self.queue_redraw()
return true

View File

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://2ld14yig6m07"]
[ext_resource type="Script" path="res://Pentagram/pentagram.gd" id="1_dee2e"]
[node name="Pentagram" type="Node2D" groups=["pentagrams"]]
script = ExtResource("1_dee2e")
[node name="Marker2D" type="Marker2D" parent="."]
gizmo_extents = 64.0

View File

@ -0,0 +1,13 @@
extends Control
func _ready():
Gstate.transition = true
func _process(_delta):
get_node('%Label').text = "LEVEL " + str(Gstate.current_level)
func _on_timer_timeout():
Gstate.transition = false
get_tree().paused = false
self.queue_free()

View File

@ -0,0 +1,62 @@
[gd_scene load_steps=3 format=3 uid="uid://ciq551pjg36re"]
[ext_resource type="Script" path="res://StartLevel/start_level.gd" id="1_x4hfv"]
[sub_resource type="CanvasTexture" id="CanvasTexture_k4jbs"]
[node name="StartLevel" type="Control"]
process_mode = 2
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_x4hfv")
[node name="Timer" type="Timer" parent="."]
wait_time = 1.5
one_shot = true
autostart = true
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="TextureRect" type="TextureRect" parent="CanvasLayer"]
modulate = Color(0, 0, 0, 1)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("CanvasTexture_k4jbs")
[node name="Panel" type="Panel" parent="CanvasLayer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -2.0
offset_top = -4.0
offset_right = -2.0
offset_bottom = -4.0
grow_horizontal = 2
grow_vertical = 2
[node name="Label" type="Label" parent="CanvasLayer/Panel"]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -11.5
offset_right = 20.0
offset_bottom = 11.5
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 64
text = "3"
uppercase = true
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]

104
src3/export_presets.cfg Normal file
View File

@ -0,0 +1,104 @@
[preset.0]
name="macOS"
platform="macOS"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../../Export/ldbog55.zip"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
[preset.0.options]
export/distribution_type=1
binary_format/architecture="universal"
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
application/icon=""
application/icon_interpolation=4
application/bundle_identifier="com.shellbox.bog"
application/signature="azeezaazeeza"
application/app_category="Games"
application/short_version=""
application/version=""
application/copyright=""
application/copyright_localized={}
application/min_macos_version="10.12"
application/export_angle=0
display/high_res=true
xcode/platform_build="14C18"
xcode/sdk_version="13.1"
xcode/sdk_build="22C55"
xcode/sdk_name="macosx13.1"
xcode/xcode_version="1420"
xcode/xcode_build="14C18"
codesign/codesign=1
codesign/installer_identity=""
codesign/apple_team_id=""
codesign/identity=""
codesign/entitlements/custom_file=""
codesign/entitlements/allow_jit_code_execution=false
codesign/entitlements/allow_unsigned_executable_memory=false
codesign/entitlements/allow_dyld_environment_variables=false
codesign/entitlements/disable_library_validation=false
codesign/entitlements/audio_input=false
codesign/entitlements/camera=false
codesign/entitlements/location=false
codesign/entitlements/address_book=false
codesign/entitlements/calendars=false
codesign/entitlements/photos_library=false
codesign/entitlements/apple_events=false
codesign/entitlements/debugging=false
codesign/entitlements/app_sandbox/enabled=false
codesign/entitlements/app_sandbox/network_server=false
codesign/entitlements/app_sandbox/network_client=false
codesign/entitlements/app_sandbox/device_usb=false
codesign/entitlements/app_sandbox/device_bluetooth=false
codesign/entitlements/app_sandbox/files_downloads=0
codesign/entitlements/app_sandbox/files_pictures=0
codesign/entitlements/app_sandbox/files_music=0
codesign/entitlements/app_sandbox/files_movies=0
codesign/entitlements/app_sandbox/files_user_selected=0
codesign/entitlements/app_sandbox/helper_executables=[]
codesign/custom_options=PackedStringArray()
notarization/notarization=0
privacy/microphone_usage_description=""
privacy/microphone_usage_description_localized={}
privacy/camera_usage_description=""
privacy/camera_usage_description_localized={}
privacy/location_usage_description=""
privacy/location_usage_description_localized={}
privacy/address_book_usage_description=""
privacy/address_book_usage_description_localized={}
privacy/calendar_usage_description=""
privacy/calendar_usage_description_localized={}
privacy/photos_library_usage_description=""
privacy/photos_library_usage_description_localized={}
privacy/desktop_folder_usage_description=""
privacy/desktop_folder_usage_description_localized={}
privacy/documents_folder_usage_description=""
privacy/documents_folder_usage_description_localized={}
privacy/downloads_folder_usage_description=""
privacy/downloads_folder_usage_description_localized={}
privacy/network_volumes_usage_description=""
privacy/network_volumes_usage_description_localized={}
privacy/removable_volumes_usage_description=""
privacy/removable_volumes_usage_description_localized={}
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""

1
src3/icon.svg Normal file
View File

@ -0,0 +1 @@
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="124" height="124" rx="14" fill="#363d52" stroke="#212532" stroke-width="4"/><g transform="scale(.101) translate(122 122)"><g fill="#fff"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 813 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H447l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c3 34 55 34 58 0v-86c-3-34-55-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></g></svg>

After

Width:  |  Height:  |  Size: 950 B

60
src3/project.godot Normal file
View File

@ -0,0 +1,60 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
[application]
config/name="Ludum 55"
run/main_scene="res://Menu/menu.tscn"
config/features=PackedStringArray("4.2", "GL Compatibility")
config/icon="res://icon.svg"
[autoload]
Gstate="*res://Global/gstate.gd"
[display]
window/stretch/mode="canvas_items"
[input]
actor_up={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":122,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":119,"echo":false,"script":null)
]
}
actor_down={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null)
]
}
actor_left={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":113,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":97,"echo":false,"script":null)
]
}
actor_right={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null)
]
}
actor_convulse={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null)
]
}
[rendering]
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"
environment/defaults/default_clear_color=Color(0, 0, 0, 1)