before planets
This commit is contained in:
parent
bb6404e918
commit
e09f05b566
57 changed files with 1203 additions and 90 deletions
11
3d_cool_things/earth/license.txt
Normal file
11
3d_cool_things/earth/license.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
Model Information:
|
||||
* title: Earth
|
||||
* source: https://sketchfab.com/3d-models/earth-41fc80d85dfd480281f21b74b2de2faa
|
||||
* author: Akshat (https://sketchfab.com/shooter24994)
|
||||
|
||||
Model License:
|
||||
* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
|
||||
* requirements: Author must be credited. Commercial use is allowed.
|
||||
|
||||
If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
|
||||
This work is based on "Earth" (https://sketchfab.com/3d-models/earth-41fc80d85dfd480281f21b74b2de2faa) by Akshat (https://sketchfab.com/shooter24994) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
|
BIN
3d_cool_things/earth/scene.bin
Normal file
BIN
3d_cool_things/earth/scene.bin
Normal file
Binary file not shown.
257
3d_cool_things/earth/scene.gltf
Normal file
257
3d_cool_things/earth/scene.gltf
Normal file
|
@ -0,0 +1,257 @@
|
|||
{
|
||||
"accessors": [
|
||||
{
|
||||
"bufferView": 2,
|
||||
"componentType": 5126,
|
||||
"count": 3223,
|
||||
"max": [
|
||||
0.999999463558197,
|
||||
0.9999982118606567,
|
||||
1.0
|
||||
],
|
||||
"min": [
|
||||
-0.9999986290931702,
|
||||
-0.999998927116394,
|
||||
-1.0
|
||||
],
|
||||
"type": "VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView": 2,
|
||||
"byteOffset": 38676,
|
||||
"componentType": 5126,
|
||||
"count": 3223,
|
||||
"max": [
|
||||
1.0,
|
||||
1.0,
|
||||
1.0
|
||||
],
|
||||
"min": [
|
||||
-1.0,
|
||||
-1.0,
|
||||
-1.0
|
||||
],
|
||||
"type": "VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView": 1,
|
||||
"componentType": 5126,
|
||||
"count": 3223,
|
||||
"max": [
|
||||
1.0,
|
||||
1.0
|
||||
],
|
||||
"min": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"type": "VEC2"
|
||||
},
|
||||
{
|
||||
"bufferView": 0,
|
||||
"componentType": 5125,
|
||||
"count": 17664,
|
||||
"type": "SCALAR"
|
||||
}
|
||||
],
|
||||
"asset": {
|
||||
"extras": {
|
||||
"author": "Akshat (https://sketchfab.com/shooter24994)",
|
||||
"license": "CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)",
|
||||
"source": "https://sketchfab.com/3d-models/earth-41fc80d85dfd480281f21b74b2de2faa",
|
||||
"title": "Earth"
|
||||
},
|
||||
"generator": "Sketchfab-12.65.0",
|
||||
"version": "2.0"
|
||||
},
|
||||
"bufferViews": [
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteLength": 70656,
|
||||
"name": "floatBufferViews",
|
||||
"target": 34963
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteLength": 25784,
|
||||
"byteOffset": 70656,
|
||||
"byteStride": 8,
|
||||
"name": "floatBufferViews",
|
||||
"target": 34962
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteLength": 77352,
|
||||
"byteOffset": 96440,
|
||||
"byteStride": 12,
|
||||
"name": "floatBufferViews",
|
||||
"target": 34962
|
||||
}
|
||||
],
|
||||
"buffers": [
|
||||
{
|
||||
"byteLength": 173792,
|
||||
"uri": "scene.bin"
|
||||
}
|
||||
],
|
||||
"extensionsRequired": [
|
||||
"KHR_materials_pbrSpecularGlossiness"
|
||||
],
|
||||
"extensionsUsed": [
|
||||
"KHR_materials_pbrSpecularGlossiness"
|
||||
],
|
||||
"images": [
|
||||
{
|
||||
"uri": "textures/Material.002_diffuse.jpeg"
|
||||
}
|
||||
],
|
||||
"materials": [
|
||||
{
|
||||
"doubleSided": true,
|
||||
"extensions": {
|
||||
"KHR_materials_pbrSpecularGlossiness": {
|
||||
"diffuseFactor": [
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0
|
||||
],
|
||||
"diffuseTexture": {
|
||||
"index": 0
|
||||
},
|
||||
"glossinessFactor": 0.0,
|
||||
"specularFactor": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "Material.002"
|
||||
}
|
||||
],
|
||||
"meshes": [
|
||||
{
|
||||
"name": "Sphere_Material.002_0",
|
||||
"primitives": [
|
||||
{
|
||||
"attributes": {
|
||||
"NORMAL": 1,
|
||||
"POSITION": 0,
|
||||
"TEXCOORD_0": 2
|
||||
},
|
||||
"indices": 3,
|
||||
"material": 0,
|
||||
"mode": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"children": [
|
||||
1
|
||||
],
|
||||
"matrix": [
|
||||
1.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
2.220446049250313e-16,
|
||||
-1.0,
|
||||
0.0,
|
||||
0.0,
|
||||
1.0,
|
||||
2.220446049250313e-16,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
1.0
|
||||
],
|
||||
"name": "Sketchfab_model"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
2
|
||||
],
|
||||
"matrix": [
|
||||
1.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
1.0,
|
||||
0.0,
|
||||
0.0,
|
||||
-1.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
1.0
|
||||
],
|
||||
"name": "8a888f66473549c99c3f97fb5030482f.fbx"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
3
|
||||
],
|
||||
"name": "RootNode"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
4
|
||||
],
|
||||
"matrix": [
|
||||
100.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
-1.629206793918314e-05,
|
||||
-99.99999999999868,
|
||||
0.0,
|
||||
0.0,
|
||||
99.99999999999868,
|
||||
-1.629206793918314e-05,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
1.0
|
||||
],
|
||||
"name": "Sphere"
|
||||
},
|
||||
{
|
||||
"mesh": 0,
|
||||
"name": "Sphere_Material.002_0"
|
||||
}
|
||||
],
|
||||
"samplers": [
|
||||
{
|
||||
"magFilter": 9729,
|
||||
"minFilter": 9987,
|
||||
"wrapS": 10497,
|
||||
"wrapT": 10497
|
||||
}
|
||||
],
|
||||
"scene": 0,
|
||||
"scenes": [
|
||||
{
|
||||
"name": "Sketchfab_Scene",
|
||||
"nodes": [
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"textures": [
|
||||
{
|
||||
"sampler": 0,
|
||||
"source": 0
|
||||
}
|
||||
]
|
||||
}
|
37
3d_cool_things/earth/scene.gltf.import
Normal file
37
3d_cool_things/earth/scene.gltf.import
Normal file
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://cq7yn7iijtcl6"
|
||||
path="res://.godot/imported/scene.gltf-24c9bab7bae66d565abb1cb1da893322.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://3d_cool_things/earth/scene.gltf"
|
||||
dest_files=["res://.godot/imported/scene.gltf-24c9bab7bae66d565abb1cb1da893322.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
BIN
3d_cool_things/earth/textures/Material.002_diffuse.jpeg
Normal file
BIN
3d_cool_things/earth/textures/Material.002_diffuse.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 MiB |
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cfy78xakrr21u"
|
||||
path.s3tc="res://.godot/imported/Material.002_diffuse.jpeg-7af7f2eb17045e02b6795d5fcfba98fc.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://3d_cool_things/earth/textures/Material.002_diffuse.jpeg"
|
||||
dest_files=["res://.godot/imported/Material.002_diffuse.jpeg-7af7f2eb17045e02b6795d5fcfba98fc.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
14
GameManager.gd
Normal file
14
GameManager.gd
Normal file
|
@ -0,0 +1,14 @@
|
|||
extends Node
|
||||
|
||||
const MAIN_MENU = preload("res://scenes/Menu.tscn")
|
||||
const LEVELS = [preload("res://scenes/levels/level1.tscn"), preload("res://scenes/levels/level2.tscn"), preload("res://scenes/levels/level3.tscn")]
|
||||
|
||||
func launch_level(num_lvl):
|
||||
get_tree().paused = false
|
||||
MusicManager.launch_level_music(num_lvl)
|
||||
get_tree().change_scene_to_packed(LEVELS[num_lvl])
|
||||
|
||||
func launch_menu():
|
||||
get_tree().paused = false
|
||||
MusicManager.launch_menu_music()
|
||||
get_tree().change_scene_to_packed(MAIN_MENU)
|
1
GameManager.gd.uid
Normal file
1
GameManager.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://04yfjb1uqv6q
|
21
default_bus_layout.tres
Normal file
21
default_bus_layout.tres
Normal file
|
@ -0,0 +1,21 @@
|
|||
[gd_resource type="AudioBusLayout" format=3 uid="uid://tghkhhsyq7bd"]
|
||||
|
||||
[resource]
|
||||
bus/1/name = &"SFX"
|
||||
bus/1/solo = false
|
||||
bus/1/mute = false
|
||||
bus/1/bypass_fx = false
|
||||
bus/1/volume_db = -10.9863
|
||||
bus/1/send = &"Master"
|
||||
bus/2/name = &"Music"
|
||||
bus/2/solo = false
|
||||
bus/2/mute = false
|
||||
bus/2/bypass_fx = false
|
||||
bus/2/volume_db = 0.0
|
||||
bus/2/send = &"Master"
|
||||
bus/3/name = &"Motor"
|
||||
bus/3/solo = false
|
||||
bus/3/mute = false
|
||||
bus/3/bypass_fx = false
|
||||
bus/3/volume_db = 0.0
|
||||
bus/3/send = &"SFX"
|
|
@ -3,12 +3,12 @@
|
|||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dycfldtocfi6a"
|
||||
path="res://.godot/imported/33480__hiccupvirus__stereo-tron-bike-engine.wav-86db58c5d8fcb9624ec9edf06618953e.sample"
|
||||
path="res://.godot/imported/33480__hiccupvirus__stereo-tron-bike-engine.wav-ca695db0062fc4a0abf1e4cca8d6dbaa.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/33480__hiccupvirus__stereo-tron-bike-engine.wav"
|
||||
dest_files=["res://.godot/imported/33480__hiccupvirus__stereo-tron-bike-engine.wav-86db58c5d8fcb9624ec9edf06618953e.sample"]
|
||||
source_file="res://entities/car/33480__hiccupvirus__stereo-tron-bike-engine.wav"
|
||||
dest_files=["res://.godot/imported/33480__hiccupvirus__stereo-tron-bike-engine.wav-ca695db0062fc4a0abf1e4cca8d6dbaa.sample"]
|
||||
|
||||
[params]
|
||||
|
|
@ -28,7 +28,7 @@ var current_steer_speed = base_steer_speed
|
|||
var last_steer_input := 0.0
|
||||
var rotation_angle := 0.0
|
||||
|
||||
var respawn_pos : Vector3
|
||||
var respawn_trans : Transform3D
|
||||
|
||||
var thread: Thread = Thread.new()
|
||||
var steer_input = 0.0
|
||||
|
@ -40,17 +40,14 @@ func custom_gravity() -> Vector3:
|
|||
var closest_offset = road_path.curve.get_closest_offset(road_path.to_local(position))
|
||||
var closest_transform = road_path.curve.sample_baked_with_rotation(closest_offset, true, true)
|
||||
var closest_point = road_path.to_global(closest_transform.origin)
|
||||
#var project_plane = Plane(closest_transform.basis.y.normalized(), closest_point)
|
||||
#print(closest_point)
|
||||
#return -project_plane.project(position).normalized() * 0.1
|
||||
#var attractor = road_path.to_global(road_path.curve.get_closest_point(road_path.to_local(position)))
|
||||
|
||||
return -closest_transform.basis.y
|
||||
|
||||
func return_to_road():
|
||||
position = respawn_pos + 3*Vector3.UP
|
||||
rotation.z = 0
|
||||
rotation.x = 0
|
||||
var closest_offset = road_path.curve.get_closest_offset(road_path.to_local(position))
|
||||
var closest_transform = road_path.curve.sample_baked_with_rotation(closest_offset, true, true)
|
||||
transform = respawn_trans
|
||||
position += closest_transform.basis.y * 2.0
|
||||
|
||||
linear_velocity = Vector3.ZERO
|
||||
angular_velocity = Vector3.ZERO
|
||||
|
@ -61,6 +58,9 @@ func _process(_delta: float) -> void:
|
|||
|
||||
if Input.is_action_just_pressed("restart"):
|
||||
return_to_road()
|
||||
|
||||
if Input.is_action_just_pressed("hardRestart"):
|
||||
get_tree().reload_current_scene()
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
var move_input := Input.get_axis("back", "forward")
|
||||
|
@ -68,17 +68,16 @@ func _physics_process(delta: float) -> void:
|
|||
steer_input = lerpf(steer_input, steer_input_brut, 0.1)
|
||||
var is_on_floor := backward_left_respawn.is_colliding() || backward_right_respawn.is_colliding() || forward_left_respawn.is_colliding() || forward_right_respawn.is_colliding()
|
||||
var is_all_wheel_on_floor := backward_left_respawn.is_colliding() && backward_right_respawn.is_colliding() && forward_left_respawn.is_colliding() && forward_right_respawn.is_colliding()
|
||||
var is_flat : bool = transform.basis.y.dot(Vector3.UP) > 0.9
|
||||
|
||||
# Doing custom gravity like a chad
|
||||
PhysicsServer3D.area_set_param(get_viewport().find_world_3d().space, PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, custom_gravity())
|
||||
|
||||
if is_all_wheel_on_floor && is_flat:
|
||||
respawn_pos = position
|
||||
if is_all_wheel_on_floor:
|
||||
respawn_trans = transform
|
||||
|
||||
if !is_on_floor:
|
||||
air_time += delta
|
||||
if air_time > 1.5:
|
||||
if air_time > 3:
|
||||
return_to_road()
|
||||
return
|
||||
air_time = 0.0
|
||||
|
@ -92,30 +91,18 @@ func _physics_process(delta: float) -> void:
|
|||
|
||||
# Rotation
|
||||
rotation_angle = steer_input * delta
|
||||
#angular_velocity = steer_input * delta * global_transform.basis.y * 30.0
|
||||
rotate(global_transform.basis.y, rotation_angle)
|
||||
|
||||
# Drift Simulation
|
||||
var velocity = linear_velocity
|
||||
var forward_dir = global_transform.basis.z
|
||||
if forward_dir.length_squared() == 0.0:
|
||||
return # skip drift this frame if something is invalid
|
||||
return
|
||||
forward_dir = forward_dir.normalized()
|
||||
|
||||
var forward_velocity = forward_dir * velocity.dot(forward_dir)
|
||||
var lateral_velocity = velocity - forward_velocity
|
||||
|
||||
var drift_factor = inverse_lerp(
|
||||
lateral_velocity_total_drift_threshold,
|
||||
lateral_velocity_start_drift_threshold,
|
||||
lateral_velocity.length()
|
||||
)
|
||||
drift_factor = clamp(drift_factor, 0, 1)
|
||||
|
||||
|
||||
steer_speed = lerp(steer_speed * 2.0, base_steer_speed, drift_factor)
|
||||
|
||||
var lateral_friction_force = -lateral_velocity * base_lateral_friction * drift_factor
|
||||
var lateral_friction_force = -lateral_velocity * base_lateral_friction
|
||||
apply_central_force(lateral_friction_force)
|
||||
|
||||
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://dgs0fqojgcmu3"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dgs0fqojgcmu3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ctjy0e806j0vk" path="res://entities/car/car.gd" id="1_nh45c"]
|
||||
[ext_resource type="PackedScene" uid="uid://drrl25ujbosbr" path="res://entities/car/tron_moto_lowpoly/scene.gltf" id="2_1ang0"]
|
||||
[ext_resource type="AudioStream" uid="uid://dycfldtocfi6a" path="res://entities/car/33480__hiccupvirus__stereo-tron-bike-engine.wav" id="3_x0apo"]
|
||||
[ext_resource type="PackedScene" uid="uid://npanejthded5" path="res://entities/car/tron_moto_lowpoly/sketchfab_scene.tscn" id="4_hk7sx"]
|
||||
[ext_resource type="Script" uid="uid://bggsg5iqltuk3" path="res://entities/car/motor_stream.gd" id="4_qxogl"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_1ang0"]
|
||||
friction = 0.5
|
||||
rough = true
|
||||
absorbent = true
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_76tdi"]
|
||||
size = Vector3(1, 0, 2.2)
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_yotxw"]
|
||||
height = 1.1
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_qxogl"]
|
||||
size = Vector3(2.99533, 1, 1)
|
||||
|
||||
[node name="Car" type="RigidBody3D"]
|
||||
mass = 10.0
|
||||
physics_material_override = SubResource("PhysicsMaterial_1ang0")
|
||||
continuous_cd = true
|
||||
contact_monitor = true
|
||||
max_contacts_reported = 4
|
||||
script = ExtResource("1_nh45c")
|
||||
|
||||
[node name="ForwardLeft" type="RayCast3D" parent="."]
|
||||
|
@ -29,18 +33,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0.435121, 1)
|
|||
[node name="BackwardLeft" type="RayCast3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 0.435121, 1)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.1)
|
||||
shape = SubResource("BoxShape3D_76tdi")
|
||||
disabled = true
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, 0, 0, 1)
|
||||
shape = SubResource("CylinderShape3D_yotxw")
|
||||
|
||||
[node name="CollisionShape3D3" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, 0, 0, -1.2)
|
||||
shape = SubResource("CylinderShape3D_yotxw")
|
||||
transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, -4.73325e-08, 0, -0.08284)
|
||||
shape = SubResource("BoxShape3D_qxogl")
|
||||
|
||||
[node name="RaycastsRespawn" type="Node3D" parent="."]
|
||||
transform = Transform3D(2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0)
|
||||
|
@ -57,12 +52,20 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0, 1)
|
|||
[node name="BackwardLeftRespawn" type="RayCast3D" parent="RaycastsRespawn"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 0, 1)
|
||||
|
||||
[node name="Sketchfab_Scene" parent="." instance=ExtResource("2_1ang0")]
|
||||
transform = Transform3D(-0.35, 0, -3.0598e-08, 0, 0.35, 0, 3.0598e-08, 0, -0.35, 0.0317484, -0.52664, 0)
|
||||
|
||||
[node name="CameraFollowPoint" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.31962, -2.93594)
|
||||
|
||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
|
||||
[node name="MotorStream" type="AudioStreamPlayer3D" parent="."]
|
||||
stream = ExtResource("3_x0apo")
|
||||
autoplay = true
|
||||
bus = &"Motor"
|
||||
script = ExtResource("4_qxogl")
|
||||
|
||||
[node name="Sketchfab_Scene2" parent="." instance=ExtResource("4_hk7sx")]
|
||||
transform = Transform3D(-0.35, 0, -5.28485e-08, 0, 0.35, 0, 5.28485e-08, 0, -0.35, 0.0317484, -0.52664, 0)
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
||||
light_color = Color(0.0217323, 0.905795, 0.982301, 1)
|
||||
omni_range = 3.75794
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
|
|
6
entities/car/motor_stream.gd
Normal file
6
entities/car/motor_stream.gd
Normal file
|
@ -0,0 +1,6 @@
|
|||
extends AudioStreamPlayer3D
|
||||
|
||||
@onready var car: Car = $".."
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
pitch_scale = max(car.linear_velocity.length() * 0.1, 0.1)
|
1
entities/car/motor_stream.gd.uid
Normal file
1
entities/car/motor_stream.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://bggsg5iqltuk3
|
|
@ -32,6 +32,17 @@ animation/trimming=false
|
|||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
_subresources={
|
||||
"meshes": {
|
||||
"Sketchfab_Scene_Object_2": {
|
||||
"generate/lightmap_uv": 0,
|
||||
"generate/lods": 0,
|
||||
"generate/shadow_meshes": 0,
|
||||
"lods/normal_merge_angle": 60.0,
|
||||
"save_to_file/enabled": true,
|
||||
"save_to_file/path": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
|
|
51
entities/car/tron_moto_lowpoly/sketchfab_scene.tscn
Normal file
51
entities/car/tron_moto_lowpoly/sketchfab_scene.tscn
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,11 @@
|
|||
extends Node
|
||||
|
||||
|
||||
const LEVELS = [preload("res://scenes/levels/level1.tscn")]
|
||||
|
||||
var current_level = 0
|
||||
|
||||
@export var nb_checkpoints := 3
|
||||
@export var max_lap := 3
|
||||
|
||||
signal new_lap(value)
|
||||
signal end_track
|
||||
|
||||
var current_checkpoint := 0
|
||||
var current_lap := 0
|
||||
|
||||
|
@ -18,15 +16,16 @@ func checkPointEnter(check_point_id):
|
|||
if check_point_id == 0:
|
||||
current_lap += 1
|
||||
current_checkpoint += 1
|
||||
new_lap.emit(current_lap)
|
||||
else:
|
||||
current_checkpoint += 1
|
||||
current_checkpoint %= nb_checkpoints
|
||||
|
||||
if (current_lap == max_lap):
|
||||
if (current_lap == max_lap+1):
|
||||
endTrack()
|
||||
return
|
||||
|
||||
func endTrack():
|
||||
print("end")
|
||||
current_lap = 0
|
||||
current_checkpoint = 0
|
||||
end_track.emit()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
extends Area3D
|
||||
class_name CheckPoint
|
||||
@export var check_point_id : int = 0
|
||||
@onready var check_point_manager: Node = $"../../CheckPointManager"
|
||||
|
||||
|
||||
|
||||
|
@ -8,7 +9,7 @@ func _on_body_entered(body: Node3D) -> void:
|
|||
if body is not Car:
|
||||
return
|
||||
|
||||
CheckPointManager.checkPointEnter(check_point_id)
|
||||
check_point_manager.checkPointEnter(check_point_id)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
[resource]
|
||||
transparency = 1
|
||||
blend_mode = 1
|
||||
albedo_color = Color(0.396078, 1, 0.686275, 0.270588)
|
||||
emission = Color(0.396078, 1, 0.686275, 0.270588)
|
||||
|
|
8
entities/checkpoint/checkpoint_start_mat.tres
Normal file
8
entities/checkpoint/checkpoint_start_mat.tres
Normal file
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://cx7p36k3dewle"]
|
||||
|
||||
[resource]
|
||||
transparency = 1
|
||||
blend_mode = 1
|
||||
albedo_color = Color(0.768627, 0.27451, 0.309804, 0.521569)
|
||||
metallic_specular = 1.0
|
||||
emission = Color(0.768627, 0.27451, 0.309804, 0.521569)
|
47
entities/gameUI/gameUI.tscn
Normal file
47
entities/gameUI/gameUI.tscn
Normal file
|
@ -0,0 +1,47 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bbl6ouj0ew23c"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cxju8eq6w5rbt" path="res://entities/gameUI/game_ui.gd" id="1_fyng4"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dyfwkfdm7affw" path="res://fonts/ui_label_set.tres" id="2_4gmqh"]
|
||||
[ext_resource type="LabelSettings" uid="uid://c33hoau8vc0q7" path="res://fonts/little_label_settings.tres" id="3_oo04r"]
|
||||
|
||||
[node name="GameUi" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_fyng4")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -192.0
|
||||
offset_top = 30.0
|
||||
offset_right = -46.0
|
||||
offset_bottom = 112.0
|
||||
grow_horizontal = 0
|
||||
|
||||
[node name="LapLabel" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Lap 1/3"
|
||||
label_settings = ExtResource("2_4gmqh")
|
||||
|
||||
[node name="TimeLabel" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "57 s"
|
||||
label_settings = ExtResource("2_4gmqh")
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
offset_right = 147.0
|
||||
offset_bottom = 66.0
|
||||
|
||||
[node name="LapLabel" type="Label" parent="VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "Press
|
||||
C to respawn
|
||||
R to restart"
|
||||
label_settings = ExtResource("3_oo04r")
|
20
entities/gameUI/game_ui.gd
Normal file
20
entities/gameUI/game_ui.gd
Normal file
|
@ -0,0 +1,20 @@
|
|||
extends Control
|
||||
class_name GameUI
|
||||
|
||||
var time : float
|
||||
var lap : int
|
||||
|
||||
@onready var lap_label: Label = $VBoxContainer/LapLabel
|
||||
@onready var time_label: Label = $VBoxContainer/TimeLabel
|
||||
|
||||
func _ready():
|
||||
time = 0
|
||||
lap = 0.0
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
time += delta
|
||||
lap_label.text = "Lap " + str(lap) + "/3"
|
||||
time_label.text = str(round(time*100)/100)
|
||||
|
||||
func _on_check_point_manager_new_lap(value: Variant) -> void:
|
||||
lap = value
|
1
entities/gameUI/game_ui.gd.uid
Normal file
1
entities/gameUI/game_ui.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://cxju8eq6w5rbt
|
|
@ -1,11 +1,13 @@
|
|||
extends Control
|
||||
|
||||
func _ready():
|
||||
MusicManager.launch_menu_music()
|
||||
|
||||
func _on_button_1_pressed() -> void:
|
||||
get_tree().change_scene_to_packed(CheckPointManager.LEVELS[0])
|
||||
GameManager.launch_level(0)
|
||||
|
||||
func _on_button_2_pressed() -> void:
|
||||
get_tree().change_scene_to_packed(CheckPointManager.LEVELS[0])
|
||||
GameManager.launch_level(1)
|
||||
|
||||
func _on_button_3_pressed() -> void:
|
||||
get_tree().change_scene_to_packed(CheckPointManager.LEVELS[0])
|
||||
GameManager.launch_level(2)
|
||||
|
|
93
entities/pauseMenu/pauseMenu.tscn
Normal file
93
entities/pauseMenu/pauseMenu.tscn
Normal file
|
@ -0,0 +1,93 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://dlmjehxav11dx"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://catyjdq20adaf" path="res://entities/pauseMenu/pause_menu.gd" id="1_0ddhp"]
|
||||
[ext_resource type="LabelSettings" uid="uid://cru5yoau1mluh" path="res://fonts/BigTextLabelSettings.tres" id="1_6mo0v"]
|
||||
[ext_resource type="Theme" uid="uid://desmbsje23ubj" path="res://fonts/DefautTheme.tres" id="1_bdrf8"]
|
||||
[ext_resource type="LabelSettings" uid="uid://c33hoau8vc0q7" path="res://fonts/little_label_settings.tres" id="4_k4ey7"]
|
||||
|
||||
[node name="PauseMenu" type="Control"]
|
||||
process_mode = 3
|
||||
visible = false
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_0ddhp")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_bdrf8")
|
||||
text = "Main sound"
|
||||
|
||||
[node name="SliderMainSound" type="HSlider" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
value = 50.0
|
||||
|
||||
[node name="Label2" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_bdrf8")
|
||||
text = "Music"
|
||||
|
||||
[node name="SliderMusic" type="HSlider" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
value = 50.0
|
||||
|
||||
[node name="Label3" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_bdrf8")
|
||||
text = "SFX"
|
||||
|
||||
[node name="SliderSFX" type="HSlider" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
value = 50.0
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Button" type="Button" parent="VBoxContainer"]
|
||||
process_mode = 3
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_bdrf8")
|
||||
text = "MainMenu"
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -139.0
|
||||
offset_right = 139.0
|
||||
offset_bottom = 78.0
|
||||
grow_horizontal = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "Pause"
|
||||
label_settings = ExtResource("1_6mo0v")
|
||||
|
||||
[node name="Label2" type="Label" parent="VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "Press ESC to continue"
|
||||
label_settings = ExtResource("4_k4ey7")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[connection signal="value_changed" from="VBoxContainer/SliderMainSound" to="." method="_on_slider_main_sound_value_changed"]
|
||||
[connection signal="value_changed" from="VBoxContainer/SliderMusic" to="." method="_on_slider_music_value_changed"]
|
||||
[connection signal="value_changed" from="VBoxContainer/SliderSFX" to="." method="_on_slider_sfx_value_changed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Button" to="." method="_on_button_pressed"]
|
25
entities/pauseMenu/pause_menu.gd
Normal file
25
entities/pauseMenu/pause_menu.gd
Normal file
|
@ -0,0 +1,25 @@
|
|||
extends Control
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if (Input.is_action_just_pressed("pause")):
|
||||
visible = false if visible else true
|
||||
get_tree().paused = visible
|
||||
|
||||
|
||||
func _on_slider_main_sound_value_changed(value: float) -> void:
|
||||
var bus_index = AudioServer.get_bus_index("Master")
|
||||
AudioServer.set_bus_volume_db(bus_index, (value-50)/4)
|
||||
|
||||
func _on_slider_music_value_changed(value: float) -> void:
|
||||
var bus_index = AudioServer.get_bus_index("Music")
|
||||
AudioServer.set_bus_volume_db(bus_index, (value-50)/4)
|
||||
|
||||
|
||||
func _on_slider_sfx_value_changed(value: float) -> void:
|
||||
var bus_index = AudioServer.get_bus_index("SFX")
|
||||
AudioServer.set_bus_volume_db(bus_index, (value-50)/4)
|
||||
|
||||
|
||||
func _on_button_pressed() -> void:
|
||||
GameManager.launch_menu()
|
1
entities/pauseMenu/pause_menu.gd.uid
Normal file
1
entities/pauseMenu/pause_menu.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://catyjdq20adaf
|
|
@ -16,7 +16,7 @@ func update_control_points():
|
|||
var next = modulo_get_point_position(i + 1) - modulo_get_point_position(i)
|
||||
var prev_dir = prev.normalized()
|
||||
var next_dir = next.normalized()
|
||||
var tangent_length = next.length() / 3
|
||||
var tangent_length = next.length() / 2
|
||||
var tangent = (prev_dir + next_dir)
|
||||
|
||||
tangent.y = 0
|
||||
|
|
|
@ -7,7 +7,7 @@ domain_warp_enabled = true
|
|||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_l5fpm"]
|
||||
seamless = true
|
||||
as_normal_map = true
|
||||
bump_strength = 2.0
|
||||
bump_strength = 1.0
|
||||
noise = SubResource("FastNoiseLite_ma6g7")
|
||||
|
||||
[resource]
|
||||
|
|
47
entities/winMenu/winMenu.tscn
Normal file
47
entities/winMenu/winMenu.tscn
Normal file
|
@ -0,0 +1,47 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://n4qqt180m2fo"]
|
||||
|
||||
[ext_resource type="LabelSettings" uid="uid://cru5yoau1mluh" path="res://fonts/BigTextLabelSettings.tres" id="1_qk15a"]
|
||||
[ext_resource type="Script" uid="uid://cm6k4bbs2qbca" path="res://entities/winMenu/win_menu.gd" id="1_wb05w"]
|
||||
[ext_resource type="Theme" uid="uid://desmbsje23ubj" path="res://fonts/DefautTheme.tres" id="2_2te7r"]
|
||||
|
||||
[node name="WinMenu" type="Control"]
|
||||
process_mode = 3
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_wb05w")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Your time :"
|
||||
label_settings = ExtResource("1_qk15a")
|
||||
|
||||
[node name="Time" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "56s"
|
||||
label_settings = ExtResource("1_qk15a")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="MainMenu" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("2_2te7r")
|
||||
text = "MainMenu"
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/MainMenu" to="." method="_on_main_menu_pressed"]
|
12
entities/winMenu/win_menu.gd
Normal file
12
entities/winMenu/win_menu.gd
Normal file
|
@ -0,0 +1,12 @@
|
|||
extends Control
|
||||
@onready var game_ui: GameUI = $"../GameUi"
|
||||
@onready var time_label: Label = $VBoxContainer/Time
|
||||
|
||||
|
||||
func _on_check_point_manager_end_track() -> void:
|
||||
time_label.text = str(round(game_ui.time*100)/100)+"s"
|
||||
show()
|
||||
get_tree().paused = true
|
||||
|
||||
func _on_main_menu_pressed() -> void:
|
||||
GameManager.launch_menu()
|
1
entities/winMenu/win_menu.gd.uid
Normal file
1
entities/winMenu/win_menu.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://cm6k4bbs2qbca
|
7
fonts/little_label_settings.tres
Normal file
7
fonts/little_label_settings.tres
Normal file
|
@ -0,0 +1,7 @@
|
|||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://c33hoau8vc0q7"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://dk0kf7sylb7sg" path="res://fonts/vipnagorgialla/Vipnagorgialla Bd It.otf" id="1_4k3og"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_4k3og")
|
||||
font_color = Color(1, 1, 1, 0.188235)
|
10
fonts/ui_label_set.tres
Normal file
10
fonts/ui_label_set.tres
Normal file
|
@ -0,0 +1,10 @@
|
|||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://dyfwkfdm7affw"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://dk0kf7sylb7sg" path="res://fonts/vipnagorgialla/Vipnagorgialla Bd It.otf" id="1_bes5m"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_bes5m")
|
||||
font_size = 32
|
||||
font_color = Color(1, 1, 1, 0.498039)
|
||||
outline_size = 3
|
||||
outline_color = Color(0, 0, 0, 1)
|
|
@ -3,12 +3,12 @@
|
|||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://m74hgy1a7c8j"
|
||||
path="res://.godot/imported/508004__rokzroom__otherworlds-2.wav-02ff0501b2ed96d0a7c921d8eaf9a278.sample"
|
||||
path="res://.godot/imported/508004__rokzroom__otherworlds-2.wav-c541d2a72814a6f5a6b451e87439bcaa.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/music/508004__rokzroom__otherworlds-2.wav"
|
||||
dest_files=["res://.godot/imported/508004__rokzroom__otherworlds-2.wav-02ff0501b2ed96d0a7c921d8eaf9a278.sample"]
|
||||
source_file="res://music/508004__rokzroom__otherworlds-2.wav"
|
||||
dest_files=["res://.godot/imported/508004__rokzroom__otherworlds-2.wav-c541d2a72814a6f5a6b451e87439bcaa.sample"]
|
||||
|
||||
[params]
|
||||
|
|
@ -3,12 +3,12 @@
|
|||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://vuklmpsqbtf1"
|
||||
path="res://.godot/imported/cool-retro-synthwave-type-beat-into-the-future-213802.mp3-80a56b5de421f5c6ec663cbc165979d7.mp3str"
|
||||
path="res://.godot/imported/cool-retro-synthwave-type-beat-into-the-future-213802.mp3-5204f398484b98a0ed509db8bb482006.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/music/cool-retro-synthwave-type-beat-into-the-future-213802.mp3"
|
||||
dest_files=["res://.godot/imported/cool-retro-synthwave-type-beat-into-the-future-213802.mp3-80a56b5de421f5c6ec663cbc165979d7.mp3str"]
|
||||
source_file="res://music/cool-retro-synthwave-type-beat-into-the-future-213802.mp3"
|
||||
dest_files=["res://.godot/imported/cool-retro-synthwave-type-beat-into-the-future-213802.mp3-5204f398484b98a0ed509db8bb482006.mp3str"]
|
||||
|
||||
[params]
|
||||
|
|
@ -3,12 +3,12 @@
|
|||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://j6hmcw8jucih"
|
||||
path="res://.godot/imported/dark-synthwave-neon-nights-251682.mp3-18631053051d057373148e96aa221bc8.mp3str"
|
||||
path="res://.godot/imported/dark-synthwave-neon-nights-251682.mp3-7be644ceb74bc5132e38ea56798f84cd.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/music/dark-synthwave-neon-nights-251682.mp3"
|
||||
dest_files=["res://.godot/imported/dark-synthwave-neon-nights-251682.mp3-18631053051d057373148e96aa221bc8.mp3str"]
|
||||
source_file="res://music/dark-synthwave-neon-nights-251682.mp3"
|
||||
dest_files=["res://.godot/imported/dark-synthwave-neon-nights-251682.mp3-7be644ceb74bc5132e38ea56798f84cd.mp3str"]
|
||||
|
||||
[params]
|
||||
|
22
music/musicManager.gd
Normal file
22
music/musicManager.gd
Normal file
|
@ -0,0 +1,22 @@
|
|||
extends AudioStreamPlayer
|
||||
|
||||
const MENU_MUSIC = preload("res://music/508004__rokzroom__otherworlds-2.wav")
|
||||
|
||||
const LEVEL_MUSICS = [
|
||||
preload("res://music/cool-retro-synthwave-type-beat-into-the-future-213802.mp3"),
|
||||
preload("res://music/retro-synthwave-background-soundtrack-341853.mp3"),
|
||||
preload("res://music/dark-synthwave-neon-nights-251682.mp3")
|
||||
]
|
||||
|
||||
func _ready() -> void:
|
||||
process_mode = Node.PROCESS_MODE_ALWAYS
|
||||
|
||||
func launch_level_music(num_lvl):
|
||||
stream = LEVEL_MUSICS[num_lvl]
|
||||
bus = "Music"
|
||||
play()
|
||||
|
||||
func launch_menu_music():
|
||||
stream = MENU_MUSIC
|
||||
bus = "Music"
|
||||
play()
|
1
music/musicManager.gd.uid
Normal file
1
music/musicManager.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://bmhkbyy1yb7yr
|
|
@ -3,12 +3,12 @@
|
|||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://ue1jnubabl3p"
|
||||
path="res://.godot/imported/retro-synthwave-background-soundtrack-341853.mp3-821f90e67251d6c8fede43e410c0a3a8.mp3str"
|
||||
path="res://.godot/imported/retro-synthwave-background-soundtrack-341853.mp3-e9a7415f606a86fc438064409ddc8d5b.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/music/retro-synthwave-background-soundtrack-341853.mp3"
|
||||
dest_files=["res://.godot/imported/retro-synthwave-background-soundtrack-341853.mp3-821f90e67251d6c8fede43e410c0a3a8.mp3str"]
|
||||
source_file="res://music/retro-synthwave-background-soundtrack-341853.mp3"
|
||||
dest_files=["res://.godot/imported/retro-synthwave-background-soundtrack-341853.mp3-e9a7415f606a86fc438064409ddc8d5b.mp3str"]
|
||||
|
||||
[params]
|
||||
|
|
@ -11,13 +11,14 @@ config_version=5
|
|||
[application]
|
||||
|
||||
config/name="Looping"
|
||||
run/main_scene="uid://bd8skoxlvujam"
|
||||
run/main_scene="uid://cr54uowve74h0"
|
||||
config/features=PackedStringArray("4.4", "GL Compatibility")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[autoload]
|
||||
|
||||
CheckPointManager="*res://entities/checkpoint/check_point_manager.gd"
|
||||
MusicManager="*res://music/musicManager.gd"
|
||||
GameManager="*res://GameManager.gd"
|
||||
|
||||
[input]
|
||||
|
||||
|
@ -47,9 +48,19 @@ left={
|
|||
}
|
||||
restart={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":67,"key_label":0,"unicode":99,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
hardRestart={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
pause={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[physics]
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://cr54uowve74h0"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://tqpr7f3nr72k" path="res://entities/sky/sky.gdshader" id="1_xdvgc"]
|
||||
[ext_resource type="Shader" uid="uid://tqpr7f3nr72k" path="res://world_env/sky/sky_1.gdshader" id="1_xdvgc"]
|
||||
[ext_resource type="PackedScene" uid="uid://drrl25ujbosbr" path="res://entities/car/tron_moto_lowpoly/scene.gltf" id="2_upctu"]
|
||||
[ext_resource type="Script" uid="uid://dlrn4dviqqsdl" path="res://entities/mainMenu/moto_rotate.gd" id="3_11y2r"]
|
||||
[ext_resource type="Script" uid="uid://cntibc2ih0im7" path="res://entities/mainMenu/main_menu.gd" id="4_b6cxs"]
|
||||
|
|
|
@ -1,14 +1,20 @@
|
|||
[gd_scene load_steps=18 format=4 uid="uid://da5cjjk7vasft"]
|
||||
[gd_scene load_steps=24 format=4 uid="uid://da5cjjk7vasft"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bbl6ouj0ew23c" path="res://entities/gameUI/gameUI.tscn" id="1_5ntmo"]
|
||||
[ext_resource type="PhysicsMaterial" uid="uid://xghhl0tserq3" path="res://entities/road/road_phy_mat.tres" id="1_conm7"]
|
||||
[ext_resource type="PackedScene" uid="uid://cu5r7oxtqa2c0" path="res://entities/checkpoint/CheckPointManager.tscn" id="1_nfihu"]
|
||||
[ext_resource type="Script" uid="uid://bgt66573ipmub" path="res://entities/road/road.gd" id="2_d3jkd"]
|
||||
[ext_resource type="Material" uid="uid://qq8yw26i32k4" path="res://entities/road/road_mat.tres" id="3_u3awl"]
|
||||
[ext_resource type="Script" uid="uid://bdw7xdf1lc3ud" path="res://entities/road/do_spline.gd" id="4_2ku1j"]
|
||||
[ext_resource type="PackedScene" uid="uid://dgs0fqojgcmu3" path="res://entities/car/car.tscn" id="5_f31uk"]
|
||||
[ext_resource type="PhysicsMaterial" uid="uid://doaljsb6138cp" path="res://entities/car/car_physic_mat.tres" id="6_gnai3"]
|
||||
[ext_resource type="Script" uid="uid://bdhupx1blbgwo" path="res://entities/camera/camera_3d.gd" id="7_i8kv5"]
|
||||
[ext_resource type="Shader" uid="uid://tqpr7f3nr72k" path="res://entities/sky/sky.gdshader" id="8_dxn3v"]
|
||||
[ext_resource type="Shader" uid="uid://tqpr7f3nr72k" path="res://world_env/sky/sky_1.gdshader" id="8_dxn3v"]
|
||||
[ext_resource type="PackedScene" uid="uid://caolvlv4uvi04" path="res://entities/checkpoint/checkpoint.tscn" id="9_14jow"]
|
||||
[ext_resource type="Material" uid="uid://cx7p36k3dewle" path="res://entities/checkpoint/checkpoint_start_mat.tres" id="10_jprdt"]
|
||||
[ext_resource type="PackedScene" uid="uid://dlmjehxav11dx" path="res://entities/pauseMenu/pauseMenu.tscn" id="11_nkeig"]
|
||||
[ext_resource type="PackedScene" uid="uid://n4qqt180m2fo" path="res://entities/winMenu/winMenu.tscn" id="13_lgguw"]
|
||||
[ext_resource type="PackedScene" uid="uid://6i2l1pc0hcxd" path="res://world_env/directional_light_3d.tscn" id="15_ps2vj"]
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_p7e7j"]
|
||||
closed = true
|
||||
|
@ -86,13 +92,12 @@ shape = SubResource("ConcavePolygonShape3D_5ntmo")
|
|||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0846112, 0.37944, -0.427136)
|
||||
physics_material_override = ExtResource("6_gnai3")
|
||||
continuous_cd = true
|
||||
road_path = NodePath("../Road/Track")
|
||||
base_lateral_friction = 100.0
|
||||
lateral_velocity_start_drift_threshold = 100.0
|
||||
lateral_velocity_total_drift_threshold = 200.0
|
||||
|
||||
[node name="CameraFollowPoint" parent="Car" index="9"]
|
||||
[node name="CameraFollowPoint" parent="Car" index="6"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, -3.12697e-08, 0.933843, 0.357684, 8.16391e-08, 0.357684, -0.933843, 0, 1.48636, -2.93594)
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="." node_paths=PackedStringArray("follow_point")]
|
||||
|
@ -103,14 +108,14 @@ follow_point = NodePath("../Car/CameraFollowPoint")
|
|||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_0wfyh")
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(0.903903, -0.229357, 0.361046, 0, 0.844085, 0.53621, -0.427737, -0.484682, 0.762971, 0, 3.75849, 0)
|
||||
|
||||
[node name="Node3D" type="Node3D" parent="."]
|
||||
|
||||
[node name="Checkpoint" parent="Node3D" instance=ExtResource("9_14jow")]
|
||||
transform = Transform3D(0.850073, 0.270046, 0.452163, -0.238417, 0.962847, -0.126816, -0.46961, 0, 0.882874, 5.28381, 2.15491, 9.98221)
|
||||
|
||||
[node name="MeshInstance3D" parent="Node3D/Checkpoint" index="1"]
|
||||
material_override = ExtResource("10_jprdt")
|
||||
|
||||
[node name="Checkpoint2" parent="Node3D" instance=ExtResource("9_14jow")]
|
||||
transform = Transform3D(0.0171557, -2.90905e-10, 0.999853, -0.400002, 0.916488, 0.00686333, -0.916354, -0.400061, 0.015723, 156.589, 2.06197, 108.917)
|
||||
check_point_id = 1
|
||||
|
@ -119,4 +124,22 @@ check_point_id = 1
|
|||
transform = Transform3D(0.456725, 0, 0.889608, 0, 1, 0, -0.889608, 0, 0.456725, 156.589, 2.27711, -34.5388)
|
||||
check_point_id = 2
|
||||
|
||||
[node name="GameUi" parent="." instance=ExtResource("1_5ntmo")]
|
||||
|
||||
[node name="PauseMenu" parent="." instance=ExtResource("11_nkeig")]
|
||||
|
||||
[node name="WinMenu" parent="." instance=ExtResource("13_lgguw")]
|
||||
visible = false
|
||||
|
||||
[node name="CheckPointManager" parent="." instance=ExtResource("1_nfihu")]
|
||||
|
||||
[node name="DirectionalLight3D" parent="." instance=ExtResource("15_ps2vj")]
|
||||
transform = Transform3D(0.903903, -0.229357, 0.361046, 0, 0.844085, 0.53621, -0.427737, -0.484682, 0.762971, 13.1045, 0, -3.82377)
|
||||
|
||||
[connection signal="end_track" from="CheckPointManager" to="WinMenu" method="_on_check_point_manager_end_track"]
|
||||
[connection signal="new_lap" from="CheckPointManager" to="GameUi" method="_on_check_point_manager_new_lap"]
|
||||
|
||||
[editable path="Car"]
|
||||
[editable path="Node3D/Checkpoint"]
|
||||
[editable path="GameUi"]
|
||||
[editable path="WinMenu"]
|
||||
|
|
121
scenes/levels/level2.tscn
Normal file
121
scenes/levels/level2.tscn
Normal file
File diff suppressed because one or more lines are too long
121
scenes/levels/level3.tscn
Normal file
121
scenes/levels/level3.tscn
Normal file
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://dgs0fqojgcmu3" path="res://entities/car/car.tscn" id="5_44saj"]
|
||||
[ext_resource type="PhysicsMaterial" uid="uid://doaljsb6138cp" path="res://entities/car/car_physic_mat.tres" id="6_7mbro"]
|
||||
[ext_resource type="Script" uid="uid://bdhupx1blbgwo" path="res://entities/camera/camera_3d.gd" id="7_ff6ho"]
|
||||
[ext_resource type="Shader" uid="uid://tqpr7f3nr72k" path="res://entities/sky/sky.gdshader" id="8_7yos8"]
|
||||
[ext_resource type="Shader" uid="uid://tqpr7f3nr72k" path="res://world_env/sky/sky_1.gdshader" id="8_7yos8"]
|
||||
[ext_resource type="PackedScene" uid="uid://caolvlv4uvi04" path="res://entities/checkpoint/checkpoint.tscn" id="9_5jxlq"]
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_p7e7j"]
|
||||
|
@ -86,13 +86,12 @@ shape = SubResource("ConcavePolygonShape3D_choun")
|
|||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0846112, 0.37944, -0.427136)
|
||||
physics_material_override = ExtResource("6_7mbro")
|
||||
continuous_cd = true
|
||||
road_path = NodePath("../Road/Track")
|
||||
base_lateral_friction = 100.0
|
||||
lateral_velocity_start_drift_threshold = 100.0
|
||||
lateral_velocity_total_drift_threshold = 200.0
|
||||
|
||||
[node name="CameraFollowPoint" parent="Car" index="9"]
|
||||
[node name="CameraFollowPoint" parent="Car" index="7"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, -3.12697e-08, 0.933843, 0.357684, 8.16391e-08, 0.357684, -0.933843, 0, 1.48636, -2.93594)
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="." node_paths=PackedStringArray("follow_point")]
|
||||
|
|
6
world_env/directional_light_3d.tscn
Normal file
6
world_env/directional_light_3d.tscn
Normal file
|
@ -0,0 +1,6 @@
|
|||
[gd_scene format=3 uid="uid://6i2l1pc0hcxd"]
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D"]
|
||||
transform = Transform3D(0.903903, -0.229357, 0.361046, 0, 0.844085, 0.53621, -0.427737, -0.484682, 0.762971, 0, 0, 0)
|
||||
shadow_enabled = true
|
||||
directional_shadow_blend_splits = true
|
29
world_env/world_env1.tres
Normal file
29
world_env/world_env1.tres
Normal file
|
@ -0,0 +1,29 @@
|
|||
[gd_resource type="Environment" load_steps=6 format=3 uid="uid://ckpqtap7v4n00"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://tqpr7f3nr72k" path="res://world_env/sky/sky_1.gdshader" id="1_omskq"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_jyhfs"]
|
||||
noise_type = 2
|
||||
frequency = 0.1
|
||||
fractal_type = 2
|
||||
cellular_distance_function = 3
|
||||
cellular_return_type = 3
|
||||
domain_warp_enabled = true
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_tbgi4"]
|
||||
noise = SubResource("FastNoiseLite_jyhfs")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_sugp2"]
|
||||
shader = ExtResource("1_omskq")
|
||||
shader_parameter/color_env = Color(0, 0.466667, 0.694118, 1)
|
||||
shader_parameter/noise_texture = SubResource("NoiseTexture2D_tbgi4")
|
||||
shader_parameter/noise_power = 0.1
|
||||
shader_parameter/speed = 0.003
|
||||
|
||||
[sub_resource type="Sky" id="Sky_jyhfs"]
|
||||
sky_material = SubResource("ShaderMaterial_sugp2")
|
||||
|
||||
[resource]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_jyhfs")
|
||||
tonemap_mode = 1
|
35
world_env/world_env2.tres
Normal file
35
world_env/world_env2.tres
Normal file
|
@ -0,0 +1,35 @@
|
|||
[gd_resource type="Environment" load_steps=6 format=3 uid="uid://tijfrcooegb0"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://tqpr7f3nr72k" path="res://world_env/sky/sky_1.gdshader" id="1_28nuc"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_b4tpv"]
|
||||
noise_type = 2
|
||||
frequency = 0.1
|
||||
cellular_distance_function = 3
|
||||
cellular_return_type = 3
|
||||
domain_warp_enabled = true
|
||||
domain_warp_type = 1
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_hkuam"]
|
||||
noise = SubResource("FastNoiseLite_b4tpv")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_f3b2k"]
|
||||
shader = ExtResource("1_28nuc")
|
||||
shader_parameter/color_env = Color(0.461561, 0.455238, 0.0685596, 1)
|
||||
shader_parameter/noise_texture = SubResource("NoiseTexture2D_hkuam")
|
||||
shader_parameter/noise_power = 0.1
|
||||
shader_parameter/speed = 0.003
|
||||
|
||||
[sub_resource type="Sky" id="Sky_sqrei"]
|
||||
sky_material = SubResource("ShaderMaterial_f3b2k")
|
||||
|
||||
[resource]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_sqrei")
|
||||
ambient_light_source = 3
|
||||
tonemap_mode = 3
|
||||
glow_enabled = true
|
||||
fog_enabled = true
|
||||
fog_light_energy = 0.5
|
||||
fog_aerial_perspective = 0.2
|
||||
fog_sky_affect = 0.2
|
34
world_env/world_env3.tres
Normal file
34
world_env/world_env3.tres
Normal file
|
@ -0,0 +1,34 @@
|
|||
[gd_resource type="Environment" load_steps=6 format=3 uid="uid://o5p75p7ux62f"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://tqpr7f3nr72k" path="res://world_env/sky/sky_1.gdshader" id="1_trfnv"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_110aq"]
|
||||
noise_type = 2
|
||||
frequency = 0.1
|
||||
cellular_distance_function = 3
|
||||
cellular_return_type = 3
|
||||
domain_warp_enabled = true
|
||||
domain_warp_type = 1
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_akoeb"]
|
||||
noise = SubResource("FastNoiseLite_110aq")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_5yloj"]
|
||||
shader = ExtResource("1_trfnv")
|
||||
shader_parameter/color_env = Color(0.684147, 0.314831, 0.101847, 1)
|
||||
shader_parameter/noise_texture = SubResource("NoiseTexture2D_akoeb")
|
||||
shader_parameter/noise_power = 0.1
|
||||
shader_parameter/speed = 0.003
|
||||
|
||||
[sub_resource type="Sky" id="Sky_5amni"]
|
||||
sky_material = SubResource("ShaderMaterial_5yloj")
|
||||
|
||||
[resource]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_5amni")
|
||||
tonemap_mode = 1
|
||||
glow_enabled = true
|
||||
fog_enabled = true
|
||||
fog_aerial_perspective = 0.1
|
||||
fog_sky_affect = 0.1
|
||||
adjustment_enabled = true
|
Loading…
Add table
Add a link
Reference in a new issue