Update Level 1.tscn, Level 2.tscn, Level 3.tscn, and 9 more files

This commit is contained in:
Clevertop 2024-08-13 02:32:14 +10:00
parent f470efbe1f
commit 89cfa2882a
12 changed files with 204 additions and 112 deletions

View file

@ -1,7 +1,21 @@
[gd_scene load_steps=2 format=3 uid="uid://c6vhdhaji73sn"]
[gd_scene load_steps=4 format=3 uid="uid://c6vhdhaji73sn"]
[ext_resource type="PackedScene" uid="uid://bojbawyoy11i4" path="res://Levels/StartingRoom.tscn" id="1_qmnx5"]
[ext_resource type="MeshLibrary" uid="uid://cymdsgto88uty" path="res://meshLib.tres" id="2_a8pag"]
[ext_resource type="PackedScene" uid="uid://rom188edxcu6" path="res://end_zone.tscn" id="3_5y62x"]
[node name="Level1" type="Node3D"]
[node name="ChronoManager" parent="." instance=ExtResource("1_qmnx5")]
level_name = "Level 1
A Small Hop"
[node name="GridMap" type="GridMap" parent="."]
mesh_library = ExtResource("2_a8pag")
cell_size = Vector3(1, 1, 1)
data = {
"cells": PackedInt32Array(65535, 65529, 1, 0, 65529, 1, 0, 65528, 1, 65535, 65528, 1, 65535, 65527, 1, 0, 65527, 1, 65535, 65526, 196609, 65535, 65525, 196609, 65535, 65524, 196609, 65535, 65523, 196609, 65535, 65522, 196609, 65535, 65521, 196609, 65535, 65520, 196609, 0, 65520, 196609, 0, 65521, 196609, 0, 65522, 196609, 0, 65523, 196609, 0, 65524, 196609, 0, 65525, 196609, 0, 65526, 196609, 65535, 65517, 196609, 0, 65517, 196609, 0, 65516, 196609, 0, 65515, 196609, 0, 65514, 196609, 0, 65513, 196609, 0, 65512, 196609, 65535, 65512, 196609, 65535, 65513, 196609, 65535, 65514, 196609, 65535, 65515, 196609, 65535, 65516, 196609, 65535, 65510, 196610, 0, 65510, 196610, 0, 65511, 196610, 65535, 65511, 196610)
}
[node name="EndZone" parent="." instance=ExtResource("3_5y62x")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, -25)

22
Levels/Level 2.tscn Normal file
View file

@ -0,0 +1,22 @@
[gd_scene load_steps=4 format=3 uid="uid://ddcwsfa8nhmtf"]
[ext_resource type="PackedScene" uid="uid://bojbawyoy11i4" path="res://Levels/StartingRoom.tscn" id="1_rb7ph"]
[ext_resource type="MeshLibrary" uid="uid://cymdsgto88uty" path="res://meshLib.tres" id="2_52atl"]
[ext_resource type="PackedScene" uid="uid://rom188edxcu6" path="res://end_zone.tscn" id="3_c33yl"]
[node name="Level2" type="Node3D"]
[node name="ChronoManager" parent="." instance=ExtResource("1_rb7ph")]
level_name = "Level 2
Hop, Skip, and Jump"
[node name="GridMap" type="GridMap" parent="."]
mesh_library = ExtResource("2_52atl")
cell_size = Vector3(1, 1, 1)
data = {
"cells": PackedInt32Array(65535, 65529, 196609, 0, 65529, 196609, 0, 65528, 196609, 65535, 65528, 196609, 65535, 65527, 196609, 0, 65527, 196609, 65535, 65526, 196609, 0, 65526, 196609, 1, 65527, 196609, 1, 65526, 196609, 2, 65526, 196609, 2, 65527, 196609, 3, 65527, 196609, 3, 65526, 196609, 4, 65526, 196609, 4, 65527, 196609, 5, 65526, 196609, 5, 65527, 196609, 6, 65527, 196609, 6, 65526, 196609, 7, 65526, 196609, 7, 65527, 196609, 8, 65527, 196609, 8, 65526, 196609, 9, 65527, 196609, 9, 65526, 196609, 8, 65525, 196609, 8, 65524, 196609, 9, 65524, 196609, 9, 65525, 196609, 196617, 65521, 196609, 196616, 65521, 196609, 196616, 65520, 196609, 196617, 65520, 196609, 393225, 65517, 196609, 393224, 65517, 196609, 393224, 65516, 196609, 393225, 65516, 196609, 393223, 65517, 196609, 393223, 65516, 196609, 393222, 65516, 196609, 393222, 65517, 196609, 393221, 65517, 196609, 393221, 65516, 196609, 393220, 65516, 196609, 393220, 65517, 196609, 393219, 65517, 196609, 393219, 65516, 196609, 393218, 65516, 196609, 393218, 65517, 196609, 917506, 65516, 196610, 917506, 65517, 196610, 917507, 65517, 196610, 917507, 65516, 196610)
}
metadata/_editor_floor_ = Vector3(0, 14, 0)
[node name="EndZone" parent="." instance=ExtResource("3_c33yl")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 3, 13, -19)

21
Levels/Level 3.tscn Normal file
View file

@ -0,0 +1,21 @@
[gd_scene load_steps=4 format=3 uid="uid://cmgi52e2brlab"]
[ext_resource type="PackedScene" uid="uid://bojbawyoy11i4" path="res://Levels/StartingRoom.tscn" id="1_i6exp"]
[ext_resource type="MeshLibrary" uid="uid://cymdsgto88uty" path="res://meshLib.tres" id="2_2kcfj"]
[ext_resource type="PackedScene" uid="uid://rom188edxcu6" path="res://end_zone.tscn" id="3_okds4"]
[node name="Level3" type="Node3D"]
[node name="ChronoManager" parent="." instance=ExtResource("1_i6exp")]
level_name = "Level 3
Not enough time"
[node name="GridMap" type="GridMap" parent="."]
mesh_library = ExtResource("2_2kcfj")
cell_size = Vector3(1, 1, 1)
data = {
"cells": PackedInt32Array(65535, 65529, 1, 0, 65529, 1, 0, 65528, 1, 65535, 65528, 1, 65535, 65527, 1, 0, 65527, 1, 65535, 65526, 196609, 65535, 65525, 196609, 65535, 65524, 196609, 65535, 65523, 196609, 65535, 65522, 196609, 65535, 65521, 196609, 65535, 65520, 196609, 0, 65520, 196609, 0, 65521, 196609, 0, 65522, 196609, 0, 65523, 196609, 0, 65524, 196609, 0, 65525, 196609, 0, 65526, 196609, 1, 65520, 196609, 1, 65521, 196609, 2, 65520, 196609, 2, 65521, 196609, 3, 65520, 196609, 3, 65521, 196609, 4, 65520, 196609, 4, 65521, 196609, 5, 65520, 196609, 5, 65521, 196609, 6, 65520, 196609, 6, 65521, 196609, 7, 65520, 196609, 7, 65521, 196609, 8, 65520, 196609, 8, 65521, 196609, 9, 65520, 196609, 9, 65521, 196609, 14, 65530, 196609, 15, 65530, 196609, 14, 65520, 196609, 14, 65521, 196609, 14, 65522, 196609, 14, 65523, 196609, 14, 65524, 196609, 14, 65525, 196609, 14, 65526, 196609, 14, 65527, 196609, 14, 65528, 196609, 14, 65529, 196609, 15, 65520, 196609, 15, 65521, 196609, 15, 65522, 196609, 15, 65523, 196609, 15, 65524, 196609, 15, 65525, 196609, 15, 65526, 196609, 15, 65527, 196609, 15, 65528, 196609, 15, 65529, 196609, 13, 65521, 196609, 13, 65520, 196609, 12, 65520, 196609, 11, 65520, 196609, 10, 65520, 196609, 10, 65521, 196609, 11, 65521, 196609, 12, 65521, 196609, 14, 65531, 196609, 14, 65532, 196609, 14, 65533, 196609, 14, 65534, 196609, 14, 65535, 196609, 14, 0, 196609, 14, 1, 196609, 14, 2, 196609, 14, 3, 196609, 14, 4, 196609, 14, 5, 196609, 14, 6, 196609, 14, 7, 196609, 14, 8, 196609, 14, 9, 196609, 14, 10, 196609, 15, 65531, 196609, 15, 65532, 196609, 15, 65533, 196609, 15, 65534, 196609, 15, 65535, 196609, 15, 0, 196609, 15, 1, 196609, 15, 2, 196609, 15, 3, 196609, 15, 4, 196609, 15, 5, 196609, 15, 6, 196609, 15, 7, 196609, 15, 8, 196609, 15, 9, 196609, 15, 10, 196609, 3, 14, 196609, 3, 15, 196609, 4, 14, 196609, 4, 15, 196609, 5, 14, 196609, 5, 15, 196609, 6, 14, 196609, 6, 15, 196609, 7, 14, 196609, 7, 15, 196609, 8, 14, 196609, 8, 15, 196609, 9, 14, 196609, 9, 15, 196609, 10, 14, 196609, 10, 15, 196609, 11, 14, 196609, 11, 15, 196609, 12, 14, 196609, 12, 15, 196609, 13, 14, 196609, 13, 15, 196609, 14, 14, 196609, 14, 15, 196609, 15, 14, 196609, 15, 15, 196609, 14, 11, 196609, 14, 12, 196609, 14, 13, 196609, 15, 11, 196609, 15, 12, 196609, 15, 13, 196609, 65535, 14, 196609, 65535, 15, 196609, 0, 14, 196609, 0, 15, 196609, 1, 14, 196609, 1, 15, 196609, 2, 14, 196609, 2, 15, 196609, 65535, 8, 196610, 65535, 9, 196610, 65535, 10, 196609, 65535, 11, 196609, 65535, 12, 196609, 65535, 13, 196609, 0, 8, 196610, 0, 9, 196610, 0, 10, 196609, 0, 11, 196609, 0, 12, 196609, 0, 13, 196609)
}
[node name="EndZone" parent="." instance=ExtResource("3_okds4")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 9)

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,7 @@ signal tick(time : int)
@export_group("Variables")
@export var level_tick : float = 1 # how often to run a command
@export var level_time : float = 10 # the amoutn of time allowed for the level
@export var level_name : String = "Level X\nTest Room"
@export_multiline var level_name : String = "Level X\nTest Room"
#reset these
var tick_timer : float = 0
@ -172,6 +172,4 @@ func _on_player_object_clicked(object):
start_room()
func _on_area_3d_body_entered(body):
if body.name == "Player":
GameManager.load_next_level()

16
Scripts/end_zone.gd Normal file
View file

@ -0,0 +1,16 @@
extends MeshInstance3D
# 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_area_3d_body_entered(body):
if body.name == "Player":
GameManager.load_next_level()

View file

@ -9,6 +9,7 @@ var credits_shown : bool = false
# Called when the node enters the scene tree for the first time.
func _ready():
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
for level_num in GameManager.levels.size():
var new_button : Button = Button.new()
new_button.text = "Level " + str(level_num) + " : " + GameManager.levels[level_num].level_name
@ -31,9 +32,10 @@ func _process(delta):
func pick_level(picked_level:String):
for level in GameManager.levels:
if level.level_name == picked_level:
get_tree().change_scene_to_file(level.level_path)
for level_num in GameManager.levels.size():
if GameManager.levels[level_num].level_name == picked_level:
get_tree().change_scene_to_file(GameManager.levels[level_num].level_path)
GameManager.current_level = level_num
func _on_credits_button_pressed():
credits_shown = !credits_shown

23
end_zone.tscn Normal file
View file

@ -0,0 +1,23 @@
[gd_scene load_steps=5 format=3 uid="uid://rom188edxcu6"]
[ext_resource type="Script" path="res://Scripts/end_zone.gd" id="1_nl6pe"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_itc1d"]
transparency = 1
albedo_color = Color(0, 0.672276, 0, 0.439216)
[sub_resource type="BoxMesh" id="BoxMesh_lcav8"]
material = SubResource("StandardMaterial3D_itc1d")
[sub_resource type="BoxShape3D" id="BoxShape3D_y4l56"]
[node name="EndZone" type="MeshInstance3D"]
mesh = SubResource("BoxMesh_lcav8")
script = ExtResource("1_nl6pe")
[node name="Area3D" type="Area3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
shape = SubResource("BoxShape3D_y4l56")
[connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"]

View file

@ -17,6 +17,7 @@ func _process(delta):
func load_next_level():
if current_level+1 < levels.size():
get_tree().change_scene_to_file(levels[current_level+1].level_path)
current_level += 1
else:
print("end of game reached!")
get_tree().change_scene_to_file(menu_scene_path)

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=5 format=3 uid="uid://d387n4cp3duhn"]
[gd_scene load_steps=7 format=3 uid="uid://d387n4cp3duhn"]
[ext_resource type="Script" path="res://game_manager.gd" id="1_rsuf4"]
[ext_resource type="Script" path="res://Scripts/level_res.gd" id="2_w2hey"]
@ -13,8 +13,18 @@ script = ExtResource("2_w2hey")
level_path = "res://Levels/Level 1.tscn"
level_name = "A Small Hop"
[sub_resource type="Resource" id="Resource_yde0b"]
script = ExtResource("2_w2hey")
level_path = "res://Levels/Level 2.tscn"
level_name = "Hop, Skip, and Jump"
[sub_resource type="Resource" id="Resource_5anvy"]
script = ExtResource("2_w2hey")
level_path = "res://Levels/Level 3.tscn"
level_name = "Not enough time"
[node name="GameManager" type="Node"]
script = ExtResource("1_rsuf4")
levels = Array[ExtResource("2_w2hey")]([SubResource("Resource_rp7k0"), SubResource("Resource_vs5fw")])
menu_scene_path = "res://Scripts/menu.gd"
levels = Array[ExtResource("2_w2hey")]([SubResource("Resource_rp7k0"), SubResource("Resource_vs5fw"), SubResource("Resource_yde0b"), SubResource("Resource_5anvy")])
menu_scene_path = "res://menu.tscn"
sandbox_scene_path = "res://Levels/StartingRoom.tscn"

81
meshLib.tres Normal file
View file

@ -0,0 +1,81 @@
[gd_resource type="MeshLibrary" load_steps=16 format=3 uid="uid://cymdsgto88uty"]
[ext_resource type="Material" uid="uid://cr4ra7ijk1uec" path="res://Assets/Materials/floor.tres" id="1_ln85f"]
[ext_resource type="Texture2D" uid="uid://c1fesrqdpjloa" path="res://Assets/Textures/ice_0_old.png" id="2_lywlx"]
[ext_resource type="Texture2D" uid="uid://dd150xco2ee5q" path="res://Assets/Textures/cobalt_stone_4.png" id="3_x7qro"]
[ext_resource type="Texture2D" uid="uid://bb8771vptn2l8" path="res://Assets/Textures/transparent_wall_new.png" id="4_c7kss"]
[sub_resource type="BoxMesh" id="BoxMesh_21vdj"]
material = ExtResource("1_ln85f")
[sub_resource type="BoxShape3D" id="BoxShape3D_nndy8"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_itvfy"]
albedo_texture = ExtResource("2_lywlx")
emission = Color(1, 1, 1, 1)
subsurf_scatter_strength = 1.0
uv1_scale = Vector3(3, 2, 1)
uv1_triplanar_sharpness = 0.0583145
uv2_triplanar_sharpness = 0.170755
texture_filter = 0
[sub_resource type="BoxMesh" id="BoxMesh_whsfn"]
material = SubResource("StandardMaterial3D_itvfy")
[sub_resource type="BoxShape3D" id="BoxShape3D_okvc0"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_6y00s"]
albedo_texture = ExtResource("3_x7qro")
emission = Color(1, 1, 1, 1)
subsurf_scatter_strength = 1.0
uv1_scale = Vector3(3, 2, 1)
uv1_triplanar_sharpness = 0.0583145
uv2_triplanar_sharpness = 0.170755
texture_filter = 0
[sub_resource type="BoxMesh" id="BoxMesh_w6oj5"]
material = SubResource("StandardMaterial3D_6y00s")
[sub_resource type="BoxShape3D" id="BoxShape3D_s1o2h"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jttjt"]
transparency = 1
albedo_color = Color(1, 1, 1, 0.533333)
albedo_texture = ExtResource("4_c7kss")
emission = Color(1, 1, 1, 1)
subsurf_scatter_strength = 1.0
uv1_scale = Vector3(3, 2, 1)
uv1_triplanar_sharpness = 0.0583145
uv2_triplanar_sharpness = 0.170755
texture_filter = 0
[sub_resource type="BoxMesh" id="BoxMesh_wb4dr"]
material = SubResource("StandardMaterial3D_jttjt")
[sub_resource type="BoxShape3D" id="BoxShape3D_26jet"]
[resource]
item/0/name = "stone square grey"
item/0/mesh = SubResource("BoxMesh_21vdj")
item/0/mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/0/shapes = [SubResource("BoxShape3D_nndy8"), Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)]
item/0/navigation_mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/0/navigation_layers = 1
item/1/name = "ice"
item/1/mesh = SubResource("BoxMesh_whsfn")
item/1/mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/1/shapes = [SubResource("BoxShape3D_okvc0"), Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)]
item/1/navigation_mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/1/navigation_layers = 1
item/2/name = "cobalt stone"
item/2/mesh = SubResource("BoxMesh_w6oj5")
item/2/mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/2/shapes = [SubResource("BoxShape3D_s1o2h"), Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)]
item/2/navigation_mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/2/navigation_layers = 1
item/3/name = "transparent wall"
item/3/mesh = SubResource("BoxMesh_wb4dr")
item/3/mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/3/shapes = [SubResource("BoxShape3D_26jet"), Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)]
item/3/navigation_mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/3/navigation_layers = 1

View file

@ -11,7 +11,7 @@ config_version=5
[application]
config/name="Chrono Chamber"
run/main_scene="res://Levels/StartingRoom.tscn"
run/main_scene="res://menu.tscn"
config/features=PackedStringArray("4.2", "Forward Plus")
config/icon="res://icon.svg"