diff --git a/engine.cfg b/engine.cfg index 75a30e6..31a0d3c 100644 --- a/engine.cfg +++ b/engine.cfg @@ -1,7 +1,7 @@ [application] name="sanic-gaiden" -main_scene="res://scenes/main.scn" +main_scene="res://scenes/main.tscn" icon="icon.png" [autoload] diff --git a/scenes/camera.scn b/scenes/camera.scn deleted file mode 100644 index 696bc0d..0000000 Binary files a/scenes/camera.scn and /dev/null differ diff --git a/scenes/camera.tscn b/scenes/camera.tscn new file mode 100644 index 0000000..c5c0e10 --- /dev/null +++ b/scenes/camera.tscn @@ -0,0 +1,25 @@ +[gd_scene load_steps=2 format=1] + +[ext_resource path="res://scripts/camera.gd" type="Script" id=1] + +[node name="camera" type="Spatial"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +script/script = ExtResource( 1 ) +__meta__ = { "__editor_plugin_screen__":"Script" } + +[node name="Camera" type="Camera" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +projection = 0 +fov = 60.0 +near = 0.1 +far = 100.0 +keep_aspect = 1 +current = true +visible_layers = 1048575 +environment = null +h_offset = 0.0 +v_offset = 0.0 + + diff --git a/scenes/fade.scn b/scenes/fade.scn deleted file mode 100644 index 4cdde32..0000000 Binary files a/scenes/fade.scn and /dev/null differ diff --git a/scenes/fade.tscn b/scenes/fade.tscn new file mode 100644 index 0000000..85b8c8f --- /dev/null +++ b/scenes/fade.tscn @@ -0,0 +1,47 @@ +[gd_scene load_steps=5 format=1] + +[ext_resource path="res://assets/images/black.png" type="Texture" id=1] +[ext_resource path="res://scripts/fade_resize.gd" type="Script" id=2] + +[sub_resource type="Animation" id=1] + +resource/name = "FadeIn" +length = 2.0 +loop = false +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:visibility/opacity") +tracks/0/interp = 2 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] } + +[sub_resource type="Animation" id=2] + +resource/name = "idle" +length = 1.0 +loop = false +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:visibility/opacity") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 1.0 ] } + +[node name="fade" type="Sprite"] + +transform/scale = Vector2( 100, 100 ) +texture = ExtResource( 1 ) +script/script = ExtResource( 2 ) +__meta__ = { "__editor_plugin_screen__":"2D" } + +[node name="animation" type="AnimationPlayer" parent="."] + +playback/process_mode = 0 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/FadeIn = SubResource( 1 ) +anims/idle = SubResource( 2 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "" + + diff --git a/scenes/hud.scn b/scenes/hud.scn deleted file mode 100644 index d5c6893..0000000 Binary files a/scenes/hud.scn and /dev/null differ diff --git a/scenes/hud.tscn b/scenes/hud.tscn new file mode 100644 index 0000000..af4833a --- /dev/null +++ b/scenes/hud.tscn @@ -0,0 +1,58 @@ +[gd_scene load_steps=2 format=1] + +[ext_resource path="res://scripts/hud.gd" type="Script" id=1] + +[node name="hud" type="Node2D"] + +script/script = ExtResource( 1 ) +__meta__ = { "__editor_plugin_screen__":"Script" } + +[node name="score" type="Label" parent="."] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 14.0 +margin/top = 15.0 +margin/right = 99.0 +margin/bottom = 32.0 +custom_constants/shadow_offset_x = 1 +custom_constants/shadow_offset_y = 1 +text = "Score: " +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="time" type="Label" parent="."] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 14.0 +margin/top = 36.0 +margin/right = 99.0 +margin/bottom = 53.0 +custom_constants/shadow_offset_x = 1 +custom_constants/shadow_offset_y = 1 +text = "Time: " +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="rings" type="Label" parent="."] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 15.0 +margin/top = 60.0 +margin/right = 100.0 +margin/bottom = 77.0 +custom_constants/shadow_offset_x = 1 +custom_constants/shadow_offset_y = 1 +text = "Rings: " +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + + diff --git a/scenes/levels/test_level0.scn b/scenes/levels/test_level0.scn deleted file mode 100644 index 5c95210..0000000 Binary files a/scenes/levels/test_level0.scn and /dev/null differ diff --git a/scenes/levels/test_level0.tscn b/scenes/levels/test_level0.tscn new file mode 100644 index 0000000..56c2234 --- /dev/null +++ b/scenes/levels/test_level0.tscn @@ -0,0 +1,768 @@ +[gd_scene load_steps=14 format=1] + +[ext_resource path="res://assets/outdoor_environment.res" type="Environment" id=1] +[ext_resource path="res://scenes/player.tscn" type="PackedScene" id=2] +[ext_resource path="res://assets/materials/tiled_grass_5x5.mtl" type="Material" id=3] +[ext_resource path="res://assets/materials/tiled_wall_5x1.mtl" type="Material" id=4] +[ext_resource path="res://assets/models/ring/ring.scn" type="PackedScene" id=5] +[ext_resource path="res://assets/music/glitter_gulch_fast.ogg" type="AudioStream" id=6] +[ext_resource path="res://assets/models/basketball/basketball.scn" type="PackedScene" id=7] +[ext_resource path="res://assets/models/hoop/hoop.scn" type="PackedScene" id=8] +[ext_resource path="res://assets/models/door/door.scn" type="PackedScene" id=9] + +[sub_resource type="BoxShape" id=1] + +extents = Vector3( 20, 1, 20 ) + +[sub_resource type="BoxShape" id=2] + +extents = Vector3( 2, 1, 10 ) + +[sub_resource type="BoxShape" id=3] + +extents = Vector3( 20, 1, 3 ) + +[sub_resource type="BoxShape" id=4] + +extents = Vector3( 4, 1, 2 ) + +[node name="level" type="Spatial"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +__meta__ = { "__editor_plugin_screen__":"3D" } + +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +environment = ExtResource( 1 ) + +[node name="DirectionalLight" type="DirectionalLight" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 0.901027, 0.34787, -0.259107, 0.0391964, 0.529606, 0.847338, 0.431988, -0.77363, 0.463554, 0, 19.8694, 7.36385 ) +layers = 1 +params/enabled = true +params/editor_only = false +params/bake_mode = 0 +params/energy = 1.0 +colors/diffuse = Color( 1, 1, 1, 1 ) +colors/specular = Color( 1, 1, 1, 1 ) +shadow/shadow = false +shadow/darkening = 0.0 +shadow/z_offset = 0.05 +shadow/z_slope_scale = 0.0 +shadow/esm_multiplier = 60.0 +shadow/blur_passes = 1.0 +projector = null +operator = 0 +shadow/mode = 0 +shadow/max_distance = 0.0 +shadow/split_weight = 0.5 +shadow/zoffset_scale = 2.0 + +[node name="player" parent="." instance=ExtResource( 2 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10.151, 10.2358 ) + +[node name="ground" type="Spatial" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="StaticBody" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = ExtResource( 3 ) +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody 2" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 0.851788, -0.523887, 0, 0.523887, 0.851788, 0, 5.29057, -8.79781 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 2 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody 2"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 2, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody 2"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 2 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody1" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10.4217, -19.5429 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody1"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody1"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 3 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody2" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( -4.22462e-08, 0.256743, -0.96648, 1.12226e-08, 0.96648, 0.256743, 1, 0, -4.37114e-08, -18.0864, 11.3536, -2.90895 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody2"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 1.42109e-14, 0, 1, 0, 0, 0, 3, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody2"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 3 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody3" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( -4.18287e-08, 0.256743, -0.96648, 3.2038e-07, -0.96648, -0.256743, -1, -3.2038e-07, -4.18287e-08, 18.0864, 11.3536, -2.90895 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody3"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody3"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 3 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody4" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6.04093, 33.5933 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody4"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 4, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody4"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 4 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody5" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 0.811873, 0.184032, 0.554071, -0.214186, 0.976736, -0.0105737, -0.543127, -0.11009, 0.832402, 12.6325, 13.3384, 24.4351 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody5"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 4, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody5"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 4 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody6" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -31.9791, 47.9768 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody6"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 4, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody6"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 4 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody7" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 0.811872, -0.184032, -0.554072, 0.227913, 0.973624, 0.0105738, 0.537512, -0.134865, 0.832402, -12.6325, 13.3384, 24.4351 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody7"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 4, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody7"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 4 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody8" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 3.10979, -20.2678 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody8"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = ExtResource( 4 ) +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody8"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 3 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody9" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( -4.37114e-08, -1, 3.49066e-08, -4.37114e-08, -3.49066e-08, -1, 1, -4.37114e-08, -4.37114e-08, 20.2891, 3.10979, 0.206659 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody9"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = ExtResource( 4 ) +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody9"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 3 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody10" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( -4.37114e-08, -1, 3.49066e-08, -4.37114e-08, -3.49066e-08, -1, 1, -4.37114e-08, -4.37114e-08, -20.5196, 3.10979, 0.206659 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody10"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = ExtResource( 4 ) +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody10"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 3 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody11" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 3.10979, 20.3113 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody11"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = ExtResource( 4 ) +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody11"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 3 ) +trigger = false +_update_shape_index = 0 + +[node name="rings" type="Spatial" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="ring" parent="rings" instance=ExtResource( 5 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -9.19301, 2.56942, -2.92974 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring1" parent="rings" instance=ExtResource( 5 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -11.3172, 2.56942, 1.11646 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring2" parent="rings" instance=ExtResource( 5 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -11.9623, 2.56942, 5.69819 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring3" parent="rings" instance=ExtResource( 5 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -11.3233, 2.56942, 10.6112 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring4" parent="rings" instance=ExtResource( 5 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -9.40466, 2.56942, 14.7629 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring5" parent="rings" instance=ExtResource( 5 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 11.3233, 2.56942, 10.6112 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring5 2" parent="rings" instance=ExtResource( 5 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 9.19301, 2.56942, -2.92974 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring5 3" parent="rings" instance=ExtResource( 5 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 11.9623, 2.56942, 5.69819 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring5 4" parent="rings" instance=ExtResource( 5 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 11.3172, 2.56942, 1.11646 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring5 5" parent="rings" instance=ExtResource( 5 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 9.40466, 2.56942, 14.7629 ) +collision/layers = 1 +collision/mask = 1 + +[node name="StreamPlayer" type="StreamPlayer" parent="."] + +stream/stream = ExtResource( 6 ) +stream/play = true +stream/loop = true +stream/volume_db = 0.0 +stream/autoplay = true +stream/paused = false +stream/loop_restart_time = 0.0 +stream/buffering_ms = 500 + +[node name="basketballs" type="Spatial" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="basketball" parent="basketballs" instance=ExtResource( 7 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 8.75609, 2.33693, 8.70398 ) +collision/layers = 1 +collision/mask = 1 + +[node name="basketball1" parent="basketballs" instance=ExtResource( 7 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -9.14234, 24.0169, 15.8533 ) +collision/layers = 1 +collision/mask = 1 + +[node name="basketball2" parent="basketballs" instance=ExtResource( 7 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -19.2903, 13.8257, -6.10044 ) +collision/layers = 1 +collision/mask = 1 + +[node name="basketball3" parent="basketballs" instance=ExtResource( 7 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 14.4051, -14.0625 ) +collision/layers = 1 +collision/mask = 1 + +[node name="hoop" parent="." instance=ExtResource( 8 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 13.8818, 2.03781, -3.47678 ) +collision/layers = 1 +collision/mask = 1 + +[node name="door" parent="." instance=ExtResource( 9 )] + +transform/local = Transform( 0.762111, 0, 0.647446, 0, 1, 0, -0.647446, 0, 0.762111, -8.42822, 1.08609, 0 ) + +[node name="initial_cam_pos" type="Position3D" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.9537, 35.8794 ) + +[node name="initial_cam_look" type="Position3D" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.713411, 13.9988 ) + + diff --git a/scenes/levels/test_level1.scn b/scenes/levels/test_level1.scn deleted file mode 100644 index 5e0b8ad..0000000 Binary files a/scenes/levels/test_level1.scn and /dev/null differ diff --git a/scenes/levels/test_level1.tscn b/scenes/levels/test_level1.tscn new file mode 100644 index 0000000..0d9a5f1 --- /dev/null +++ b/scenes/levels/test_level1.tscn @@ -0,0 +1,531 @@ +[gd_scene load_steps=7 format=1] + +[ext_resource path="res://scenes/player.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/models/ring/ring.scn" type="PackedScene" id=2] + +[sub_resource type="BoxShape" id=1] + +extents = Vector3( 20, 1, 20 ) + +[sub_resource type="BoxShape" id=2] + +extents = Vector3( 2, 1, 10 ) + +[sub_resource type="BoxShape" id=3] + +extents = Vector3( 20, 1, 3 ) + +[sub_resource type="BoxShape" id=4] + +extents = Vector3( 4, 1, 2 ) + +[node name="level" type="Spatial"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +__meta__ = { "__editor_plugin_screen__":"3D" } + +[node name="DirectionalLight" type="DirectionalLight" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 0.901027, 0.34787, -0.259107, 0.0391964, 0.529606, 0.847338, 0.431988, -0.77363, 0.463554, 0, 19.8694, 7.36385 ) +layers = 1 +params/enabled = true +params/editor_only = false +params/bake_mode = 0 +params/energy = 1.0 +colors/diffuse = Color( 1, 1, 1, 1 ) +colors/specular = Color( 1, 1, 1, 1 ) +shadow/shadow = false +shadow/darkening = 0.0 +shadow/z_offset = 0.05 +shadow/z_slope_scale = 0.0 +shadow/esm_multiplier = 60.0 +shadow/blur_passes = 1.0 +projector = null +operator = 0 +shadow/mode = 0 +shadow/max_distance = 0.0 +shadow/split_weight = 0.5 +shadow/zoffset_scale = 2.0 + +[node name="player" parent="." instance=ExtResource( 1 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10.151, 10.2358 ) + +[node name="ground" type="Spatial" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="StaticBody" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody 2" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 0.851788, -0.523887, 0, 0.523887, 0.851788, -0.194206, 5.29057, -8.79781 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 2 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -12.8304, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody 2"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 2, 0, 0, 0, 1, 0, 0, 0, 10, -12.8347, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody 2"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -12.8304, 0, 0 ) +shape = SubResource( 2 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody1" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10.4217, -19.5429 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody1"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody1"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 3 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody2" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( -4.22462e-08, 0.256743, -0.96648, 1.12226e-08, 0.96648, 0.256743, 1, 0, -4.37114e-08, -18.0864, 11.3536, -2.90895 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody2"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody2"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 3 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody3" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( -4.18287e-08, 0.256743, -0.96648, 3.2038e-07, -0.96648, -0.256743, -1, -3.2038e-07, -4.18287e-08, 18.0864, 11.3536, -2.90895 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody3"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody3"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 3 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody4" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6.04093, 33.5933 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody4"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 4, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody4"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 4 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody5" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 0.811873, 0.184032, 0.554071, -0.214186, 0.976736, -0.0105737, -0.543127, -0.11009, 0.832402, 12.6325, 13.3384, 24.4351 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody5"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 4, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody5"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 4 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody6" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -31.9791, 47.9768 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody6"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 4, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody6"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 4 ) +trigger = false +_update_shape_index = 0 + +[node name="StaticBody7" type="StaticBody" parent="ground"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 0.811872, -0.184032, -0.554072, 0.227913, 0.973624, 0.0105738, 0.537512, -0.134865, 0.832402, -12.6325, 13.3384, 24.4351 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="TestCube" type="TestCube" parent="ground/StaticBody7"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 4, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0 ) +layers = 1 +geometry/visible = true +geometry/material_override = null +geometry/cast_shadow = 1 +geometry/receive_shadows = true +geometry/range_begin = 0.0 +geometry/range_end = 0.0 +geometry/extra_cull_margin = 0.0 +geometry/billboard = false +geometry/billboard_y = false +geometry/depth_scale = false +geometry/visible_in_all_rooms = false +geometry/use_baked_light = false +geometry/baked_light_tex_id = 0 + +[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody7"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 4 ) +trigger = false +_update_shape_index = 0 + +[node name="rings" type="Spatial" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +__meta__ = { "_editor_collapsed":true } + +[node name="ring" parent="rings" instance=ExtResource( 2 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -17.233, 13.6207, -2.92974 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring1" parent="rings" instance=ExtResource( 2 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -17.4031, 13.4537, 1.11646 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring2" parent="rings" instance=ExtResource( 2 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3.59764, 2.56942, 5.69819 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring3" parent="rings" instance=ExtResource( 2 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3.93832, 2.56942, 5.381 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring4" parent="rings" instance=ExtResource( 2 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -12.768, 7.29263, -7.88639 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring5" parent="rings" instance=ExtResource( 2 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 11.3233, 2.56942, -11.5519 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring5 2" parent="rings" instance=ExtResource( 2 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 8.81797, 2.56942, -11.3298 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring5 3" parent="rings" instance=ExtResource( 2 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 5.99022, 2.56942, -11.4348 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring5 4" parent="rings" instance=ExtResource( 2 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 8.5496, 2.56942, -6.59324 ) +collision/layers = 1 +collision/mask = 1 + +[node name="ring5 5" parent="rings" instance=ExtResource( 2 )] + +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 8.93742, 2.56942, -15.4428 ) +collision/layers = 1 +collision/mask = 1 + +[node name="initial_cam_pos" type="Position3D" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 35.5394, 26.0597, 1.54874 ) + +[node name="initial_cam_look" type="Position3D" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -12.2367, -9.82993, 12.8727 ) + + diff --git a/scenes/main.scn b/scenes/main.scn deleted file mode 100644 index 1de176e..0000000 Binary files a/scenes/main.scn and /dev/null differ diff --git a/scenes/main.tscn b/scenes/main.tscn new file mode 100644 index 0000000..2e5a667 --- /dev/null +++ b/scenes/main.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=2 format=1] + +[ext_resource path="res://scenes/hud.tscn" type="PackedScene" id=1] + +[node name="main" type="Spatial"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +__meta__ = { "__editor_plugin_screen__":"3D" } + +[node name="hud" parent="." instance=ExtResource( 1 )] + +[node name="scenes" type="Spatial" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) + + diff --git a/scenes/player.scn b/scenes/player.scn deleted file mode 100644 index 499751d..0000000 Binary files a/scenes/player.scn and /dev/null differ diff --git a/scenes/player.tscn b/scenes/player.tscn new file mode 100644 index 0000000..a7d1d8d --- /dev/null +++ b/scenes/player.tscn @@ -0,0 +1,123 @@ +[gd_scene load_steps=9 format=1] + +[ext_resource path="res://scripts/player/player.gd" type="Script" id=1] +[ext_resource path="res://scripts/player/character.gd" type="Script" id=2] +[ext_resource path="res://assets/models/sanic/sanic.scn" type="PackedScene" id=3] +[ext_resource path="res://assets/sounds/jump.wav" type="Sample" id=4] +[ext_resource path="res://scripts/player/cam_base.gd" type="Script" id=5] +[ext_resource path="res://scripts/player/cam_pod.gd" type="Script" id=6] + +[sub_resource type="CapsuleShape" id=1] + +radius = 0.928637 +height = 0.740731 + +[sub_resource type="SampleLibrary" id=2] + +samples/jump = { "db":0.0, "pitch":1.0, "sample":ExtResource( 4 ) } + +[node name="player" type="Spatial"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.09904, 0 ) +script/script = ExtResource( 1 ) +__meta__ = { "__editor_plugin_screen__":"Script" } + +[node name="character" type="KinematicBody" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +input/ray_pickable = true +input/capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 1.24136, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +collide_with/static = true +collide_with/kinematic = true +collide_with/rigid = true +collide_with/character = true +collision/margin = 0.001 +script/script = ExtResource( 2 ) +__meta__ = { "_editor_collapsed":true } + +[node name="model" parent="character" instance=ExtResource( 3 )] + +[node name="CollisionShape" type="CollisionShape" parent="character"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 1.24136, 0 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = 0 + +[node name="sounds" type="SpatialSamplePlayer" parent="character"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +params/volume_db = -18.95 +params/pitch_scale = 1.0 +params/attenuation/min_distance = 1.0 +params/attenuation/max_distance = 100.0 +params/attenuation/distance_exp = 1.0 +params/emission_cone/degrees = 180.0 +params/emission_cone/attenuation_db = -6.0 +config/polyphony = 1 +config/samples = SubResource( 2 ) + +[node name="air_timer" type="Timer" parent="."] + +process_mode = 1 +wait_time = 0.17 +one_shot = true +autostart = false + +[node name="jump_timer" type="Timer" parent="."] + +process_mode = 1 +wait_time = 0.2 +one_shot = true +autostart = false + +[node name="cam_base" type="Spatial" parent="."] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +script/script = ExtResource( 5 ) + +[node name="cam_pitch" type="Spatial" parent="cam_base"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.20332, 0 ) + +[node name="cam" type="Spatial" parent="cam_base/cam_pitch"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 6.92967 ) + +[node name="cam_pod" type="Spatial" parent="cam_base/cam_pitch/cam"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +script/script = ExtResource( 6 ) + +[node name="cam_pos" type="Position3D" parent="cam_base/cam_pitch/cam/cam_pod"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.23414 ) + +[node name="cam_look" type="Position3D" parent="cam_base/cam_pitch/cam/cam_pod"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -5 ) + +[node name="ray" type="RayCast" parent="cam_base/cam_pitch/cam/cam_pod"] + +_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -5 ) +enabled = true +cast_to = Vector3( 0, 0, 5 ) +layer_mask = 1 +type_mask = 15 + +[connection signal="timeout" from="air_timer" to="character" method="_on_air_timer_timeout"] + + diff --git a/scripts/globals.gd b/scripts/globals.gd index d46b074..753fe5d 100644 --- a/scripts/globals.gd +++ b/scripts/globals.gd @@ -20,7 +20,7 @@ var level = null var paused = false func load_scene(scene_name): - return ResourceLoader.load("res://scenes/" + scene_name + ".scn") + return ResourceLoader.load("res://scenes/" + scene_name + ".tscn") func _ready(): main_scene = get_node("/root/main") @@ -103,7 +103,7 @@ func set_scene(scene): if level != null: level.queue_free() # Load the file passed in as the param "scene" - var s = ResourceLoader.load("res://scenes/levels/" + scene + ".scn") + var s = ResourceLoader.load("res://scenes/levels/" + scene + ".tscn") # Create an instance of our scene level = s.instance() # Add scene to main