chain levels with spaghetti
This commit is contained in:
parent
7a18c4f8c6
commit
6a59b54c11
10 changed files with 465 additions and 15 deletions
|
@ -18,7 +18,7 @@ func _process(_delta: float) -> void:
|
||||||
|
|
||||||
## Angle of the camera, so the player can see where the ball is going
|
## Angle of the camera, so the player can see where the ball is going
|
||||||
var velocity: Vector3 = $Sphere.linear_velocity
|
var velocity: Vector3 = $Sphere.linear_velocity
|
||||||
var desired_x = max(min(velocity.y, 20), -20)
|
var desired_x = max(min(velocity.y, 35), -35)
|
||||||
var desired_y = max(min(-velocity.x, 50), -50)
|
var desired_y = max(min(-velocity.x, 50), -50)
|
||||||
var difference_x = $Camera.rotation_degrees.x - desired_x
|
var difference_x = $Camera.rotation_degrees.x - desired_x
|
||||||
var difference_y = $Camera.rotation_degrees.y - desired_y
|
var difference_y = $Camera.rotation_degrees.y - desired_y
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://cpm3laywhlbq5"]
|
[gd_scene load_steps=7 format=3 uid="uid://cpm3laywhlbq5"]
|
||||||
|
|
||||||
[ext_resource type="Material" uid="uid://brwwlwb1rpro7" path="res://levels/base/material.tres" id="1_48h5f"]
|
[ext_resource type="Material" uid="uid://brwwlwb1rpro7" path="res://graphics/unhappy_material.tres" id="1_48h5f"]
|
||||||
[ext_resource type="AudioStream" uid="uid://b0cl5v6q1ocbv" path="res://sounds/ring1.ogg" id="2_2so43"]
|
[ext_resource type="AudioStream" uid="uid://b0cl5v6q1ocbv" path="res://sounds/ring1.ogg" id="2_2so43"]
|
||||||
[ext_resource type="AudioStream" uid="uid://cvvs74ep5d4wt" path="res://sounds/ring2.ogg" id="3_lkqw0"]
|
[ext_resource type="AudioStream" uid="uid://cvvs74ep5d4wt" path="res://sounds/ring2.ogg" id="3_lkqw0"]
|
||||||
|
|
||||||
|
@ -10,12 +10,14 @@ script/source = "extends CSGTorus3D
|
||||||
var happy_material = preload(\"res://graphics/happy_material.tres\")
|
var happy_material = preload(\"res://graphics/happy_material.tres\")
|
||||||
|
|
||||||
var collected = false
|
var collected = false
|
||||||
|
signal collect_signal
|
||||||
|
|
||||||
func _on_area_3d_body_entered(body: Node3D) -> void:
|
func _on_area_3d_body_entered(body: Node3D) -> void:
|
||||||
if collected == false and body.name == \"Sphere\":
|
if collected == false and body.name == \"Sphere\":
|
||||||
self.material = happy_material
|
self.material = happy_material
|
||||||
collected = true
|
collected = true
|
||||||
$AudioStreamPlayer.play()
|
$AudioStreamPlayer.play()
|
||||||
|
collect_signal.emit()
|
||||||
"
|
"
|
||||||
|
|
||||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_tgirv"]
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_tgirv"]
|
||||||
|
|
|
@ -41,7 +41,9 @@ func makeAudioStreamPlayers(music_name: String):
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
makeAudioStreamPlayers(\"base\")
|
var level = get_parent().get_parent()
|
||||||
|
if is_instance_valid(level) and level is Node3D:
|
||||||
|
makeAudioStreamPlayers(level.name.to_lower())
|
||||||
for player in stream_players:
|
for player in stream_players:
|
||||||
player.play()
|
player.play()
|
||||||
|
|
||||||
|
|
275
index.tscn
275
index.tscn
|
@ -1,3 +1,276 @@
|
||||||
[gd_scene format=3 uid="uid://ccgnnif026wb4"]
|
[gd_scene load_steps=9 format=3 uid="uid://ccgnnif026wb4"]
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_8n212"]
|
||||||
|
script/source = "extends Node
|
||||||
|
|
||||||
|
var seconds_spent: float = 0.0
|
||||||
|
var base = preload(\"res://levels/base/level.tscn\")
|
||||||
|
var forest = preload(\"res://levels/forest/level.tscn\")
|
||||||
|
|
||||||
|
func start_level(level_scene: PackedScene) -> void:
|
||||||
|
if level_scene and level_scene.can_instantiate():
|
||||||
|
AudioServer.set_bus_volume_db(0, 0)
|
||||||
|
var level = level_scene.instantiate()
|
||||||
|
$Levels.add_child(level)
|
||||||
|
$Timer.paused = false
|
||||||
|
else:
|
||||||
|
assert(false, \"NO LEVEL AAAA\")
|
||||||
|
|
||||||
|
func stop_level() -> void:
|
||||||
|
$Timer.paused = true
|
||||||
|
|
||||||
|
AudioServer.set_bus_volume_db(0, -5)
|
||||||
|
await get_tree().create_timer(0.5).timeout
|
||||||
|
AudioServer.set_bus_volume_db(0, -10)
|
||||||
|
await get_tree().create_timer(0.5).timeout
|
||||||
|
AudioServer.set_bus_volume_db(0, -30)
|
||||||
|
await get_tree().create_timer(0.5).timeout
|
||||||
|
AudioServer.set_bus_volume_db(0, -50)
|
||||||
|
await get_tree().create_timer(0.5).timeout
|
||||||
|
|
||||||
|
var current_levels = $Levels.get_children(true)
|
||||||
|
var current_level = current_levels[0]
|
||||||
|
var next_level: PackedScene
|
||||||
|
|
||||||
|
if current_level.name == \"Base\":
|
||||||
|
next_level = forest
|
||||||
|
|
||||||
|
for level in current_levels:
|
||||||
|
level.queue_free()
|
||||||
|
|
||||||
|
start_level(next_level)
|
||||||
|
|
||||||
|
func _on_btn_fullscreen_pressed() -> void:
|
||||||
|
var fs = DisplayServer.window_get_mode()
|
||||||
|
if fs != DisplayServer.WindowMode.WINDOW_MODE_FULLSCREEN:
|
||||||
|
DisplayServer.window_set_mode(DisplayServer.WindowMode.WINDOW_MODE_FULLSCREEN)
|
||||||
|
else:
|
||||||
|
DisplayServer.window_set_mode(DisplayServer.WindowMode.WINDOW_MODE_WINDOWED)
|
||||||
|
|
||||||
|
func _on_btn_start_pressed() -> void:
|
||||||
|
$StartMenu/AnimationPlayer.play(\"fadeout\")
|
||||||
|
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||||
|
start_level(base)
|
||||||
|
|
||||||
|
$Timer.start()
|
||||||
|
|
||||||
|
func _on_animation_player_animation_finished(_anim_name: StringName) -> void:
|
||||||
|
$StartMenu.hide()
|
||||||
|
|
||||||
|
func _on_timer_timeout() -> void:
|
||||||
|
seconds_spent = snapped(seconds_spent + 0.10, 0.01)
|
||||||
|
|
||||||
|
var minutes = floor(seconds_spent / 60)
|
||||||
|
$TimerDisplay.text = (\"%0*d\" % [2, minutes]) + \":\" + (\"%0*.1f\" % [4, seconds_spent - (minutes * 60)])
|
||||||
|
"
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_0jegv"]
|
||||||
|
font_size = 32
|
||||||
|
shadow_size = 2
|
||||||
|
shadow_color = Color(0, 0, 0, 1)
|
||||||
|
shadow_offset = Vector2(0, 0)
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_nbp4i"]
|
||||||
|
font_size = 24
|
||||||
|
shadow_size = 2
|
||||||
|
shadow_color = Color(0, 0, 0, 1)
|
||||||
|
shadow_offset = Vector2(0, 0)
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_5jdmh"]
|
||||||
|
font_size = 20
|
||||||
|
shadow_size = 2
|
||||||
|
shadow_color = Color(0, 0, 0, 1)
|
||||||
|
shadow_offset = Vector2(0, 0)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_75r06"]
|
||||||
|
resource_name = "fadeout"
|
||||||
|
step = 0.5
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath(".:modulate")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_glb01"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath(".:modulate")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5cb2g"]
|
||||||
|
_data = {
|
||||||
|
"RESET": SubResource("Animation_glb01"),
|
||||||
|
"fadeout": SubResource("Animation_75r06")
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_0s07t"]
|
||||||
|
font_size = 64
|
||||||
|
outline_size = 10
|
||||||
|
outline_color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
[node name="Game" type="Node"]
|
[node name="Game" type="Node"]
|
||||||
|
script = SubResource("GDScript_8n212")
|
||||||
|
|
||||||
|
[node name="StartMenu" type="Control" parent="."]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="StartMenu"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0.546428, 0.471262, 0.491244, 1)
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="StartMenu"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="Presentation" type="MarginContainer" parent="StartMenu/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
theme_override_constants/margin_left = 20
|
||||||
|
theme_override_constants/margin_top = 20
|
||||||
|
theme_override_constants/margin_right = 20
|
||||||
|
theme_override_constants/margin_bottom = 20
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="StartMenu/VBoxContainer/Presentation"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Title" type="Label" parent="StartMenu/VBoxContainer/Presentation/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "DreamBall"
|
||||||
|
label_settings = SubResource("LabelSettings_0jegv")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="Title2" type="Label" parent="StartMenu/VBoxContainer/Presentation/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "A game about changing gravity to make a ball fly through the air"
|
||||||
|
label_settings = SubResource("LabelSettings_nbp4i")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="StartMenu/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
theme_override_constants/margin_left = 20
|
||||||
|
theme_override_constants/margin_top = 20
|
||||||
|
theme_override_constants/margin_right = 20
|
||||||
|
theme_override_constants/margin_bottom = 20
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="StartMenu/VBoxContainer/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
|
||||||
|
[node name="Rules" type="VBoxContainer" parent="StartMenu/VBoxContainer/MarginContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
alignment = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="StartMenu/VBoxContainer/MarginContainer/HBoxContainer/Rules"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "- Change the direction of the gravity with the ARROW KEYS"
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="StartMenu/VBoxContainer/MarginContainer/HBoxContainer/Rules"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "- Keep LEFT SHIFT pressed to make the gravity stronger"
|
||||||
|
|
||||||
|
[node name="Label3" type="Label" parent="StartMenu/VBoxContainer/MarginContainer/HBoxContainer/Rules"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "- Press ESCAPE to pause and unpause the game at any point"
|
||||||
|
|
||||||
|
[node name="Label4" type="Label" parent="StartMenu/VBoxContainer/MarginContainer/HBoxContainer/Rules"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "- Press R to restart the current level from the beginning
|
||||||
|
(note that it won't reset the timer!)"
|
||||||
|
|
||||||
|
[node name="Buttons" type="VBoxContainer" parent="StartMenu/VBoxContainer/MarginContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
alignment = 2
|
||||||
|
|
||||||
|
[node name="Label5" type="Label" parent="StartMenu/VBoxContainer/MarginContainer/HBoxContainer/Buttons"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Do your best to make the ball go through all the rings!"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="StartMenu/VBoxContainer/MarginContainer/HBoxContainer/Buttons"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 20
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="Btn_Fullscreen" type="Button" parent="StartMenu/VBoxContainer/MarginContainer/HBoxContainer/Buttons/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
action_mode = 0
|
||||||
|
text = "Toggle FULLSCREEN"
|
||||||
|
|
||||||
|
[node name="Btn_Start" type="Button" parent="StartMenu/VBoxContainer/MarginContainer/HBoxContainer/Buttons/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
text = "START the game!"
|
||||||
|
|
||||||
|
[node name="Notice" type="MarginContainer" parent="StartMenu/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/margin_left = 20
|
||||||
|
theme_override_constants/margin_top = 20
|
||||||
|
theme_override_constants/margin_right = 20
|
||||||
|
theme_override_constants/margin_bottom = 20
|
||||||
|
|
||||||
|
[node name="Title3" type="Label" parent="StartMenu/VBoxContainer/Notice"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Made during the 21st edition of Alakajam!"
|
||||||
|
label_settings = SubResource("LabelSettings_5jdmh")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="StartMenu"]
|
||||||
|
libraries = {
|
||||||
|
"": SubResource("AnimationLibrary_5cb2g")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Levels" type="Node" parent="."]
|
||||||
|
|
||||||
|
[node name="TimerDisplay" type="Label" parent="."]
|
||||||
|
anchors_preset = 2
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_top = -88.0
|
||||||
|
offset_right = 246.0
|
||||||
|
grow_vertical = 0
|
||||||
|
text = "00:00.0"
|
||||||
|
label_settings = SubResource("LabelSettings_0s07t")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 2
|
||||||
|
|
||||||
|
[node name="Timer" type="Timer" parent="."]
|
||||||
|
wait_time = 0.1
|
||||||
|
|
||||||
|
[connection signal="pressed" from="StartMenu/VBoxContainer/MarginContainer/HBoxContainer/Buttons/HBoxContainer/Btn_Fullscreen" to="." method="_on_btn_fullscreen_pressed"]
|
||||||
|
[connection signal="pressed" from="StartMenu/VBoxContainer/MarginContainer/HBoxContainer/Buttons/HBoxContainer/Btn_Start" to="." method="_on_btn_start_pressed"]
|
||||||
|
[connection signal="animation_finished" from="StartMenu/AnimationPlayer" to="." method="_on_animation_player_animation_finished"]
|
||||||
|
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
[gd_scene load_steps=6 format=3 uid="uid://b0mhosbyt1fit"]
|
[gd_scene load_steps=7 format=3 uid="uid://b0mhosbyt1fit"]
|
||||||
|
|
||||||
[ext_resource type="Material" uid="uid://brwwlwb1rpro7" path="res://levels/base/material.tres" id="1_dwsqy"]
|
[ext_resource type="Material" uid="uid://brwwlwb1rpro7" path="res://graphics/unhappy_material.tres" id="1_dwsqy"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ygvokp5f78i5" path="res://levels/base/environment.tscn" id="1_n7fd8"]
|
[ext_resource type="PackedScene" uid="uid://ygvokp5f78i5" path="res://levels/base/environment.tscn" id="1_n7fd8"]
|
||||||
|
[ext_resource type="Script" path="res://levels/level.gd" id="1_rj40i"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cnnvwotv33u1b" path="res://elements/player.tscn" id="2_b00jj"]
|
[ext_resource type="PackedScene" uid="uid://cnnvwotv33u1b" path="res://elements/player.tscn" id="2_b00jj"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cpm3laywhlbq5" path="res://elements/ring.tscn" id="3_hel5x"]
|
[ext_resource type="PackedScene" uid="uid://cpm3laywhlbq5" path="res://elements/ring.tscn" id="3_hel5x"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c77bli40240nk" path="res://elements/sign.tscn" id="4_atq6y"]
|
[ext_resource type="PackedScene" uid="uid://c77bli40240nk" path="res://elements/sign.tscn" id="4_atq6y"]
|
||||||
|
|
||||||
[node name="Level" type="Node3D"]
|
[node name="Base" type="Node3D"]
|
||||||
metadata/name = "base"
|
script = ExtResource("1_rj40i")
|
||||||
metadata/material = ExtResource("1_dwsqy")
|
metadata/material = ExtResource("1_dwsqy")
|
||||||
|
|
||||||
[node name="Environment" parent="." instance=ExtResource("1_n7fd8")]
|
[node name="Environment" parent="." instance=ExtResource("1_n7fd8")]
|
||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource("2_b00jj")]
|
[node name="Player" parent="." instance=ExtResource("2_b00jj")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 13.2075, 0)
|
||||||
|
|
||||||
[node name="Signs" type="Node3D" parent="."]
|
[node name="Signs" type="Node3D" parent="."]
|
||||||
transform = Transform3D(-1, 8.74228e-08, 0, -8.74228e-08, -1, 0, 0, 0, 1, -366.478, 20.7111, -61.4153)
|
transform = Transform3D(-1, 8.74228e-08, 0, -8.74228e-08, -1, 0, 0, 0, 1, -366.478, 20.7111, -61.4153)
|
||||||
|
@ -24,6 +26,13 @@ transform = Transform3D(-1, -8.74228e-08, 0, 8.74228e-08, -1, 0, 0, 0, 1, -366.4
|
||||||
text = "Press the arrow keys
|
text = "Press the arrow keys
|
||||||
to change the gravity!"
|
to change the gravity!"
|
||||||
|
|
||||||
|
[node name="Sign7" parent="Signs" instance=ExtResource("4_atq6y")]
|
||||||
|
transform = Transform3D(4.37114e-08, -7.10543e-15, -1, -8.74228e-08, -1, 0, -1, 8.74228e-08, -4.37114e-08, 150, 40, 61)
|
||||||
|
|
||||||
|
[node name="Text" parent="Signs/Sign7" index="0"]
|
||||||
|
text = "SLOW DOWN!!"
|
||||||
|
font_size = 2056
|
||||||
|
|
||||||
[node name="Sign2" parent="Signs" instance=ExtResource("4_atq6y")]
|
[node name="Sign2" parent="Signs" instance=ExtResource("4_atq6y")]
|
||||||
transform = Transform3D(-1, -8.74228e-08, 0, 8.74228e-08, -1, 0, 0, 0, 1, -234.9, 2.09808e-05, 0)
|
transform = Transform3D(-1, -8.74228e-08, 0, 8.74228e-08, -1, 0, 0, 0, 1, -234.9, 2.09808e-05, 0)
|
||||||
|
|
||||||
|
@ -43,7 +52,7 @@ transform = Transform3D(-4.37114e-08, 8.74228e-08, 1, 0, -1, 8.74228e-08, 1, 3.8
|
||||||
|
|
||||||
[node name="Text" parent="Signs/Sign5" index="0"]
|
[node name="Text" parent="Signs/Sign5" index="0"]
|
||||||
text = "The level is over once
|
text = "The level is over once
|
||||||
you get all rings!"
|
you get all the rings!"
|
||||||
|
|
||||||
[node name="Sign6" parent="Signs" instance=ExtResource("4_atq6y")]
|
[node name="Sign6" parent="Signs" instance=ExtResource("4_atq6y")]
|
||||||
transform = Transform3D(-0.707107, 6.18172e-08, 0.707107, -8.74228e-08, -1, 0, 0.707107, -6.18172e-08, 0.707107, -532.475, 18.0064, 60)
|
transform = Transform3D(-0.707107, 6.18172e-08, 0.707107, -8.74228e-08, -1, 0, 0.707107, -6.18172e-08, 0.707107, -532.475, 18.0064, 60)
|
||||||
|
@ -116,6 +125,7 @@ transform = Transform3D(0.0172464, 0.899835, 0, -0.899835, 0.0172464, 0, 0, 0, 0
|
||||||
transform = Transform3D(0.0114976, 0.59989, 0, -0.59989, 0.0114976, 0, 0, 0, 0.6, -414.274, 8.64172, 0)
|
transform = Transform3D(0.0114976, 0.59989, 0, -0.59989, 0.0114976, 0, 0, 0, 0.6, -414.274, 8.64172, 0)
|
||||||
|
|
||||||
[editable path="Signs/Sign"]
|
[editable path="Signs/Sign"]
|
||||||
|
[editable path="Signs/Sign7"]
|
||||||
[editable path="Signs/Sign2"]
|
[editable path="Signs/Sign2"]
|
||||||
[editable path="Signs/Sign4"]
|
[editable path="Signs/Sign4"]
|
||||||
[editable path="Signs/Sign5"]
|
[editable path="Signs/Sign5"]
|
||||||
|
|
24
levels/forest/environment.tscn
Normal file
24
levels/forest/environment.tscn
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://w4h8ip754qnb"]
|
||||||
|
|
||||||
|
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_clvpw"]
|
||||||
|
sky_top_color = Color(0, 0.504542, 0.579919, 1)
|
||||||
|
sky_horizon_color = Color(9.62615e-08, 0.776269, 0.496436, 1)
|
||||||
|
sky_curve = 0.219613
|
||||||
|
ground_bottom_color = Color(0.078119, 0.275869, 4.81308e-08, 1)
|
||||||
|
ground_horizon_color = Color(0.300489, 0.406247, 0.0024617, 1)
|
||||||
|
sun_angle_max = 224.83
|
||||||
|
sun_curve = 0.212132
|
||||||
|
|
||||||
|
[sub_resource type="Sky" id="Sky_8w3rf"]
|
||||||
|
sky_material = SubResource("ProceduralSkyMaterial_clvpw")
|
||||||
|
|
||||||
|
[sub_resource type="Environment" id="Environment_nda78"]
|
||||||
|
background_mode = 2
|
||||||
|
sky = SubResource("Sky_8w3rf")
|
||||||
|
sky_rotation = Vector3(0.0872665, 0.698132, 0.0872665)
|
||||||
|
ambient_light_source = 3
|
||||||
|
ambient_light_color = Color(1, 1, 1, 1)
|
||||||
|
reflected_light_source = 2
|
||||||
|
|
||||||
|
[node name="Environment" type="WorldEnvironment"]
|
||||||
|
environment = SubResource("Environment_nda78")
|
117
levels/forest/level.tscn
Normal file
117
levels/forest/level.tscn
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
[gd_scene load_steps=5 format=3 uid="uid://dfvuxfxc6ooya"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://w4h8ip754qnb" path="res://levels/forest/environment.tscn" id="1_7clrg"]
|
||||||
|
[ext_resource type="Script" path="res://levels/level.gd" id="1_fdxcj"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cnnvwotv33u1b" path="res://elements/player.tscn" id="2_mjogx"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cpm3laywhlbq5" path="res://elements/ring.tscn" id="4_p8yhq"]
|
||||||
|
|
||||||
|
[node name="Forest" type="Node3D"]
|
||||||
|
script = ExtResource("1_fdxcj")
|
||||||
|
|
||||||
|
[node name="Environment" parent="." instance=ExtResource("1_7clrg")]
|
||||||
|
|
||||||
|
[node name="Player" parent="." instance=ExtResource("2_mjogx")]
|
||||||
|
|
||||||
|
[node name="Rings" type="Node3D" parent="."]
|
||||||
|
|
||||||
|
[node name="Ring" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, -2, 0)
|
||||||
|
|
||||||
|
[node name="Ring2" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -3, 0)
|
||||||
|
|
||||||
|
[node name="Ring11" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 64.625, 0)
|
||||||
|
|
||||||
|
[node name="Ring26" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(20, 0, 0, 0, 20, 0, 0, 0, 20, -220.266, 264.294, 0)
|
||||||
|
|
||||||
|
[node name="Ring3" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-1.31134e-08, -0.3, 0, 0.3, -1.31134e-08, 0, 0, 0, 0.3, 5, -8, 0)
|
||||||
|
|
||||||
|
[node name="Ring4" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 4, -8, 0)
|
||||||
|
|
||||||
|
[node name="Ring5" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-1.31134e-08, -0.3, 0, 0.3, -1.31134e-08, 0, 0, 0, 0.3, 20, -4, 0)
|
||||||
|
|
||||||
|
[node name="Ring6" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 19, -4, 0)
|
||||||
|
|
||||||
|
[node name="Ring7" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-1.31134e-08, -0.3, 0, 0.3, -1.31134e-08, 0, 0, 0, 0.3, 39.2269, -8, 0)
|
||||||
|
|
||||||
|
[node name="Ring8" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 38.2269, -8, 0)
|
||||||
|
|
||||||
|
[node name="Ring9" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-1.31134e-08, -0.3, 0, 0.3, -1.31134e-08, 0, 0, 0, 0.3, 54.2269, -4, 0)
|
||||||
|
|
||||||
|
[node name="Ring10" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 53.227, -4, 0)
|
||||||
|
|
||||||
|
[node name="Ring12" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 78, 10, 0)
|
||||||
|
|
||||||
|
[node name="Ring14" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 42.708, 48.7486, 0)
|
||||||
|
|
||||||
|
[node name="Ring13" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 64.1634, 30.568, 0)
|
||||||
|
|
||||||
|
[node name="Ring15" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 9.73236, 65.3451, 0)
|
||||||
|
|
||||||
|
[node name="Ring16" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, -23.606, 88.7308, 0)
|
||||||
|
|
||||||
|
[node name="Ring17" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-8.74228e-08, -2, 0, 2, -8.74228e-08, 0, 0, 0, 2, -104.638, 112.884, 0)
|
||||||
|
|
||||||
|
[node name="Ring18" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-8.74228e-08, -2, 0, 2, -8.74228e-08, 0, 0, 0, 2, -452.906, 58.8928, 0)
|
||||||
|
|
||||||
|
[node name="Ring19" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-8.74228e-08, -2, 0, 2, -8.74228e-08, 0, 0, 0, 2, -742.534, 126.395, 0)
|
||||||
|
|
||||||
|
[node name="Ring20" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -1018.15, -27.6358, 0)
|
||||||
|
|
||||||
|
[node name="Ring21" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -1018.15, -66.5463, 0)
|
||||||
|
|
||||||
|
[node name="Ring22" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, -1018.15, -85.7121, 0)
|
||||||
|
|
||||||
|
[node name="Ring24" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-0.51303, -1.40954, 0, 1.40954, -0.51303, 0, 0, 0, 1.5, -1001.17, -87.6138, 0)
|
||||||
|
|
||||||
|
[node name="Ring25" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-3.0598e-08, -0.7, 0, 0.7, -3.0598e-08, 0, 0, 0, 0.7, -966.1, -87.6138, 0)
|
||||||
|
|
||||||
|
[node name="Ring27" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-5.24537e-08, -1.2, 0, 1.2, -5.24537e-08, 0, 0, 0, 1.2, -881.143, -72.4025, 0)
|
||||||
|
|
||||||
|
[node name="Ring28" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-5.24537e-08, -1.2, 0, 1.2, -5.24537e-08, 0, 0, 0, 1.2, -793.893, -58.0851, 0)
|
||||||
|
|
||||||
|
[node name="Ring29" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-5.24537e-08, -1.2, 0, 1.2, -5.24537e-08, 0, 0, 0, 1.2, -706.288, -35.6603, 0)
|
||||||
|
|
||||||
|
[node name="Ring30" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-5.24537e-08, -1.2, 0, 1.2, -5.24537e-08, 0, 0, 0, 1.2, -619.038, -21.3428, 0)
|
||||||
|
|
||||||
|
[node name="Ring31" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-5.24537e-08, -1.2, 0, 1.2, -5.24537e-08, 0, 0, 0, 1.2, -510.173, 3.82137, 0)
|
||||||
|
|
||||||
|
[node name="Ring32" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(-0.563606, -1.05941, 0, 1.05941, -0.563606, 0, 0, 0, 1.2, -416.969, 37.1114, 0)
|
||||||
|
|
||||||
|
[node name="Ring33" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(1.25802, 0.327712, 0, -0.327712, 1.25802, 0, 0, 0, 1.3, -289.057, 121.083, 0)
|
||||||
|
|
||||||
|
[node name="Ring34" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -218.208, 206.247, 0)
|
||||||
|
|
||||||
|
[node name="Ring23" parent="Rings" instance=ExtResource("4_p8yhq")]
|
||||||
|
transform = Transform3D(0.939693, 0.34202, 0, -0.34202, 0.939693, 0, 0, 0, 1, -1018.15, -96.9134, 0)
|
22
levels/level.gd
Normal file
22
levels/level.gd
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
extends Node3D
|
||||||
|
|
||||||
|
var rings_count = 72727
|
||||||
|
var finished_rings_count = 0
|
||||||
|
var rings: Array[Node] = []
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
var rings_node = get_node("Rings")
|
||||||
|
assert(is_instance_valid(rings_node), self.name + " has no rings!")
|
||||||
|
rings = rings_node.get_children()
|
||||||
|
rings_count = len(rings)
|
||||||
|
|
||||||
|
for ring in rings:
|
||||||
|
ring.connect("collect_signal", do_we_end_yet)
|
||||||
|
|
||||||
|
func do_we_end_yet():
|
||||||
|
finished_rings_count += 1
|
||||||
|
if finished_rings_count >= rings_count:
|
||||||
|
var game = get_parent().get_parent()
|
||||||
|
if is_instance_valid(game) and game.has_method("stop_level"):
|
||||||
|
game.stop_level()
|
|
@ -10,11 +10,11 @@ config_version=5
|
||||||
|
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="AlakajamEntry"
|
config/name="DreamBall"
|
||||||
config/description="I'm Taevas, and this is my entry for the 21st edition of \"Alakajam!\", a gamejam that lasts for 48 hours that starts on 2025-02-21 19:00UTC
|
config/description="I'm Taevas, and this is \"DreamBall\", my entry for the 21st edition of \"Alakajam!\", a gamejam that lasts for 48 hours and starts on 2025-02-21 19:00UTC
|
||||||
https://alakajam.com/21st-alakajam"
|
https://alakajam.com/21st-alakajam"
|
||||||
config/version="20250221.0"
|
config/version="20250222.0"
|
||||||
run/main_scene="res://levels/base/level.tscn"
|
run/main_scene="res://index.tscn"
|
||||||
config/features=PackedStringArray("4.3", "GL Compatibility")
|
config/features=PackedStringArray("4.3", "GL Compatibility")
|
||||||
boot_splash/show_image=false
|
boot_splash/show_image=false
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue