forked from unfa/liblast
Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
unfa | 1b2375b3d4 | |
unfa | 953c859098 | |
unfa | 6aef66c0a8 |
|
@ -1,44 +0,0 @@
|
|||
# Contribution Guide
|
||||
# Introduction
|
||||
|
||||
Looks like you want to lend a helping hand? Great, feel welcomed to read the following sections in order to know how to ask questions and see what you can work on!
|
||||
|
||||
By following the guidelines detailed below, you are respecting the time of the developers working on this project and in turn the developers will show that respect again in addressing your issue, assessing changes, and helping you finalize your pull requests.
|
||||
|
||||
|
||||
# What we're looking for!
|
||||
|
||||
Due to the early state of the game, we're looking for bug reports and any game breaking exploit you might find by tinkering around the game.
|
||||
|
||||
Make sure that you're running the latest version of the game and editor before reporting a bug!
|
||||
|
||||
Any suggestions to improve documentation are also welcomed.
|
||||
|
||||
|
||||
## Bug Report Template
|
||||
|
||||
Short and descriptive example bug report title
|
||||
|
||||
A summary of the issue and the OS environment in which it occurs. If suitable,
|
||||
include the steps required to reproduce the bug.
|
||||
|
||||
1. This is the first step
|
||||
2. This is the second step
|
||||
3. Further steps, etc.
|
||||
|
||||
Any other information you want to share that is relevant to the issue being
|
||||
reported. This might include the lines of code that you have identified as
|
||||
causing the bug, and potential solutions (and your opinions on their merits).
|
||||
|
||||
# What if I want to add to the game?
|
||||
|
||||
Before making an awesome suggestion check the project's roadmap before making the request because it might already be planned!
|
||||
|
||||
Keep in mind the vision of the project and its lore when writing the feature
|
||||
request, other than that, be extensive in detailing the feature and why it fits
|
||||
the game!
|
||||
|
||||
|
||||
# Not sure on how to contribute?
|
||||
|
||||
Check these tutorials [How to Make a Pull Request](https://makeapullrequest.com/) and [First Timers Only](https://www.firsttimersonly.com/).
|
|
@ -14,11 +14,11 @@ extends CharacterBody3D
|
|||
|
||||
@onready var head = $Head
|
||||
@onready var camera = $Head/Camera
|
||||
@onready var tween = $Head/Camera/Tween
|
||||
#@onready var tween = $Head/Camera/Tween
|
||||
|
||||
@onready var ground_check = $GroundCheck
|
||||
@onready var climb_tween = $ClimbTween # undergoing redesign in Godot 4
|
||||
@onready var climb_check = $ClimbCheck
|
||||
#@onready var climb_tween = $ClimbTween # undergoing redesign in Godot 4
|
||||
#@onready var climb_check = $ClimbCheck
|
||||
@onready var body = $Body
|
||||
@onready var mesh = $Mesh
|
||||
|
||||
|
@ -94,6 +94,10 @@ var jetpack_was_active = false
|
|||
var velocity := Vector3.ZERO
|
||||
var gravity_vec := Vector3.ZERO
|
||||
|
||||
var previously_on_floor := false
|
||||
|
||||
var lagging_movement_velocity = Vector3.ZERO
|
||||
|
||||
var dead = false: # used to workaround Godot crash when destroying player_nodes
|
||||
set(value):
|
||||
match value:
|
||||
|
@ -101,6 +105,9 @@ var dead = false: # used to workaround Godot crash when destroying player_nodes
|
|||
#input_active = false
|
||||
self.hide()
|
||||
$Body.disabled = true
|
||||
hud.pain = 3
|
||||
crosshair.hide()
|
||||
#$Head/Camera.transform.origin.y
|
||||
#set_physics_process(false)
|
||||
false:
|
||||
#input_active = true
|
||||
|
@ -108,8 +115,12 @@ var dead = false: # used to workaround Godot crash when destroying player_nodes
|
|||
$Body.disabled = false
|
||||
$SpawnSFX.play()
|
||||
$SpawnVFX.emitting = true
|
||||
hud.pain = 0
|
||||
crosshair.show()
|
||||
#$Head/Camera.transform.origin = Vector3(0,0,0)
|
||||
#set_physics_process(true)
|
||||
dead = value
|
||||
|
||||
var focus_banner_alpha = 0
|
||||
var focus_banner_inc = 5
|
||||
var focus_banner_dec = 1
|
||||
|
@ -139,12 +150,47 @@ func view_banner(show:bool):
|
|||
|
||||
@rpc(any_peer, call_local, reliable) func set_dead(is_dead: bool):
|
||||
#print("Recieved RPC call for set_dead ", is_dead)
|
||||
|
||||
if not is_dead:
|
||||
spawn()
|
||||
|
||||
self.dead = is_dead
|
||||
|
||||
# if is_multiplayer_authority():
|
||||
# print("Rebroadcasting RPC call for set_dead ", dead)
|
||||
# rpc(&'set_dead', dead)
|
||||
|
||||
@rpc(any_peer, reliable) func damage_feedback(kill=false):
|
||||
if is_multiplayer_authority():
|
||||
var victim = get_tree().multiplayer.get_remote_sender_id()
|
||||
if kill:
|
||||
crosshair.kill()
|
||||
|
||||
var pid = get_multiplayer_authority()
|
||||
main.player_list.players[pid].score += 1 # we get a point
|
||||
main.rpc(&'player_list_update', main.player_list.get(pid).serialize(), pid) # tell everyone
|
||||
|
||||
main.check_game_win_condition()
|
||||
|
||||
# check for firstblood
|
||||
if main.player_list.players[pid].score == 1:
|
||||
var firstblood = true
|
||||
for i in main.player_list.players.keys():
|
||||
if i != pid and main.player_list.players[i].score > 0:
|
||||
firstblood = false
|
||||
if firstblood:
|
||||
main.get_node("Announcer").speak(main.get_node("Announcer").firstblood) # design a proper API
|
||||
|
||||
# check for revenge (payback) - don't play if this is a duel, it'd be silly
|
||||
if main.player_list.players.size() > 2 and victim == revenge_pid:
|
||||
main.get_node("Announcer").speak(main.get_node("Announcer").payback)
|
||||
revenge_pid = -1 # reset revenge
|
||||
else:
|
||||
crosshair.hit()
|
||||
else:
|
||||
print("damage feedback called on puppet, ignoring")
|
||||
return
|
||||
|
||||
func _ready() -> void:
|
||||
#Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
view_zoom_target = 1.0
|
||||
|
@ -222,8 +268,14 @@ func _input(event) -> void:
|
|||
|
||||
func _process(delta):
|
||||
if dead:
|
||||
# $Head/Camera.position.y = -1 # lower the head to the ground, let the player see their gibs
|
||||
# $Head/Camera.rotation.x = 0 # reset the tilt so the camera looks forward
|
||||
# $Head/Camera.rotation.z = -20
|
||||
return
|
||||
|
||||
# $Head/Camera.position.y = 0
|
||||
# $Head/Camera.rotation.z = 0
|
||||
|
||||
$Jetpack/GPUParticles3D.emitting = jetpack_active
|
||||
|
||||
if jetpack_active:
|
||||
|
@ -279,10 +331,33 @@ func _process(delta):
|
|||
@rpc(call_local, any_peer, reliable) func moan():
|
||||
var anims = ["01", "02", "03", "04"]
|
||||
$Pain.play(anims[randi() % 4])
|
||||
|
||||
func damage(hp: int):
|
||||
var target = main.player_list.players[self.get_multiplayer_authority()]
|
||||
target.health -= hp
|
||||
|
||||
@rpc(call_local, any_peer, reliable) func take_damage(attacker: int, hit_position: Vector3, hit_normal: Vector3, damage:int, source_position: Vector3, damage_type, push: float):
|
||||
var attacker_node = main.get_node("Players").get_node(str(attacker))
|
||||
|
||||
if is_multiplayer_authority():
|
||||
print("Taken damage: ", damage, " by: ", attacker, " from: ", source_position)
|
||||
hud.damage(damage)
|
||||
main.player_list.players[self.get_multiplayer_authority()].health -= damage # reduce health
|
||||
main.push_local_player_info()
|
||||
|
||||
if main.player_list.players[self.get_multiplayer_authority()].health <= 0: # are we dead?
|
||||
print("Died")
|
||||
rpc(&'die', attacker)
|
||||
|
||||
attacker_node.rpc(&'damage_feedback', true) # let the attacker know he's got a kill
|
||||
else:
|
||||
attacker_node.rpc(&'damage_feedback', false) # let the attackr know he's got a hit
|
||||
|
||||
main.update_hud()
|
||||
|
||||
if not dead:
|
||||
rpc(&'moan') # all puppets must scream!
|
||||
|
||||
@rpc(any_peer, call_local, reliable) func spawn():
|
||||
$Head/Camera.position.y = 0
|
||||
$Head/Camera.rotation.z = 0
|
||||
jetpack_fuel = jetpack_tank
|
||||
|
||||
@rpc(any_peer, call_local, reliable) func die(killer_pid: int):
|
||||
var gibs = gibs_vfx.instantiate()
|
||||
|
@ -304,6 +379,14 @@ func damage(hp: int):
|
|||
|
||||
revenge_pid = killer_pid
|
||||
|
||||
$Head/Camera.position.y = -1 # lower the head to the ground, let the player see their gibs
|
||||
$Head/Camera.rotation.x = 0 # reset the tilt so the camera looks forward
|
||||
$Head/Camera.rotation.z = -20
|
||||
|
||||
jetpack_active = false
|
||||
view_zoom_target = .0
|
||||
view_zoom = 0
|
||||
|
||||
#queue_free()
|
||||
|
||||
func update_player(info) -> void:
|
||||
|
@ -368,6 +451,25 @@ func _physics_process(delta):
|
|||
if direction.length() > 0: # normalized() will return a null
|
||||
direction = direction.normalized()
|
||||
|
||||
# weapon bob
|
||||
if direction.length() > 0:
|
||||
if is_on_floor():
|
||||
$Head/Camera/Hand/Weapon.transform.origin.y = lerp($Head/Camera/Hand/Weapon.transform.origin.y, sin(main.uptime * 10) / 15, 4 * delta)
|
||||
else:
|
||||
$Head/Camera/Hand/Weapon.transform.origin.y *= 1 - delta * 8
|
||||
$Head/Camera/Hand/Weapon.transform.origin.y += sin(main.uptime * 2) / 1000 * delta
|
||||
$Head/Camera/Hand/Weapon.transform.origin.y -= motion_velocity.y * delta / 60
|
||||
|
||||
if Input.is_action_just_pressed("move_jump") and is_on_floor():
|
||||
var tween = create_tween()
|
||||
$Head/Camera/Hand/Weapon.transform.origin.y -= 0.025
|
||||
#$Head/Camera/Hand/Weapon.transform.origin.y -= 0.05
|
||||
|
||||
if is_on_floor() and not previously_on_floor:
|
||||
$Head/Camera/Hand/Weapon.transform.origin.y -= 1
|
||||
# if
|
||||
# $Head/Camera/Hand/Weapon.transform.origin.y -= 0.25
|
||||
|
||||
speed = speed_type[medium]
|
||||
accel = accel_type[medium]
|
||||
|
||||
|
@ -381,6 +483,10 @@ func _physics_process(delta):
|
|||
velocity.z = motion_velocity.z
|
||||
gravity_vec.y = motion_velocity.y
|
||||
|
||||
previously_on_floor = is_on_floor()
|
||||
|
||||
lagging_movement_velocity.lerp(motion_velocity, delta)
|
||||
|
||||
rpc(&'update_movement', global_transform, head.get_rotation(), motion_velocity, jetpack_active)
|
||||
|
||||
# (stair) climbing
|
||||
|
|
|
@ -221,7 +221,6 @@ script = ExtResource( "1" )
|
|||
[node name="Mesh" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.852763, 0)
|
||||
layers = 2
|
||||
cast_shadow = 0
|
||||
mesh = SubResource( "1" )
|
||||
surface_material_override/0 = null
|
||||
script = null
|
||||
|
@ -231,7 +230,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.45276, 0)
|
|||
script = null
|
||||
|
||||
[node name="Camera" type="Camera3D" parent="Head"]
|
||||
transform = Transform3D(1, 0, 2.38419e-07, 0, 1, 0, -2.38419e-07, 0, 1, 0, 0, 0)
|
||||
fov = 90.0
|
||||
script = null
|
||||
|
||||
|
@ -250,6 +248,12 @@ target_position = Vector3(0, 0, -1000)
|
|||
collision_mask = 2
|
||||
script = null
|
||||
|
||||
[node name="GPUParticlesCollisionSphere" type="GPUParticlesCollisionSphere" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 2.16632, 0, 0, 0, 1, 0.00910211, 0.760577, 0.00278068)
|
||||
layers = 7
|
||||
radius = 0.549216
|
||||
script = null
|
||||
|
||||
[node name="Body" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.852763, 0)
|
||||
shape = SubResource( "2" )
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
extends CPUParticles3D
|
||||
extends Node3D
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
|
@ -8,13 +8,11 @@ extends CPUParticles3D
|
|||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
emitting = true
|
||||
|
||||
$Gibs.emitting = true
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
|
||||
|
||||
func _on_Timer_timeout():
|
||||
queue_free()
|
||||
|
|
|
@ -1,39 +1,117 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://egphnvwk6cg"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://egphnvwk6cg"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/Effects/Gibs.gd" id="1_o0guu"]
|
||||
[ext_resource type="PackedScene" uid="uid://c5cwnfuw4go1b" path="res://Assets/Audio/SoundPlayer.tscn" id="2_3tb4k"]
|
||||
[ext_resource type="AudioStream" uid="uid://xv1jp0gql8tc" path="res://Assets/SFX/Player_Death_01.wav" id="3_hmhtq"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3sp1q"]
|
||||
albedo_color = Color(0.509804, 0.0235294, 0, 1)
|
||||
roughness = 0.26
|
||||
[sub_resource type="Gradient" id="Gradient_tjffd"]
|
||||
offsets = PackedFloat32Array(0, 0.874302, 1)
|
||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_riydg"]
|
||||
material = SubResource( "StandardMaterial3D_3sp1q" )
|
||||
[sub_resource type="GradientTexture" id="GradientTexture_07eoi"]
|
||||
gradient = SubResource( "Gradient_tjffd" )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id="ParticlesMaterial_jcugi"]
|
||||
lifetime_randomness = 0.15
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 0.5
|
||||
spread = 180.0
|
||||
initial_velocity_min = 1.0
|
||||
initial_velocity_max = 8.0
|
||||
angular_velocity_min = -15.0
|
||||
angular_velocity_max = 15.0
|
||||
damping_min = 0.1
|
||||
damping_max = 0.2
|
||||
angle_min = -180.0
|
||||
angle_max = 180.0
|
||||
scale_min = 0.5
|
||||
scale_max = 3.0
|
||||
color_ramp = SubResource( "GradientTexture_07eoi" )
|
||||
sub_emitter_mode = 1
|
||||
sub_emitter_frequency = 100.0
|
||||
sub_emitter_keep_velocity = true
|
||||
collision_enabled = true
|
||||
collision_friction = 0.31
|
||||
collision_bounce = 0.58
|
||||
collision_use_scale = true
|
||||
|
||||
[sub_resource type="OpenSimplexNoise" id="OpenSimplexNoise_tchuy"]
|
||||
octaves = 2
|
||||
period = 16.0
|
||||
|
||||
[sub_resource type="NoiseTexture" id="NoiseTexture_ixngr"]
|
||||
width = 64
|
||||
height = 64
|
||||
as_normal_map = true
|
||||
noise = SubResource( "OpenSimplexNoise_tchuy" )
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nvuyc"]
|
||||
transparency = 1
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_color = Color(1, 0.0235294, 0, 1)
|
||||
roughness = 0.14
|
||||
normal_enabled = true
|
||||
normal_texture = SubResource( "NoiseTexture_ixngr" )
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_ctp33"]
|
||||
material = SubResource( "StandardMaterial3D_nvuyc" )
|
||||
radius = 0.1
|
||||
height = 0.2
|
||||
radial_segments = 8
|
||||
rings = 8
|
||||
rings = 4
|
||||
|
||||
[sub_resource type="Curve" id="Curve_0e5oj"]
|
||||
_data = [Vector2(0.00694444, 0.954545), 0.0, 0.0, 0, 0, Vector2(1, 0), -2.07914, 0.0, 0, 0]
|
||||
[sub_resource type="Gradient" id="Gradient_roxnd"]
|
||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[node name="GPUParticles3D" type="CPUParticles3D"]
|
||||
[sub_resource type="GradientTexture" id="GradientTexture_jtdpg"]
|
||||
gradient = SubResource( "Gradient_roxnd" )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id="ParticlesMaterial_6gu8h"]
|
||||
color_ramp = SubResource( "GradientTexture_jtdpg" )
|
||||
collision_enabled = true
|
||||
collision_friction = 0.93
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_u05mr"]
|
||||
transparency = 1
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_color = Color(1, 0.00784314, 0, 1)
|
||||
roughness = 0.14
|
||||
billboard_mode = 3
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = false
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_ho3xr"]
|
||||
material = SubResource( "StandardMaterial3D_u05mr" )
|
||||
size = Vector2(0.1, 0.1)
|
||||
|
||||
[node name="GibbsEffect" type="Node3D"]
|
||||
script = ExtResource( "1_o0guu" )
|
||||
|
||||
[node name="Gibs" type="GPUParticles3D" parent="."]
|
||||
layers = 4
|
||||
emitting = false
|
||||
amount = 32
|
||||
sub_emitter = NodePath("../Blood")
|
||||
lifetime = 5.0
|
||||
one_shot = true
|
||||
explosiveness = 1.0
|
||||
fixed_fps = 30
|
||||
mesh = SubResource( "SphereMesh_riydg" )
|
||||
emission_shape = 3
|
||||
emission_points = PackedVector3Array(0.213792, 0.293558, -0.239298, -0.12737, 0.631196, -0.141563, 0.192791, 0.151973, -0.137897, 0.359606, 0.947813, -0.0768365, 0.194725, 0.587412, 0.214862, -0.0413049, 0.633023, 0.337953, -0.190239, 0.734695, -0.213316, 0.398734, 0.954908, -0.0184722, -0.0121239, 1.4246, -0.0232558, -0.0535609, 1.64598, -0.121451, 0.16018, 0.432162, 0.137138, 0.28397, 0.802465, 0.273994, -0.086569, 0.331748, -0.373907, 0.151013, 1.00774, 0.106493, 0.0316862, 0.78307, -0.0015597, 0.0137127, 1.32038, 0.186835, 0.354167, 0.429079, 0.0606308, 0.308906, 0.195378, -0.112554, 0.162532, 0.712726, -0.0580729, -0.148121, 0.258527, 0.196588, 0.121123, 0.125489, -0.0131164, -0.268994, 1.3866, -0.170491, -0.321323, 1.14779, 0.0402509, -0.0245586, 1.1546, -0.340647, 0.168819, 0.119007, 0.210639, 0.390349, 1.22382, 0.066388, 0.226391, 0.449593, 0.211008, 0.091519, 1.4079, 0.278107, -0.111734, 0.672877, 0.363257, -0.122951, 1.37178, 0.0514085, -0.265176, 0.408875, 0.23233, 0.138502, 0.247815, -0.282018, 0.158044, 1.35905, -0.301838, -0.0117804, 1.42503, -0.372285, -0.266539, 1.25614, 0.211245, 0.0765518, 0.871181, 0.13197, 0.0944997, 0.234855, 0.255727, -0.147605, 0.149461, 0.102494, -0.041316, 0.119079, 0.0632052, 0.0285764, 0.862697, -0.291928, 0.153573, 0.875813, 0.240219, -0.094903, 1.24591, 0.331878, -0.300984, 1.10989, 0.25754, 0.0280152, 0.227853, 0.305782, 0.144829, 1.13028, 0.247458, -0.297053, 1.33953, -0.25212, 0.255629, 0.426613, 0.175493, 0.180825, 0.921968, 0.333394, 0.0429266, 1.29984, 0.137121, 0.120818, 1.0851, 0.0890484, -0.246802, 0.314922, 0.118292, -0.0702293, 0.131391, 0.121838, 0.107325, 0.777287, -0.322295, 0.112643, 0.932287, 0.36087, 0.212013, 1.29013, 0.190726, 0.131307, 1.25809, -0.342333, -0.144784, 0.574611, 0.270844, 0.00399578, 1.25063, 0.228666, 0.109936, 1.47567, -0.0186085, 0.382821, 0.989886, 0.0529952, -0.11686, 1.24431, -0.363027, 0.209045, 1.60135, 0.0683457, 0.0921369, 0.784928, 0.151519, -0.0889999, 0.839174, -0.367262, 0.135316, 1.26909, 0.227138, -0.168382, 1.46148, -0.0122506, 0.227487, 0.604992, -0.244163, 0.263066, 0.41004, -0.200542, -0.181149, 0.957524, 0.186846, 0.313458, 1.23143, -0.0450301, 0.0249283, 1.27376, -0.180561, -0.229117, 1.24942, 0.279538, 0.181303, 1.1398, 0.164216, 0.201891, 1.54447, 0.025169, -0.301608, 1.20045, -0.0241991, 0.293079, 0.852535, 0.186271, 0.270674, 0.626333, 0.141311, 0.185143, 1.56542, -0.0231146, -0.183985, 0.855768, -0.109044, 0.220596, 0.85369, 0.184708, 0.0326539, 0.670344, -0.201186, 0.0935103, 0.36576, 0.332694, 0.0295326, 0.784154, 0.378336, -0.164651, 0.72306, -0.0226527, -0.22198, 1.50055, 0.117691, -0.0424937, 1.2494, 0.370492, 0.0782578, 1.0032, 0.115449, 0.143578, 0.950895, -0.00153738, 0.125742, 1.09669, 0.266231, -0.0031639, 0.0938585, -0.158077, 0.25241, 0.81581, 0.299586, 0.0682948, 0.329631, -0.0851988, -0.12918, 0.248223, -0.337992, 0.0366944, 0.303778, -0.345714, -0.240697, 0.608311, -0.178695, -0.0507606, 0.581082, 0.372165, -0.00363311, 0.193522, -0.306941, 0.0744256, 1.12727, -0.269475, -0.0880248, 0.306396, -0.124157, -0.383416, 1.34143, -0.091211, 0.0435722, 1.22679, -0.0277889, -0.154645, 0.629385, 0.334208, -0.136264, 0.312748, 0.340147, -0.0730954, 0.160824, -0.122244, -0.0656257, 0.292709, 0.18593, -0.233391, 0.599557, -0.117712, 0.359666, 1.42768, 0.00898111, 0.165606, 1.24167, -0.0305199, 0.0108935, 0.376355, -0.277372, 0.147166, 0.616227, 0.295277, -0.248208, 0.167717, -0.0723494, 0.223818, 1.35089, 0.0880279, -0.146517, 0.91615, 0.224953, 0.0213891, 1.30633, -0.0351697, -0.0157524, 1.48568, -0.181715, -0.0318395, 0.490449, -0.0141865, -0.219646, 0.944284, -0.0685343, -0.258311, 1.24031, 0.0813233, 0.161967, 1.239, -0.352594, 0.339281, 0.426037, -0.0404075, -0.198885, 1.35612, 0.102736, -0.00542265, 1.01909, -0.309931, -0.127917, 0.110843, -0.201308, 0.0107117, 0.113423, 0.0182374, -0.161015, 0.224641, -0.297972, 0.301496, 0.932366, -0.242365, 0.216504, 1.2761, -0.256302, -0.282683, 0.924247, 0.257186)
|
||||
spread = 180.0
|
||||
initial_velocity_min = 1.0
|
||||
initial_velocity_max = 4.0
|
||||
scale_amount_curve = SubResource( "Curve_0e5oj" )
|
||||
script = ExtResource( "1_o0guu" )
|
||||
fixed_fps = 0
|
||||
collision_base_size = 0.1
|
||||
visibility_aabb = AABB(-4, -3.55666, -4, 8, 4.42876, 8)
|
||||
process_material = SubResource( "ParticlesMaterial_jcugi" )
|
||||
draw_pass_1 = SubResource( "SphereMesh_ctp33" )
|
||||
script = null
|
||||
|
||||
[node name="Blood" type="GPUParticles3D" parent="."]
|
||||
visible = false
|
||||
amount = 16
|
||||
lifetime = 0.82
|
||||
randomness = 0.22
|
||||
fixed_fps = 0
|
||||
process_material = SubResource( "ParticlesMaterial_6gu8h" )
|
||||
draw_pass_1 = SubResource( "QuadMesh_ho3xr" )
|
||||
script = null
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
wait_time = 5.0
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
extends Node
|
||||
|
||||
enum DamageType {
|
||||
NONE,
|
||||
BULLET,
|
||||
EXPLOSION,
|
||||
ENVIRONMENT_HAZARD,
|
||||
}
|
||||
|
||||
#enum MaterialType { NONE,
|
||||
# CONCRETE,
|
||||
# METAL,
|
||||
# WOOD,
|
||||
# GLASS,
|
||||
# WATER,
|
||||
# }
|
|
@ -2,6 +2,12 @@ extends Control
|
|||
|
||||
@onready var main = get_tree().get_root().get_node("Main")
|
||||
|
||||
var pain: float = 0:
|
||||
set(value):
|
||||
$Damage/EyeBleed.material.set('shader_param/Damage', value)
|
||||
get:
|
||||
return $Damage/EyeBleed.material.get('shader_param/Damage')
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
@ -13,6 +19,18 @@ func _ready():
|
|||
func game_over(winner):
|
||||
scoretab(true, winner)
|
||||
|
||||
func damage(hp):
|
||||
print("HUD damage ", hp)
|
||||
pain += hp/20
|
||||
|
||||
func hide():
|
||||
$Crosshair.hide()
|
||||
$Chat.hide()
|
||||
|
||||
func show():
|
||||
$Crosshair.show()
|
||||
$Chat.show()
|
||||
|
||||
func update_scoretab():
|
||||
$ScoreTable/VBoxContainer/ScoreTab.text = ''
|
||||
|
||||
|
@ -61,3 +79,7 @@ func _process(delta):
|
|||
|
||||
if $ScoreTable.visible: # update the scores every frame when player is watching the score table
|
||||
update_scoretab()
|
||||
|
||||
if main.local_player:
|
||||
if not main.local_player.dead:
|
||||
pain *= 1 - delta # time heals pain, as long as you're alive
|
||||
|
|
|
@ -0,0 +1,192 @@
|
|||
[gd_resource type="VisualShader" load_steps=15 format=3 uid="uid://bet2pthddt01v"]
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_6ihsi"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_4sg8c"]
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 7
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_cq3b8"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, -0.25, 1, 0.25, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_ibeng"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatUniform" id="VisualShaderNodeFloatUniform_64m16"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
uniform_name = "Depth"
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_1syv6"]
|
||||
default_input_values = [0, 0.0, 1, 0.0, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatUniform" id="VisualShaderNodeFloatUniform_gmj03"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
uniform_name = "Damage"
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_g75xc"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorConstant" id="VisualShaderNodeColorConstant_awhie"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
constant = Color(1, 0.118141, 0, 1)
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_hcnqy"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
input_name = "uv"
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorDecompose" id="VisualShaderNodeVectorDecompose_c1wnt"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, Vector3(0, 0, 0)]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_4gtfo"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, -0.25, 1, 0.25, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_bp0gw"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_wvp6b"]
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 7
|
||||
|
||||
[resource]
|
||||
resource_local_to_scene = true
|
||||
code = "shader_type canvas_item;
|
||||
render_mode skip_vertex_transform, unshaded;
|
||||
|
||||
uniform float Damage;
|
||||
uniform float Depth;
|
||||
|
||||
|
||||
|
||||
void fragment() {
|
||||
// ColorConstant:18
|
||||
vec3 n_out18p0 = vec3(1.000000, 0.118141, 0.000000);
|
||||
float n_out18p1 = 1.000000;
|
||||
|
||||
|
||||
// FloatUniform:16
|
||||
float n_out16p0 = Damage;
|
||||
|
||||
|
||||
// FloatUniform:14
|
||||
float n_out14p0 = Depth;
|
||||
|
||||
|
||||
// Input:2
|
||||
vec3 n_out2p0 = vec3(UV, 0.0);
|
||||
|
||||
|
||||
// VectorDecompose:4
|
||||
float n_out4p0 = n_out2p0.x;
|
||||
float n_out4p1 = n_out2p0.y;
|
||||
float n_out4p2 = n_out2p0.z;
|
||||
|
||||
|
||||
// FloatFunc:10
|
||||
float n_out10p0 = 1.0 - n_out4p0;
|
||||
|
||||
|
||||
// FloatOp:11
|
||||
float n_out11p0 = min(n_out10p0, n_out4p0);
|
||||
|
||||
|
||||
// SmoothStep:12
|
||||
float n_in12p0 = -0.25000;
|
||||
float n_out12p0 = smoothstep(n_in12p0, n_out14p0, n_out11p0);
|
||||
|
||||
|
||||
// FloatFunc:8
|
||||
float n_out8p0 = 1.0 - n_out4p1;
|
||||
|
||||
|
||||
// FloatOp:9
|
||||
float n_out9p0 = min(n_out8p0, n_out4p1);
|
||||
|
||||
|
||||
// SmoothStep:7
|
||||
float n_in7p0 = -0.25000;
|
||||
float n_out7p0 = smoothstep(n_in7p0, n_out14p0, n_out9p0);
|
||||
|
||||
|
||||
// FloatOp:13
|
||||
float n_out13p0 = n_out12p0 * n_out7p0;
|
||||
|
||||
|
||||
// SmoothStep:15
|
||||
float n_in15p0 = 0.00000;
|
||||
float n_out15p0 = smoothstep(n_in15p0, n_out16p0, n_out13p0);
|
||||
|
||||
|
||||
// FloatFunc:17
|
||||
float n_out17p0 = 1.0 - n_out15p0;
|
||||
|
||||
|
||||
// Output:0
|
||||
COLOR.rgb = n_out18p0;
|
||||
COLOR.a = n_out17p0;
|
||||
|
||||
|
||||
}
|
||||
"
|
||||
graph_offset = Vector2(1260.12, -538.301)
|
||||
engine_version = {
|
||||
"major": 4,
|
||||
"minor": 0
|
||||
}
|
||||
mode = 1
|
||||
flags/light_only = false
|
||||
flags/skip_vertex_transform = true
|
||||
flags/unshaded = true
|
||||
nodes/fragment/0/position = Vector2(2200, -240)
|
||||
nodes/fragment/2/node = SubResource( "VisualShaderNodeInput_hcnqy" )
|
||||
nodes/fragment/2/position = Vector2(-800, 20)
|
||||
nodes/fragment/4/node = SubResource( "VisualShaderNodeVectorDecompose_c1wnt" )
|
||||
nodes/fragment/4/position = Vector2(-640, 40)
|
||||
nodes/fragment/7/node = SubResource( "VisualShaderNodeSmoothStep_4gtfo" )
|
||||
nodes/fragment/7/position = Vector2(500, 80)
|
||||
nodes/fragment/8/node = SubResource( "VisualShaderNodeFloatFunc_bp0gw" )
|
||||
nodes/fragment/8/position = Vector2(-340, 40)
|
||||
nodes/fragment/9/node = SubResource( "VisualShaderNodeFloatOp_wvp6b" )
|
||||
nodes/fragment/9/position = Vector2(-120, 120)
|
||||
nodes/fragment/10/node = SubResource( "VisualShaderNodeFloatFunc_6ihsi" )
|
||||
nodes/fragment/10/position = Vector2(-320, -220)
|
||||
nodes/fragment/11/node = SubResource( "VisualShaderNodeFloatOp_4sg8c" )
|
||||
nodes/fragment/11/position = Vector2(-80, -180)
|
||||
nodes/fragment/12/node = SubResource( "VisualShaderNodeSmoothStep_cq3b8" )
|
||||
nodes/fragment/12/position = Vector2(420, -240)
|
||||
nodes/fragment/13/node = SubResource( "VisualShaderNodeFloatOp_ibeng" )
|
||||
nodes/fragment/13/position = Vector2(920, -120)
|
||||
nodes/fragment/14/node = SubResource( "VisualShaderNodeFloatUniform_64m16" )
|
||||
nodes/fragment/14/position = Vector2(-200, -440)
|
||||
nodes/fragment/15/node = SubResource( "VisualShaderNodeSmoothStep_1syv6" )
|
||||
nodes/fragment/15/position = Vector2(1320, -240)
|
||||
nodes/fragment/16/node = SubResource( "VisualShaderNodeFloatUniform_gmj03" )
|
||||
nodes/fragment/16/position = Vector2(720, -540)
|
||||
nodes/fragment/17/node = SubResource( "VisualShaderNodeFloatFunc_g75xc" )
|
||||
nodes/fragment/17/position = Vector2(1592.12, -100.301)
|
||||
nodes/fragment/18/node = SubResource( "VisualShaderNodeColorConstant_awhie" )
|
||||
nodes/fragment/18/position = Vector2(1600, -400)
|
||||
nodes/fragment/connections = PackedInt32Array(2, 0, 4, 0, 8, 0, 9, 0, 9, 0, 7, 2, 10, 0, 11, 0, 4, 1, 8, 0, 4, 1, 9, 1, 4, 0, 10, 0, 4, 0, 11, 1, 11, 0, 12, 2, 12, 0, 13, 0, 7, 0, 13, 1, 14, 0, 12, 1, 14, 0, 7, 1, 13, 0, 15, 2, 16, 0, 15, 1, 15, 0, 17, 0, 17, 0, 0, 1, 18, 0, 0, 0)
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=20 format=3 uid="uid://bff5uslrxesjx"]
|
||||
[gd_scene load_steps=22 format=3 uid="uid://bff5uslrxesjx"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://blnjjtjifk22i" path="res://Assets/HUD/Vignette.png" id="1"]
|
||||
[ext_resource type="Script" path="res://Assets/HUD/HUD.gd" id="1_wc430"]
|
||||
[ext_resource type="Shader" uid="uid://bet2pthddt01v" path="res://Assets/HUD/HUD.tres" id="2_djyym"]
|
||||
[ext_resource type="Texture2D" uid="uid://dim1jrwuiy4qt" path="res://Assets/HUD/Crosshair Baseline.png" id="3_r05jh"]
|
||||
[ext_resource type="Texture2D" uid="uid://d0p7vfc62t5sb" path="res://Assets/HUD/Crosshair Hit.png" id="4_guqkl"]
|
||||
[ext_resource type="AudioStream" uid="uid://dfcyohpsqvri1" path="res://Assets/SFX/HUD_Confirm_Hit.wav" id="4_llqcq"]
|
||||
|
@ -15,6 +16,12 @@
|
|||
[ext_resource type="Texture2D" uid="uid://dvt25wji1pdyl" path="res://Assets/HUD/BarOver.svg" id="10_5i332"]
|
||||
[ext_resource type="Texture2D" uid="uid://0j6rxd7ncmu1" path="res://Assets/HUD/BarProgress.svg" id="11_tlgqu"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_dxk5q"]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource( "2_djyym" )
|
||||
shader_param/Damage = 0.0
|
||||
shader_param/Depth = 0.33
|
||||
|
||||
[sub_resource type="Animation" id="1"]
|
||||
resource_name = "Default"
|
||||
length = 0.1
|
||||
|
@ -116,6 +123,23 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Damage" type="Control" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = null
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="EyeBleed" type="ColorRect" parent="Damage"]
|
||||
material = SubResource( "ShaderMaterial_dxk5q" )
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = null
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Crosshair" type="Control" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,26 @@
|
|||
[remap]
|
||||
|
||||
importer="3d_texture"
|
||||
type="StreamTexture3D"
|
||||
uid="uid://dp74htl3lpbqu"
|
||||
path="res://.godot/imported/ParticlesCollisionSDF.exr-b07a292fdeca169c4ad7fd6c426ef1b8.stex3d"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Maps/DM1/ParticlesCollisionSDF.exr"
|
||||
dest_files=["res://.godot/imported/ParticlesCollisionSDF.exr-b07a292fdeca169c4ad7fd6c426ef1b8.stex3d"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=3
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/channel_pack=1
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
slices/horizontal=1
|
||||
slices/vertical=111
|
|
@ -0,0 +1,6 @@
|
|||
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://dkjl1nltj2lms"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/Materials/ExtendedMaterials/ExtendedMaterial.gd" id="1_ooagg"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource( "1_ooagg" )
|
|
@ -0,0 +1,19 @@
|
|||
extends StandardMaterial3D
|
||||
class_name ExtendedMaterial
|
||||
|
||||
#const WEAPON = preload('res://Assets/Weapons/Weapon.gd').DamageType
|
||||
#@export var type : MaterialType = MaterialType.NONE
|
||||
|
||||
@export var type : Resource
|
||||
#func get_damage_effect(damage_type: WEAPON.DamageType):
|
||||
#
|
||||
# match type:
|
||||
# MaterialType.CONCRETE:
|
||||
# match damage_type:
|
||||
# WEAPON.DamageType.BULLET: return "bullet hitting concrete"
|
||||
# WEAPON.DamageType.EXPLOSION: return "explosion hitting concrete"
|
||||
# MaterialType.METAL:
|
||||
# match damage_type:
|
||||
# WEAPON.DamageType.BULLET: return "bullet hitting concrete"
|
||||
# WEAPON.DamageType.EXPLOSION: return "explosion hitting concrete"
|
||||
#
|
|
@ -0,0 +1,6 @@
|
|||
extends Resource
|
||||
class_name ExtendedMaterialDamageEffect
|
||||
|
||||
@export var particle_effect: PackedScene
|
||||
@export var sound_effect: PackedScene
|
||||
@export var decal: PackedScene
|
|
@ -0,0 +1,5 @@
|
|||
extends Resource
|
||||
class_name ExtendedMaterialType
|
||||
|
||||
@export var damage_effect: Resource
|
||||
@export var footstep_sound: AudioStream # TODO extend this with a custom resource holding a collection of sounds
|
|
@ -59,13 +59,25 @@ var spread = spread_min
|
|||
casing_instance.angular_velocity.y += randf_range(-10, 10)
|
||||
casing_instance.angular_velocity.x += randf_range(-10, 10)
|
||||
|
||||
|
||||
if ray:
|
||||
if is_multiplayer_authority(): # only do this on the attacker's local instance of the game
|
||||
give_damage(ray['collider'], ray['position'], ray['normal'], 20, self.global_transform.origin, Globals.DamageType.BULLET, 1.0)
|
||||
|
||||
return # skip the rest - it's deprecated code
|
||||
|
||||
var impact_vfx
|
||||
|
||||
if ray: # did we hit anything?
|
||||
if ray['collider'].has_method(&'receive_damage') && is_multiplayer_authority():
|
||||
ray['collider'].rpc(&'damage', 20, get_multiplayer_authority(), global_transform.origin) # apply damage
|
||||
|
||||
return
|
||||
|
||||
if ray['collider'].has_method(&'damage'):
|
||||
if is_multiplayer_authority(): #get_tree().multiplayer.get_multiplayer_unique_id() == 1: # make sure this can only run on the server
|
||||
#print("SHOT HIT ", ray['collider'])
|
||||
ray['collider'].damage(20) # apply damage
|
||||
ray['collider'].rpc(&'damage', 20) # apply damage
|
||||
if main.player_list.get(ray['collider'].get_multiplayer_authority()).health <= 0: # if he ded
|
||||
ray['collider'].rpc(&'die', self.get_multiplayer_authority())
|
||||
|
||||
|
@ -106,6 +118,12 @@ var spread = spread_min
|
|||
|
||||
#print(ray)
|
||||
|
||||
func give_damage(target: Node, hit_position: Vector3, hit_normal: Vector3, damage: int, source_position: Vector3, type: Globals.DamageType, push: float):
|
||||
if target.has_method(&'take_damage'): # we've hit a player or something else - the ywill handle everything like effects etc.
|
||||
target.rpc(&'take_damage', get_multiplayer_authority(), hit_position, hit_normal, damage, source_position, type, push)
|
||||
else:
|
||||
pass # TODO take data from the material of the target and spawn an appropriate hit effect
|
||||
|
||||
func trigger(index: int, active: bool) -> void:
|
||||
#print("Weapon " + str(name) + ", Trigger " + str(index) + ", active: " + str(active))
|
||||
if index == 0 and active and $Handgun/AnimationPlayer.is_playing() == false:
|
||||
|
|
208
Game/Main.tscn
208
Game/Main.tscn
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://o68cawatyat2"]
|
||||
[gd_scene load_steps=23 format=3 uid="uid://o68cawatyat2"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1078bn8gy2qf" path="res://Map.tscn" id="1"]
|
||||
[ext_resource type="PackedScene" uid="uid://b856vwmg8a6o4" path="res://Assets/UI/GUI.tscn" id="2"]
|
||||
|
@ -7,12 +7,212 @@
|
|||
[ext_resource type="AudioStream" uid="uid://j42e203vte7h" path="res://Assets/Announcer/Go.wav" id="5_ilayd"]
|
||||
[ext_resource type="Script" path="res://Assets/Announcer/Announcer.gd" id="6_gcsgr"]
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_6ihsi"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_4sg8c"]
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 7
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_cq3b8"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, -0.25, 1, 0.25, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_ibeng"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatUniform" id="VisualShaderNodeFloatUniform_64m16"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
uniform_name = "Depth"
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_1syv6"]
|
||||
default_input_values = [0, 0.0, 1, 0.0, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatUniform" id="VisualShaderNodeFloatUniform_gmj03"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
uniform_name = "Damage"
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_g75xc"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorConstant" id="VisualShaderNodeColorConstant_awhie"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
constant = Color(1, 0.118141, 0, 1)
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_hcnqy"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
input_name = "uv"
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorDecompose" id="VisualShaderNodeVectorDecompose_c1wnt"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, Vector3(0, 0, 0)]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_4gtfo"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, -0.25, 1, 0.25, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_bp0gw"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_wvp6b"]
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 7
|
||||
|
||||
[sub_resource type="VisualShader" id="VisualShader_6cwap"]
|
||||
resource_local_to_scene = true
|
||||
code = "shader_type canvas_item;
|
||||
render_mode skip_vertex_transform, unshaded;
|
||||
|
||||
uniform float Damage;
|
||||
uniform float Depth;
|
||||
|
||||
|
||||
|
||||
void fragment() {
|
||||
// ColorConstant:18
|
||||
vec3 n_out18p0 = vec3(1.000000, 0.118141, 0.000000);
|
||||
float n_out18p1 = 1.000000;
|
||||
|
||||
|
||||
// FloatUniform:16
|
||||
float n_out16p0 = Damage;
|
||||
|
||||
|
||||
// FloatUniform:14
|
||||
float n_out14p0 = Depth;
|
||||
|
||||
|
||||
// Input:2
|
||||
vec3 n_out2p0 = vec3(UV, 0.0);
|
||||
|
||||
|
||||
// VectorDecompose:4
|
||||
float n_out4p0 = n_out2p0.x;
|
||||
float n_out4p1 = n_out2p0.y;
|
||||
float n_out4p2 = n_out2p0.z;
|
||||
|
||||
|
||||
// FloatFunc:10
|
||||
float n_out10p0 = 1.0 - n_out4p0;
|
||||
|
||||
|
||||
// FloatOp:11
|
||||
float n_out11p0 = min(n_out10p0, n_out4p0);
|
||||
|
||||
|
||||
// SmoothStep:12
|
||||
float n_in12p0 = -0.25000;
|
||||
float n_out12p0 = smoothstep(n_in12p0, n_out14p0, n_out11p0);
|
||||
|
||||
|
||||
// FloatFunc:8
|
||||
float n_out8p0 = 1.0 - n_out4p1;
|
||||
|
||||
|
||||
// FloatOp:9
|
||||
float n_out9p0 = min(n_out8p0, n_out4p1);
|
||||
|
||||
|
||||
// SmoothStep:7
|
||||
float n_in7p0 = -0.25000;
|
||||
float n_out7p0 = smoothstep(n_in7p0, n_out14p0, n_out9p0);
|
||||
|
||||
|
||||
// FloatOp:13
|
||||
float n_out13p0 = n_out12p0 * n_out7p0;
|
||||
|
||||
|
||||
// SmoothStep:15
|
||||
float n_in15p0 = 0.00000;
|
||||
float n_out15p0 = smoothstep(n_in15p0, n_out16p0, n_out13p0);
|
||||
|
||||
|
||||
// FloatFunc:17
|
||||
float n_out17p0 = 1.0 - n_out15p0;
|
||||
|
||||
|
||||
// Output:0
|
||||
COLOR.rgb = n_out18p0;
|
||||
COLOR.a = n_out17p0;
|
||||
|
||||
|
||||
}
|
||||
"
|
||||
graph_offset = Vector2(1260.12, -538.301)
|
||||
engine_version = {
|
||||
"major": 4,
|
||||
"minor": 0
|
||||
}
|
||||
mode = 1
|
||||
flags/light_only = false
|
||||
flags/skip_vertex_transform = true
|
||||
flags/unshaded = true
|
||||
nodes/fragment/0/position = Vector2(2200, -240)
|
||||
nodes/fragment/2/node = SubResource( "VisualShaderNodeInput_hcnqy" )
|
||||
nodes/fragment/2/position = Vector2(-800, 20)
|
||||
nodes/fragment/4/node = SubResource( "VisualShaderNodeVectorDecompose_c1wnt" )
|
||||
nodes/fragment/4/position = Vector2(-640, 40)
|
||||
nodes/fragment/7/node = SubResource( "VisualShaderNodeSmoothStep_4gtfo" )
|
||||
nodes/fragment/7/position = Vector2(500, 80)
|
||||
nodes/fragment/8/node = SubResource( "VisualShaderNodeFloatFunc_bp0gw" )
|
||||
nodes/fragment/8/position = Vector2(-340, 40)
|
||||
nodes/fragment/9/node = SubResource( "VisualShaderNodeFloatOp_wvp6b" )
|
||||
nodes/fragment/9/position = Vector2(-120, 120)
|
||||
nodes/fragment/10/node = SubResource( "VisualShaderNodeFloatFunc_6ihsi" )
|
||||
nodes/fragment/10/position = Vector2(-320, -220)
|
||||
nodes/fragment/11/node = SubResource( "VisualShaderNodeFloatOp_4sg8c" )
|
||||
nodes/fragment/11/position = Vector2(-80, -180)
|
||||
nodes/fragment/12/node = SubResource( "VisualShaderNodeSmoothStep_cq3b8" )
|
||||
nodes/fragment/12/position = Vector2(420, -240)
|
||||
nodes/fragment/13/node = SubResource( "VisualShaderNodeFloatOp_ibeng" )
|
||||
nodes/fragment/13/position = Vector2(920, -120)
|
||||
nodes/fragment/14/node = SubResource( "VisualShaderNodeFloatUniform_64m16" )
|
||||
nodes/fragment/14/position = Vector2(-200, -440)
|
||||
nodes/fragment/15/node = SubResource( "VisualShaderNodeSmoothStep_1syv6" )
|
||||
nodes/fragment/15/position = Vector2(1320, -240)
|
||||
nodes/fragment/16/node = SubResource( "VisualShaderNodeFloatUniform_gmj03" )
|
||||
nodes/fragment/16/position = Vector2(720, -540)
|
||||
nodes/fragment/17/node = SubResource( "VisualShaderNodeFloatFunc_g75xc" )
|
||||
nodes/fragment/17/position = Vector2(1592.12, -100.301)
|
||||
nodes/fragment/18/node = SubResource( "VisualShaderNodeColorConstant_awhie" )
|
||||
nodes/fragment/18/position = Vector2(1600, -400)
|
||||
nodes/fragment/connections = PackedInt32Array(2, 0, 4, 0, 8, 0, 9, 0, 9, 0, 7, 2, 10, 0, 11, 0, 4, 1, 8, 0, 4, 1, 9, 1, 4, 0, 10, 0, 4, 0, 11, 1, 11, 0, 12, 2, 12, 0, 13, 0, 7, 0, 13, 1, 14, 0, 12, 1, 14, 0, 7, 1, 13, 0, 15, 2, 16, 0, 15, 1, 15, 0, 17, 0, 17, 0, 0, 1, 18, 0, 0, 0)
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_q54x5"]
|
||||
resource_local_to_scene = true
|
||||
shader = SubResource( "VisualShader_6cwap" )
|
||||
shader_param/Damage = 0.0
|
||||
shader_param/Depth = 0.33
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
script = ExtResource( "3" )
|
||||
|
||||
[node name="HUD" parent="." instance=ExtResource( "4" )]
|
||||
|
||||
[node name="AnimationPlayer" parent="HUD/Crosshair" index="1"]
|
||||
[node name="EyeBleed" parent="HUD/Damage" index="0"]
|
||||
material = SubResource( "ShaderMaterial_q54x5" )
|
||||
|
||||
[node name="AnimationPlayer" parent="HUD/Crosshair" index="3"]
|
||||
blend_times = []
|
||||
|
||||
[node name="ChatHistory" parent="HUD/Chat/VBoxContainer" index="0"]
|
||||
|
@ -25,10 +225,10 @@ structured_text_bidi_override_options = []
|
|||
[node name="Editor" parent="HUD/Chat/VBoxContainer/Typing" index="1"]
|
||||
structured_text_bidi_override_options = []
|
||||
|
||||
[node name="RespawnCountdown" parent="HUD" index="3"]
|
||||
[node name="RespawnCountdown" parent="HUD" index="4"]
|
||||
structured_text_bidi_override_options = []
|
||||
|
||||
[node name="ScoreRank" parent="HUD" index="4"]
|
||||
[node name="ScoreRank" parent="HUD" index="5"]
|
||||
structured_text_bidi_override_options = []
|
||||
|
||||
[node name="Header" parent="HUD/ScoreTable/VBoxContainer" index="0"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=23 format=3 uid="uid://b1078bn8gy2qf"]
|
||||
[gd_scene load_steps=24 format=3 uid="uid://b1078bn8gy2qf"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://Assets/MapComponents/SpawnPoint.tscn" id="1"]
|
||||
[ext_resource type="PackedScene" uid="uid://caipucfu7hjkk" path="res://Assets/Props/BeerCan.tscn" id="1_ecbkv"]
|
||||
|
@ -9,6 +9,7 @@
|
|||
[ext_resource type="Texture2D" uid="uid://d24tv4e0dptk0" path="res://Assets/Effects/Logo.png" id="4_mci55"]
|
||||
[ext_resource type="Script" path="res://Assets/Decals/Logo.gd" id="5_yr76j"]
|
||||
[ext_resource type="PackedScene" uid="uid://w476ulvte1f6" path="res://Assets/Maps/DM1/DM1.glb" id="6"]
|
||||
[ext_resource type="StreamTexture3D" uid="uid://dp74htl3lpbqu" path="res://Assets/Maps/DM1/ParticlesCollisionSDF.exr" id="10_2c624"]
|
||||
|
||||
[sub_resource type="OpenSimplexNoise" id="OpenSimplexNoise_8aprf"]
|
||||
octaves = 6
|
||||
|
@ -448,4 +449,15 @@ current = true
|
|||
fov = 60.0
|
||||
script = null
|
||||
|
||||
[node name="GPUParticlesCollisionSDF" type="GPUParticlesCollisionSDF" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.22556, 9.57059, 0)
|
||||
cull_mask = 4293918721
|
||||
extents = Vector3(26.1656, 14.931, 22.8541)
|
||||
resolution = 3
|
||||
texture = ExtResource( "10_2c624" )
|
||||
script = null
|
||||
__meta__ = {
|
||||
"_edit_lock_": true
|
||||
}
|
||||
|
||||
[editable path="DM1"]
|
||||
|
|
|
@ -8,6 +8,28 @@
|
|||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[{
|
||||
"base": "StandardMaterial3D",
|
||||
"class": &"ExtendedMaterial",
|
||||
"language": &"GDScript",
|
||||
"path": "res://Assets/Materials/ExtendedMaterials/ExtendedMaterial.gd"
|
||||
}, {
|
||||
"base": "Resource",
|
||||
"class": &"ExtendedMaterialDamageEffect",
|
||||
"language": &"GDScript",
|
||||
"path": "res://Assets/Materials/ExtendedMaterials/ExtendedMaterialDamageEffect.gd"
|
||||
}, {
|
||||
"base": "Resource",
|
||||
"class": &"ExtendedMaterialType",
|
||||
"language": &"GDScript",
|
||||
"path": "res://Assets/Materials/ExtendedMaterials/ExtendedMaterialType.gd"
|
||||
}]
|
||||
_global_script_class_icons={
|
||||
"ExtendedMaterial": "",
|
||||
"ExtendedMaterialDamageEffect": "",
|
||||
"ExtendedMaterialType": ""
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Liblast"
|
||||
|
@ -18,6 +40,14 @@ boot_splash/use_filter=false
|
|||
boot_splash/bg_color=Color(0, 0, 0, 1)
|
||||
config/icon="res://Assets/Effects/Logo.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
Globals="*res://Assets/Globals.gd"
|
||||
|
||||
[display]
|
||||
|
||||
window/vsync/vsync_mode=2
|
||||
|
||||
[filesystem]
|
||||
|
||||
import/fbx/use_fbx=false
|
||||
|
@ -147,6 +177,8 @@ show_scoretab={
|
|||
|
||||
[rendering]
|
||||
|
||||
shadows/directional_shadow/soft_shadow_quality=4
|
||||
shadows/shadows/soft_shadow_quality=4
|
||||
reflections/sky_reflections/fast_filter_high_quality=true
|
||||
environment/ssao/quality=0
|
||||
environment/screen_space_reflection/roughness_quality=3
|
||||
|
|
63
README.md
63
README.md
|
@ -8,26 +8,21 @@ A Libre Multiplayer FPS Game built with Godot game engine and a fully FOSS toolc
|
|||
|
||||
Subscribe to the [YouTube channel](https://www.youtube.com/channel/UC1Oi1eXwdr8RlqIslyht5AQ) for upcoming video updates!
|
||||
|
||||
![Screenshot](./Screenshots/01.jpg)
|
||||
---
|
||||
![Screenshot](./Screenshots/02.jpg)
|
||||
---
|
||||
![Screenshot](./Screenshots/03.jpg)
|
||||
---
|
||||
![Screenshot](./Screenshots/04.jpg)
|
||||
---
|
||||
![Screenshot](./Screenshots/05.jpg)
|
||||
---
|
||||
![Screenshot](https://git.gieszer.link/unfa/liblast/media/branch/main/Screenshots/01.jpg)
|
||||
![Screenshot](https://git.gieszer.link/unfa/liblast/media/branch/main/Screenshots/02.jpg)
|
||||
![Screenshot](https://git.gieszer.link/unfa/liblast/media/branch/main/Screenshots/03.jpg)
|
||||
![Screenshot](https://git.gieszer.link/unfa/liblast/media/branch/main/Screenshots/04.jpg)
|
||||
![Screenshot](https://git.gieszer.link/unfa/liblast/media/branch/main/Screenshots/05.jpg)
|
||||
|
||||
**DISCLAIMER: THE GAME IS IN EARLY STAGES OF DEVELOPMENT.
|
||||
DO NOT EXPECT MUCH**
|
||||
|
||||
## How To Play
|
||||
## How to play
|
||||
|
||||
### Download the game
|
||||
|
||||
Go to the [releases page](https://git.gieszer.link/unfa/liblast/releases) and download the latest release of the game. You'll find some instructions and notes there as well:
|
||||
|
||||
Go to the releases page and download the latest release of the game. You'll find some instructions and notes there as well:
|
||||
https://git.gieszer.link/unfa/liblast/releases
|
||||
|
||||
There's one public dedicated server running at `liblast.unfa.xyz`.
|
||||
|
||||
|
@ -35,41 +30,42 @@ To start playing Liblast it's recommended to first host a local game and adjust
|
|||
|
||||
### Controls
|
||||
|
||||
| Key | Action |
|
||||
|--------------|----------------|
|
||||
| WASD | Movement |
|
||||
| Mouse | Camera |
|
||||
| Left Click | Shoot |
|
||||
| Space | Jump |
|
||||
| Shift (Hold) | Jetpack |
|
||||
| T | Chat with Team |
|
||||
| Y | Chat with All |
|
||||
| Z | Zoom |
|
||||
| ESC | Main Menu |
|
||||
- WASD to walk around
|
||||
- mouse to look around
|
||||
- mouse 1 to shoot
|
||||
- space bar to jump
|
||||
- shift to use the jetpack
|
||||
- T to write to your team mates (not complete yet)
|
||||
- Y to write to all players on the server (not complete yet)
|
||||
- Z to zoom
|
||||
- Esc for menu
|
||||
|
||||
## Rewrite Status
|
||||
|
||||
The game has been mostly rewritten from scratch in Godot 4.
|
||||
The `legacy` branch contains the initial, Godot 3-based version of the game. This version of the game has served well as a prototype and a testbed to help us figure out what we want to do. We've also learned some important lessons on our mistakes.
|
||||
The legacy branch contains the initial, Godot 3-based version of the game. This version of the game has served well as a prototype and a testbed to help us figure out what we want to do. We've also learned some important lessons on our mistakes.
|
||||
|
||||
We wanted to take advantage of the improved performance, features and workflow of Godot 4 and since the GDScript syntax is changing significantly - we've decided we'll take this opportunity to rebuild the game from scratch and improve our design.
|
||||
|
||||
Compared to the legacy version, most of the features are done, along with some extra things thet were either not done or not possible in Godot 3.
|
||||
|
||||
## Contributing and Getting in touch
|
||||
## Contributing
|
||||
|
||||
Check the [Contribution Guide!](./CONTRIBUTION.md)
|
||||
If you'd like to contribute to the project, please get in touch first, as we've got some designs in mind, and we'd hate to have any effort wasted!
|
||||
|
||||
## Get in touch
|
||||
|
||||
If you want to talk to the dev team and discuss the game in an instant manner, go here:
|
||||
https://chat.unfa.xyz/channel/liblast
|
||||
|
||||
## How to Edit the Game
|
||||
## How to edit the game
|
||||
|
||||
[Get the Godot 4 Editor](https://downloads.tuxfamily.org/godotengine/testing/4.0/4.0-dev.20211015) for your OS
|
||||
Get the Godot 4 editor for the OS of your choosing from here:
|
||||
https://downloads.tuxfamily.org/godotengine/testing/4.0/4.0-dev.20211004/
|
||||
|
||||
For example for Linux you need `Godot_[version]_linux.64.zip`. Extract the archive to obtain the Godot editor binary.
|
||||
For example for Linux you need `Godot_[version]_linux.64.zip`. Extract the archive to obtain the Godot editor binary (yes, it's a single file).
|
||||
|
||||
If you want to export the game (make game builds) you'll also need to download (and subsequently install in Godot) the export templates (file ending with `.tpz`).
|
||||
If you'll want to export the game (make game builds) you'll also need to download (and subsequently install in Godot) the export templates (file ending with `.tpz`).
|
||||
|
||||
After you have that done - proceeed based on your OS:
|
||||
|
||||
|
@ -111,7 +107,6 @@ git clone https://git.gieszer.link/unfa/liblast.git
|
|||
|
||||
3. Open GitBash in the cloned repository (ther should be an option in the context menu in Windows Explorer)
|
||||
|
||||
|
||||
4. Initialize Git-LFS:
|
||||
```
|
||||
git lfs install
|
||||
|
@ -123,9 +118,9 @@ git lfs pull
|
|||
```
|
||||
|
||||
6. Run the Godot editor and import the project located in `../Game/project.godot`
|
||||
```
|
||||
|
||||
|
||||
## What does the name of this project mean?
|
||||
# What does the name of this project mean?
|
||||
|
||||
`Libre` + `Blast` = `Liblast`
|
||||
|
||||
|
|
Loading…
Reference in New Issue