Browse Source

Optimization and balancing to save performance

Disabled dynamic shadows on Rockets and Explosions. Also reduced their radius.
Added queue_free() in Explosion effect to remove as much of nodes as possible when they are not needed.
Added animated Halo to Explosion (cheap)
Greatly reduced the amount of particles in Rocket and Explosions
Reduced Particle lifetime in Rocket trail
Reduced Rocket Launcher firing speed. it no longer fires as fast as the handgun.
Reduced shawmap size
Reduced shadow quality
Disabled Roughness limiter
Reduced Dev Texture size to 1K from 4K (added size limit in import settings)
Also saved export settings (they limit the amount of resources packed with game builds)
pull/144/head
unfa 11 months ago
parent
commit
927d4384a7
  1. 244
      Game/Assets/Effects/ImpactExplosion.tscn
  2. 1
      Game/Assets/Effects/MuzzleFlash.tscn
  3. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_1.png.import
  4. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_10.png.import
  5. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_11.png.import
  6. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_12.png.import
  7. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_13.png.import
  8. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_14.png.import
  9. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_15.png.import
  10. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_16.png.import
  11. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_17.png.import
  12. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_18.png.import
  13. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_2.png.import
  14. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_3.png.import
  15. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_4.png.import
  16. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_5.png.import
  17. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_6.png.import
  18. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_7.png.import
  19. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_8.png.import
  20. 2
      Game/Assets/Materials/Maps/Dev/Dev_albedo_9.png.import
  21. 2
      Game/Assets/Materials/Maps/Dev/Dev_normal.png.import
  22. 2
      Game/Assets/Materials/Maps/Dev/Dev_orm.png.import
  23. 1
      Game/Assets/Weapons/Handgun/Handgun.tscn
  24. 10
      Game/Assets/Weapons/Projectile.gd
  25. 39
      Game/Assets/Weapons/RocketLauncher/Rocket.tscn
  26. 2
      Game/Assets/Weapons/RocketLauncher/RocketLauncher.tscn
  27. 4
      Game/Assets/Weapons/Weapon.gd
  28. 11
      Game/export_presets.cfg
  29. 7
      Game/project.godot

244
Game/Assets/Effects/ImpactExplosion.tscn

@ -1,4 +1,4 @@
[gd_scene load_steps=36 format=3 uid="uid://wvxhewre31mo"]
[gd_scene load_steps=38 format=3 uid="uid://wvxhewre31mo"]
[ext_resource type="Script" path="res://Assets/Effects/Impact.gd" id="1_7cd22"]
[ext_resource type="Texture2D" uid="uid://pnh872qjk0oy" path="res://Assets/Effects/Flame.png" id="2_pyxv8"]
@ -27,8 +27,8 @@ lifetime_randomness = 0.25
direction = Vector3(0, 0, -1)
spread = 180.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = 5.0
initial_velocity_max = 10.0
initial_velocity_min = 1.0
initial_velocity_max = 3.0
angular_velocity_min = -5.0
angular_velocity_max = 5.0
damping_min = 20.0
@ -172,17 +172,6 @@ proximity_fade_enable = true
[sub_resource type="QuadMesh" id="QuadMesh_n7yo0"]
material = SubResource( "StandardMaterial3D_3qjja" )
[sub_resource type="StandardMaterial3D" id="5"]
blend_mode = 1
shading_mode = 0
albedo_color = Color(1, 0, 0.00784314, 1)
albedo_texture = ExtResource( "2_pyxv8" )
uv1_scale = Vector3(0.5, 0.5, 1)
[sub_resource type="QuadMesh" id="6"]
material = SubResource( "5" )
size = Vector2(0.25, 0.25)
[sub_resource type="OpenSimplexNoise" id="OpenSimplexNoise_smcfq"]
persistence = 0.8
@ -253,9 +242,34 @@ tracks/4/keys = {
"update": 0,
"values": [0.0]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Halo:surface_material_override/0:albedo_color")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 0.529412, 0.270588, 1)]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Halo:mesh:size")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.75, 0.75)]
}
[sub_resource type="Animation" id="8"]
resource_name = "anim"
length = 3.0
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
@ -319,43 +333,111 @@ tracks/4/keys = {
"update": 0,
"values": [0.01, 1.0, 2.0, 3.0]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Halo:surface_material_override/0:albedo_color")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0, 0.05, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Color(2, 1.3, 0, 1), Color(0.75, 0.397059, 0.202941, 1), Color(0, 0, 0, 1)]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Halo:mesh:size")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.75, 0.75)]
}
tracks/7/type = "method"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("Halo")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0.3),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
tracks/8/type = "audio"
tracks/8/imported = false
tracks/8/enabled = false
tracks/8/path = NodePath("SoundPlayer/AudioStreamPlayer3D")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource( "4_ieunx" )
}],
"times": PackedFloat32Array(0)
}
tracks/9/type = "method"
tracks/9/imported = false
tracks/9/enabled = false
tracks/9/path = NodePath("SoundPlayer")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(2.35),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
tracks/10/type = "method"
tracks/10/imported = false
tracks/10/enabled = true
tracks/10/path = NodePath("AnimationPlayer")
tracks/10/interp = 1
tracks/10/loop_wrap = true
tracks/10/keys = {
"times": PackedFloat32Array(2.4),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
[sub_resource type="Animation" id="Animation_itp5v"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MeshInstance3D:shader_params/o3007790_ANIM")
tracks/0/path = NodePath("Decal:distance_fade_begin")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5),
"transitions": PackedFloat32Array(1, 1),
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0, 1.0]
"values": [20.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Decal:distance_fade_begin")
tracks/1/path = NodePath("Decal:distance_fade_length")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [20.0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Decal:distance_fade_length")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [10.0]
}
@ -365,60 +447,34 @@ length = 15.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MeshInstance3D:shader_params/o3007790_ANIM")
tracks/0/path = NodePath("Decal:distance_fade_begin")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.3),
"times": PackedFloat32Array(5, 15),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 1.0]
"values": [10.0, -10.0]
}
tracks/1/type = "method"
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MeshInstance3D")
tracks/1/path = NodePath("Decal:distance_fade_length")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.3),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
"times": PackedFloat32Array(5, 15),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [10.0, 0.0]
}
tracks/2/type = "value"
tracks/2/type = "method"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Decal:distance_fade_begin")
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(5, 15),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [10.0, -10.0]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Decal:distance_fade_length")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(5, 15),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [10.0, 0.0]
}
tracks/4/type = "method"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath(".")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(15),
"transitions": PackedFloat32Array(1),
"values": [{
@ -427,6 +483,34 @@ tracks/4/keys = {
}]
}
[sub_resource type="Gradient" id="Gradient_x5mjl"]
offsets = PackedFloat32Array(0, 0.0696517, 0.154229, 0.241294, 0.320896, 0.425373, 0.537313, 0.634328, 0.756219, 1)
colors = PackedColorArray(2, 2, 2, 1, 0.985075, 0.985075, 0.985075, 1, 0.500439, 0.500439, 0.500439, 1, 0.247924, 0.247924, 0.247924, 1, 0.120634, 0.120634, 0.120634, 1, 0.0580323, 0.0580323, 0.0580323, 1, 0.0304474, 0.0304474, 0.0304474, 1, 0.0187759, 0.0187759, 0.0187759, 1, 0.00932661, 0.00932661, 0.00932661, 1, 0, 0, 0, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_hy81s"]
gradient = SubResource( "Gradient_x5mjl" )
use_hdr = true
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(0.5, 0)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_gwnl0"]
blend_mode = 1
no_depth_test = true
shading_mode = 0
vertex_color_use_as_albedo = true
albedo_color = Color(1, 0.529412, 0.270588, 1)
albedo_texture = SubResource( "GradientTexture2D_hy81s" )
disable_receive_shadows = true
billboard_mode = 1
fixed_size = true
point_size = 89.7
proximity_fade_distance = 0.25
[sub_resource type="QuadMesh" id="QuadMesh_n0j78"]
material = SubResource( "StandardMaterial3D_gwnl0" )
size = Vector2(0.75, 0.75)
[node name="Impact" type="Node3D"]
script = ExtResource( "1_7cd22" )
@ -438,6 +522,7 @@ radius = 0.01
[node name="Explosion" type="GPUParticles3D" parent="."]
layers = 2
emitting = false
amount = 4
lifetime = 2.0
one_shot = true
explosiveness = 1.0
@ -450,7 +535,7 @@ draw_pass_1 = SubResource( "QuadMesh_hbyxo" )
[node name="Tracers" type="GPUParticles3D" parent="."]
layers = 2
emitting = false
amount = 16
amount = 4
sub_emitter = NodePath("Smoke")
one_shot = true
speed_scale = 2.5
@ -465,7 +550,7 @@ draw_pass_1 = SubResource( "QuadMesh_opq4v" )
[node name="Smoke" type="GPUParticles3D" parent="Tracers"]
layers = 2
emitting = false
amount = 128
amount = 64
lifetime = 1.26
fixed_fps = 0
local_coords = false
@ -476,22 +561,16 @@ draw_pass_1 = SubResource( "QuadMesh_n7yo0" )
[node name="Timer" type="Timer" parent="."]
wait_time = 15.0
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 1.06581e-14, 0, -1.06581e-14, 1, 0, 0.00379224, 0)
visible = false
mesh = SubResource( "6" )
surface_material_override/0 = null
[node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.369677, 0)
layers = 7
light_color = Color(1, 0.929412, 0, 1)
light_projector = SubResource( "NoiseTexture_c4len" )
light_size = 0.75
light_specular = 0.2
shadow_enabled = true
shadow_blur = 2.0
omni_range = 25.0
omni_attenuation = 1.8025
omni_range = 15.0
omni_attenuation = 0.574349
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "anim"
@ -526,6 +605,13 @@ distance_fade_begin = 20.0
distance_fade_length = 10.0
cull_mask = 1
[node name="Halo" type="MeshInstance3D" parent="."]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0.174589)
layers = 2
cast_shadow = 0
mesh = SubResource( "QuadMesh_n0j78" )
surface_material_override/0 = SubResource( "StandardMaterial3D_gwnl0" )
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
[editable path="SoundPlayer"]

1
Game/Assets/Effects/MuzzleFlash.tscn

@ -127,6 +127,7 @@ one_shot = true
speed_scale = 2.0
explosiveness = 1.0
fixed_fps = 0
interpolate = false
process_material = SubResource( "ParticlesMaterial_fglo4" )
draw_pass_1 = SubResource( "QuadMesh_o6i5g" )

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_1.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_10.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_11.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_12.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_13.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_14.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_15.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_16.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_17.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_18.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_2.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_3.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_4.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_5.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_6.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_7.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_8.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_albedo_9.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_normal.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

2
Game/Assets/Materials/Maps/Dev/Dev_orm.png.import

@ -32,6 +32,6 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
process/size_limit=1024
detect_3d/compress_to=0
svg/scale=1.0

1
Game/Assets/Weapons/Handgun/Handgun.tscn

@ -5,6 +5,7 @@
[ext_resource type="PackedScene" uid="uid://eerqpr05s6d4" path="res://Assets/Effects/BulletTracer.tscn" id="2_u1c26"]
[node name="Weapon" instance=ExtResource( "1_fpucm" )]
animation_speed = 2.5
projectile_or_tracer_scene = ExtResource( "2_u1c26" )
weapon_damage = 15

10
Game/Assets/Weapons/Projectile.gd

@ -4,13 +4,15 @@ extends Node3D
@export var speed : float
var damage : int
var source_position : Vector3
var player
var time := 0.0
#var active := true
@onready var halo = $OmniLight3D/Halo
@onready var halo = $Halo
@onready var halo_size = halo.mesh.size
@onready var halo_transform = halo.global_transform
@export var halo_color : Color
@ -47,7 +49,7 @@ func _process(delta):
var flicker = sin(time * 125) + sin(time * 180) / 2 + sin(time * 295) / 3
$OmniLight3D.light_energy = 3 + flicker /2
halo.mesh.size = Vector2.ONE * 1.5 + Vector2(flicker, flicker) / 8
halo.mesh.size = halo_size * 1.5 + Vector2(flicker, flicker) / 8
var space_state = get_world_3d().direct_space_state
var physics_ray_query_parameters_3d = PhysicsRayQueryParameters3D.new()
@ -98,8 +100,8 @@ func give_damage(target: Node, hit_position: Vector3, hit_normal: Vector3, damag
set_physics_process(false)
halo.hide()
$OmniLight3D.light_energy = 0
$OmniLight3D/Smoke.emitting = false
$OmniLight3D.hide()
$Smoke.emitting = false
$Area3D.set_deferred("monitoring",false)
$Rocket.hide()
$AmbientSound.stop()

39
Game/Assets/Weapons/RocketLauncher/Rocket.tscn

@ -66,18 +66,18 @@ proximity_fade_enable = true
[sub_resource type="QuadMesh" id="QuadMesh_gkbg3"]
material = SubResource( "StandardMaterial3D_eernl" )
[sub_resource type="Gradient" id="Gradient_x5mjl"]
[sub_resource type="Gradient" id="Gradient_ki7q6"]
offsets = PackedFloat32Array(0, 0.0696517, 0.154229, 0.241294, 0.320896, 0.425373, 0.537313, 0.634328, 0.756219, 1)
colors = PackedColorArray(2, 2, 2, 1, 0.985075, 0.985075, 0.985075, 1, 0.500439, 0.500439, 0.500439, 1, 0.247924, 0.247924, 0.247924, 1, 0.120634, 0.120634, 0.120634, 1, 0.0580323, 0.0580323, 0.0580323, 1, 0.0304474, 0.0304474, 0.0304474, 1, 0.0187759, 0.0187759, 0.0187759, 1, 0.00932661, 0.00932661, 0.00932661, 1, 0, 0, 0, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_5y8sa"]
gradient = SubResource( "Gradient_x5mjl" )
gradient = SubResource( "Gradient_ki7q6" )
use_hdr = true
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(0.5, 0)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yhx2h"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_i6t8q"]
blend_mode = 1
no_depth_test = true
shading_mode = 0
@ -91,7 +91,8 @@ point_size = 89.7
proximity_fade_distance = 0.25
[sub_resource type="QuadMesh" id="QuadMesh_q2732"]
material = SubResource( "StandardMaterial3D_yhx2h" )
material = SubResource( "StandardMaterial3D_i6t8q" )
size = Vector2(0.25, 0.25)
[node name="Rocket" type="Node3D"]
script = ExtResource( "1_3ywpo" )
@ -124,33 +125,33 @@ monitorable = false
transform = Transform3D(0, 9.12042e-08, -2.08651, 2.08651, 0, 0, 0, -2.08651, -9.12042e-08, 0.000959158, 2.38419e-07, -0.307333)
shape = SubResource( "CapsuleShape3D_qjk68" )
[node name="OmniLight3D" type="SpotLight3D" parent="."]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0.174589)
light_color = Color(1, 0.529412, 0.270588, 1)
light_size = 0.5
shadow_enabled = true
shadow_blur = 3.0
spot_range = 25.0
spot_angle = 71.7513
[node name="Smoke" type="GPUParticles3D" parent="OmniLight3D"]
transform = Transform3D(0.999982, -0.000659683, 0.00600755, 0.000640738, 0.999995, 0.00315697, -0.0060096, -0.00315307, 0.999977, 0.00051539, 1.19209e-07, -0.8097)
[node name="Smoke" type="GPUParticles3D" parent="."]
transform = Transform3D(-0.999982, 0.000659683, -0.00600746, 0.000640738, 0.999995, 0.00315697, 0.00600951, 0.00315307, -0.999977, -0.000515461, 1.19209e-07, 0.984289)
layers = 2
amount = 1024
lifetime = 1.8
amount = 128
fixed_fps = 0
local_coords = false
trail_length_secs = 0.72
process_material = SubResource( "ParticlesMaterial_mu7mc" )
draw_pass_1 = SubResource( "QuadMesh_gkbg3" )
[node name="Halo" type="MeshInstance3D" parent="OmniLight3D"]
[node name="Halo" type="MeshInstance3D" parent="."]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0.174589)
layers = 2
cast_shadow = 0
mesh = SubResource( "QuadMesh_q2732" )
skeleton = NodePath("../..")
surface_material_override/0 = null
[node name="OmniLight3D" type="SpotLight3D" parent="."]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0.174589)
layers = 7
light_color = Color(1, 0.529412, 0.270588, 1)
light_size = 0.5
shadow_blur = 3.0
spot_range = 20.0
spot_attenuation = 0.329877
spot_angle = 71.7513
[node name="Timer" type="Timer" parent="."]
wait_time = 10.0
one_shot = true

2
Game/Assets/Weapons/RocketLauncher/RocketLauncher.tscn

@ -8,6 +8,8 @@
[ext_resource type="AudioStream" uid="uid://c1fv01sc4dy5w" path="res://Assets/SFX/Weapons_RocketLauncher_Shot_01_C.wav" id="6_n223q"]
[node name="Weapon" instance=ExtResource( "1_x28sf" )]
transform = Transform3D(1.0005, 0, 0, 0, 1.0005, 0, 0, 0, 1.0005, 0, 0, 0)
animation_speed = 0.3
weapon_type = 1
projectile_or_tracer_scene = ExtResource( "2_xwyny" )
weapon_damage = 50

4
Game/Assets/Weapons/Weapon.gd

@ -9,6 +9,8 @@ extends Node3D
@onready var muzzle = find_node("Muzzle")
@onready var animation_player = find_node("AnimationPlayer")
@export var animation_speed : float
var casing = preload("res://Assets/Weapons/Handgun/Casing.tscn")
var flash = preload("res://Assets/Effects/MuzzleFlash.tscn")
var tracer = preload("res://Assets/Effects/BulletTracer.tscn")
@ -45,7 +47,7 @@ var spread = spread_min
get_parent().add_child(flash_effect)
flash_effect.global_transform = muzzle.global_transform
animation_player.play("Shoot", 0, 2.5)
animation_player.play("Shoot", 0, animation_speed)
var space_state = get_world_3d().direct_space_state

11
Game/export_presets.cfg

@ -4,15 +4,16 @@ name="Linux/X11"
platform="Linux/X11"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter="*.wav, *.sample, version"
export_filter="scenes"
export_files=PackedStringArray("res://Assets/Audio/BulletFlyBySoundPlayer.tscn", "res://Assets/Audio/SoundPlayer.tscn", "res://Assets/Characters/Player.tscn", "res://Assets/Decals/Blood/BloodSplash.tscn", "res://Assets/DecalsStatic/LiblastLogo.tscn", "res://Assets/DecalsStatic/Puddle.tscn", "res://Assets/Effects/BulletTracer.gltf", "res://Assets/Effects/BulletTracer.tscn", "res://Assets/Effects/Gibs.tscn", "res://Assets/Effects/ImpactBlood.tscn", "res://Assets/Effects/ImpactExplosion.tscn", "res://Assets/Effects/ImpactSparks.tscn", "res://Assets/Effects/MuzzleFlash.tscn", "res://Assets/HUD/HUD.tscn", "res://Assets/MapComponents/Hazard.tscn", "res://Assets/MapComponents/SpawnPoint.tscn", "res://Assets/Maps/DM1.tscn", "res://Assets/UI/ConnectMenu.tscn", "res://Assets/UI/ControlsMenu.tscn", "res://Assets/UI/GUI.tscn", "res://Assets/UI/GraphicsMenu.tscn", "res://Assets/UI/Menu.tscn", "res://Assets/UI/MenuButton.tscn", "res://Assets/UI/MenuCheckButton.tscn", "res://Assets/UI/MenuColor.tscn", "res://Assets/UI/MenuData.tscn", "res://Assets/UI/MenuItem.tscn", "res://Assets/UI/MenuLineEdit.tscn", "res://Assets/UI/MenuSlider.tscn", "res://Assets/UI/OptionsMenu.tscn", "res://Assets/UI/PlayMenu.tscn", "res://Assets/UI/ProfileMenu.tscn", "res://Assets/Weapons/Handgun/Casing.tscn", "res://Assets/Weapons/Handgun/Handgun.tscn", "res://Assets/Weapons/RocketLauncher/Rocket.tscn", "res://Assets/Weapons/RocketLauncher/RocketLauncher.tscn", "res://Assets/Weapons/Weapon.tscn", "res://Main.tscn", "res://Map.tscn", "res://Server.tscn")
include_filter="version"
exclude_filter=""
export_path="Builds/Server/Liblast Linux.x86_64"
export_path="Builds/0.1.1.2/Liblast Linux.x86_64"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_export_mode=1
script_export_mode=0
script_encryption_key=""
[preset.0.options]
@ -20,7 +21,7 @@ script_encryption_key=""
custom_template/debug=""
custom_template/release=""
binary_format/64_bits=true
binary_format/embed_pck=true
binary_format/embed_pck=false
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false

7
Game/project.godot

@ -199,12 +199,17 @@ mute_audio={
[rendering]
reflections/sky_reflections/fast_filter_high_quality=true
shadows/directional_shadow/size=1024
shadows/directional_shadow/soft_shadow_quality=2
environment/ssao/quality=0
anti_aliasing/screen_space_roughness_limiter/enabled=false
environment/screen_space_reflection/roughness_quality=3
global_illumination/sdfgi/probe_ray_count=2
global_illumination/sdfgi/frames_to_converge=0
global_illumination/sdfgi/frames_to_update_lights=4
occlusion_culling/use_occlusion_culling=true
mesh_lod/lod_change/threshold_pixels=3.0
shadows/shadow_atlas/size=1024
shadows/shadow_atlas/16_bits=false
shadows/shadow_atlas/quadrant_1_subdiv=3
environment/defaults/default_environment="res://default_env.tres"