Performed a summoning ritual for initial buildings (also resized some

sprites)
This commit is contained in:
Florian 2025-09-17 18:05:43 +02:00
parent 16718459df
commit 267787c67e
16 changed files with 89 additions and 16 deletions

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Building 1x2 fixed.png-e90afc0d25a8919ada5700
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Building 2x1 downside.png-4b432eb4152bab7dd59
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Building 2x1 fixed.png-b02748fa52aebae62f987c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -25,7 +25,7 @@ shape = SubResource("CircleShape2D_6attn")
texture = ExtResource("3_34o1m")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
scale = Vector2(6, 6)
scale = Vector2(5, 5)
shape = SubResource("CircleShape2D_6attn")
[node name="EarthAligner" parent="." instance=ExtResource("3_obmiq")]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=3 uid="uid://cxo6bq26huau7"]
[gd_scene load_steps=9 format=3 uid="uid://cxo6bq26huau7"]
[ext_resource type="PackedScene" uid="uid://cmaovvr15b3qk" path="res://player/player.tscn" id="2_1bvp3"]
[ext_resource type="Script" uid="uid://vgxh2xdevat7" path="res://world/earth.gd" id="2_lquwl"]
@ -7,17 +7,10 @@
[ext_resource type="PackedScene" uid="uid://73g8y37skebh" path="res://item_ui/item_ui.tscn" id="6_4c57u"]
[ext_resource type="PackedScene" uid="uid://cjsrtswk4vgf2" path="res://healthbar/healthbar.tscn" id="6_7mycd"]
[ext_resource type="PackedScene" uid="uid://dpdn2php3ydsv" path="res://death_screen/death_screen.tscn" id="7_5vw27"]
[ext_resource type="Script" uid="uid://3k6r3jnko4hg" path="res://show_fps.gd" id="8_5vw27"]
[node name="main" type="Node2D"]
[node name="Layer0" type="Parallax2D" parent="."]
[node name="Layer1" type="Parallax2D" parent="."]
[node name="Layer2" type="Parallax2D" parent="."]
[node name="Layer3" type="Parallax2D" parent="."]
[node name="Earth" parent="." instance=ExtResource("3_lquwl")]
unique_name_in_owner = true
script = ExtResource("2_lquwl")
@ -37,9 +30,10 @@ zoom = Vector2(0.12, 0.12)
[node name="Building Generator" type="Node" parent="."]
script = ExtResource("4_1bvp3")
initial_buildings = 10
[node name="Timer" type="Timer" parent="Building Generator"]
wait_time = 0.8
wait_time = 2.5
autostart = true
[node name="CanvasLayer" type="CanvasLayer" parent="."]
@ -54,6 +48,15 @@ player = NodePath("../../Player")
[node name="DeathScreen" parent="CanvasLayer" instance=ExtResource("7_5vw27")]
visible = false
[node name="FPS" type="Label" parent="CanvasLayer"]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -40.0
offset_bottom = 23.0
grow_horizontal = 0
script = ExtResource("8_5vw27")
[connection signal="active_item_changed" from="Player" to="CanvasLayer/ItemUI" method="_on_player_active_item_changed"]
[connection signal="health_changed" from="Player" to="CanvasLayer/Healthbar" method="_on_player_health_changed"]
[connection signal="max_hp_changed" from="Player" to="CanvasLayer/Healthbar" method="_on_player_max_hp_changed"]

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Walk 1.png-47c623e9d3540b4a00d2bddf52ae0b2a.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Walk 2.png-5dea4fdec55fa43e26680e08090fd654.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Walk 3.png-27890c0cb512383b8ecbd848c73efee1.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Walk 4.png-232b1eae2acf3ad82130431014262cde.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Walk 5.png-cfb8eb15ace876127c083283fe74cdc0.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Walk 6.png-f243f98e182be67eb8681a11d34ee554.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -24,7 +24,7 @@ script = ExtResource("1_hv1tj")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-13, 5)
rotation = 1.5708
scale = Vector2(-0.3, -0.9)
scale = Vector2(-0.417, -0.985)
shape = SubResource("CapsuleShape2D_e4ynd")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]

View file

@ -12,7 +12,7 @@ config_version=5
config/name="The Dark Side of Earth"
run/main_scene="uid://cxo6bq26huau7"
config/features=PackedStringArray("4.4", "Forward Plus")
config/features=PackedStringArray("4.5", "Forward Plus")
config/icon="res://icon.svg"
[display]

4
show_fps.gd Normal file
View file

@ -0,0 +1,4 @@
extends Label
func _process(_delta):
set_text("FPS " + str(Engine.get_frames_per_second()))

1
show_fps.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://3k6r3jnko4hg

View file

@ -1,6 +1,7 @@
extends Node
@onready var grid : Grid = %Earth.get_grid()
@export var initial_buildings : int;
func random_oppostite_collumn() -> int:
var playerpos = %Player.position
@ -12,12 +13,22 @@ func random_oppostite_collumn() -> int:
return collumn
func random_collumn() -> int:
return randi_range(0, grid.num_collumns - 1)
func _ready():
for i in range(initial_buildings):
var collumn = random_collumn()
if 43 <= collumn and collumn <= 49:
continue
var building = randomize_building()
grid.add_building_to_collumn(building, collumn)
func _on_timer_timeout() -> void:
var collumn = random_oppostite_collumn()
var index = randi() % 2
var building : Building = grid.packed_buildings[index].instantiate()
var building : Building = randomize_building()
grid.add_building_to_collumn(building, collumn)
func randomize_building() -> Building:
var index = randi() % grid.packed_buildings.size()
return grid.packed_buildings[index].instantiate()