feat: cel-shaded look & feel overhaul — real audio, comic UI, themed VFX
Audio (all CC0 — Kenney packs + OpenGameArt, see assets/sounds/SOURCES.md): - Replace every procedural synth WAV with forged sounds (ffmpeg pitch/layer mixes): distinct fire sounds per weapon with 2-3 variations, explosions, footsteps x5, land/jump/dash/vault, knife swing, hit/kill confirms, bullet impacts, reload, flight loops, UI hover/click/confirm/error, match jingles, menu music - AudioManager.stream_for(): AudioStreamRandomizer per sound id — every weapon now gets variation + pitch randomization on each shot - Explosions and bullet impacts play positional audio; landing has its own sound instead of a pitched footstep; ambient wind bed on every map Visuals: - ExplosionVFX: shared cel-shaded burst (white-hot stepped core, ink shockwave ring, star spikes, flat smoke puffs) replaces the orange sphere in both local and remote-replay paths - Comic star muzzle flashes on all weapons; unified cel tracer bolts with ink outlines across hitscan/shotgun/remote paths - Impact decals: hard-stepped ink-splat gradients instead of soft airbrush - Toon shading on first-person view models + arms, third-person weapons, and the procedural humanoid fallback (no hull outlines on FBX weapons — their hard normals tear the inverted hull) - Fix: giant soft "blob" highlight on floors — toon rim/specular disabled on level-geometry materials (pre-existing artifact since the cel commit) - Fix: own third-person weapon rendered into the first-person camera (shadows-only now covers first_person_mode) UI: - UITheme: comic theme on the root window — Bangers display font (OFL), paper panels with thick ink borders + hard drop shadows, papaya accent, themed buttons/inputs/popups; hover/click sounds on all menu buttons - Main menu: tilted comic wordmark, sunset toon diorama, looping menu music - Match HUD: themed scoreboard/killfeed/kill counter Viewports: - 4x MSAA project-wide + viewmodel/diorama viewports (crisp ink lines) - Viewmodel camera near plane 0.01; third-person camera FOV syncs settings - debug/visual_capture.gd: dev tool to screenshot menu + level for review Verified: 11/11 movement tests, spawn smoke test 0 failures, before/after screenshot comparison of menu and level. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5
parent
1358183f98
commit
6c8b0ddd28
@@ -36,6 +36,8 @@ var death_screen: Control
|
||||
var ragdoll_instance: Node3D
|
||||
# Audio
|
||||
var footstep_player: AudioStreamPlayer
|
||||
var footstep_streams: Array = []
|
||||
var land_player: AudioStreamPlayer
|
||||
var dash_player: AudioStreamPlayer
|
||||
var recent_attackers: Dictionary = {} # attacker_id: timestamp
|
||||
var hit_player: AudioStreamPlayer
|
||||
@@ -182,6 +184,7 @@ func set_third_person(on: bool) -> void:
|
||||
return
|
||||
third_person = on
|
||||
if is_instance_valid(_tp_camera):
|
||||
_tp_camera.fov = SettingsManager.world_fov # stay in sync with settings
|
||||
_tp_camera.current = on
|
||||
if is_instance_valid(camera):
|
||||
camera.current = not on
|
||||
@@ -250,8 +253,18 @@ func _hide_remote_weapons() -> void:
|
||||
func _setup_audio() -> void:
|
||||
footstep_player = AudioStreamPlayer.new()
|
||||
footstep_player.bus = "SFX"
|
||||
footstep_player.stream = load("res://assets/sounds/footstep.wav")
|
||||
for path in ["res://assets/sounds/footstep.wav", "res://assets/sounds/footstep_01.wav",
|
||||
"res://assets/sounds/footstep_02.wav", "res://assets/sounds/footstep_03.wav",
|
||||
"res://assets/sounds/footstep_04.wav"]:
|
||||
if ResourceLoader.exists(path):
|
||||
footstep_streams.append(load(path))
|
||||
footstep_player.stream = footstep_streams[0] if not footstep_streams.is_empty() else null
|
||||
add_child(footstep_player)
|
||||
|
||||
land_player = AudioStreamPlayer.new()
|
||||
land_player.bus = "SFX"
|
||||
land_player.stream = load("res://assets/sounds/land.wav")
|
||||
add_child(land_player)
|
||||
|
||||
jump_player = AudioStreamPlayer.new()
|
||||
jump_player.bus = "SFX"
|
||||
@@ -492,34 +505,7 @@ func rpc_play_fire_effects(origin: Vector3, target_or_dir: Vector3, _weapon_name
|
||||
_spawn_remote_projectile(origin, target_or_dir, _weapon_name)
|
||||
|
||||
func _spawn_remote_tracer(origin: Vector3, target: Vector3) -> void:
|
||||
var tracer = Node3D.new()
|
||||
tracer.set_script(load("res://weapons/hitscan_tracer.gd"))
|
||||
|
||||
var t_mesh_inst = MeshInstance3D.new()
|
||||
var t_mesh = CapsuleMesh.new()
|
||||
t_mesh.radius = 0.02
|
||||
t_mesh.height = 1.0
|
||||
var t_mat = StandardMaterial3D.new()
|
||||
t_mat.albedo_color = Color(1.0, 0.8, 0.2)
|
||||
t_mat.emission_enabled = true
|
||||
t_mat.emission = Color(2.0, 1.5, 0.5)
|
||||
t_mesh.material = t_mat
|
||||
|
||||
t_mesh_inst.mesh = t_mesh
|
||||
t_mesh_inst.rotation.x = deg_to_rad(90)
|
||||
t_mesh_inst.position = Vector3(0, 0, -0.5)
|
||||
tracer.add_child(t_mesh_inst)
|
||||
|
||||
tracer.target_position = target
|
||||
|
||||
if origin.distance_squared_to(target) > 0.1:
|
||||
get_tree().current_scene.add_child(tracer)
|
||||
tracer.global_position = origin
|
||||
|
||||
var up_vec = Vector3.UP
|
||||
if abs((target - origin).normalized().dot(up_vec)) > 0.99:
|
||||
up_vec = Vector3.RIGHT
|
||||
tracer.look_at(target, up_vec)
|
||||
HitscanTracer.spawn_bolt(get_tree().current_scene, origin, target)
|
||||
|
||||
func _spawn_remote_projectile(origin: Vector3, fire_dir: Vector3, weapon_name: String) -> void:
|
||||
# Try to find the actual weapon to spawn its custom projectile so it looks identical!
|
||||
@@ -620,36 +606,7 @@ func server_play_explosion(pos: Vector3, radius: float) -> void:
|
||||
func rpc_play_explosion(pos: Vector3, radius: float) -> void:
|
||||
if is_multiplayer_authority(): return
|
||||
|
||||
var visual = MeshInstance3D.new()
|
||||
var s_mesh = SphereMesh.new()
|
||||
s_mesh.radius = radius
|
||||
s_mesh.height = radius * 2.0
|
||||
visual.mesh = s_mesh
|
||||
|
||||
var mat = StandardMaterial3D.new()
|
||||
mat.albedo_color = Color(1.0, 0.5, 0.0, 0.6) # Translucent orange
|
||||
mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA
|
||||
mat.emission_enabled = true
|
||||
mat.emission = Color(1.0, 0.3, 0.0)
|
||||
visual.material_override = mat
|
||||
|
||||
visual.position = pos
|
||||
get_tree().current_scene.add_child(visual)
|
||||
|
||||
var tween = visual.create_tween()
|
||||
tween.tween_property(mat, "albedo_color:a", 0.0, 0.3)
|
||||
tween.parallel().tween_property(visual, "scale", Vector3(1.1, 1.1, 1.1), 0.3)
|
||||
tween.tween_callback(visual.queue_free)
|
||||
|
||||
var audio = AudioStreamPlayer3D.new()
|
||||
audio.stream = load("res://assets/sounds/shotgun_fire.wav")
|
||||
audio.bus = "SFX"
|
||||
audio.pitch_scale = 0.7
|
||||
audio.max_distance = 150.0
|
||||
get_tree().current_scene.add_child(audio)
|
||||
audio.global_position = pos
|
||||
audio.play()
|
||||
audio.finished.connect(audio.queue_free)
|
||||
ExplosionVFX.spawn(get_tree(), pos, radius)
|
||||
|
||||
@rpc("any_peer", "call_local", "reliable")
|
||||
func server_take_damage(amount: float, hit_pos: Vector3, attacker_id: int, weapon_name: String, impulse: Vector3) -> void:
|
||||
@@ -973,13 +930,11 @@ func _on_movement_event(ev: String, data: Dictionary) -> void:
|
||||
elif ev == "dash":
|
||||
_speedline_burst = 1.0
|
||||
elif ev == "land":
|
||||
# Landing thud: reuse the footstep sample, pitched down and louder
|
||||
# with impact. Ground state resets pitch/volume before each step.
|
||||
if footstep_player:
|
||||
if land_player:
|
||||
var heavy: bool = data.get("heavy", false)
|
||||
footstep_player.pitch_scale = 0.55 if heavy else 0.7
|
||||
footstep_player.volume_db = 2.0 if heavy else -2.0
|
||||
footstep_player.play()
|
||||
land_player.pitch_scale = (0.8 if heavy else 1.0) * randf_range(0.95, 1.05)
|
||||
land_player.volume_db = 2.0 if heavy else -3.0
|
||||
land_player.play()
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
# Remote players: interpolate toward the owner's synced transform and
|
||||
|
||||
@@ -82,8 +82,9 @@ func update(delta: float) -> void:
|
||||
_footstep_timer -= delta
|
||||
if _footstep_timer <= 0.0:
|
||||
if player.footstep_player:
|
||||
# Reset pitch/volume (the landing thud reuses this player) and
|
||||
# add slight variation so steps don't machine-gun.
|
||||
# Random sample + slight pitch variation so steps don't machine-gun.
|
||||
if "footstep_streams" in player and not player.footstep_streams.is_empty():
|
||||
player.footstep_player.stream = player.footstep_streams.pick_random()
|
||||
player.footstep_player.pitch_scale = randf_range(0.92, 1.08)
|
||||
player.footstep_player.volume_db = -6.0
|
||||
player.footstep_player.play()
|
||||
|
||||
Reference in New Issue
Block a user