Reorganize the codebase into role-based folders (snake_case)
Move the 40-odd root-level scripts and scenes into a tree that groups by role,
per the approved roadmap (WS2/WS3): actors/{player,matador,bear}, systems/{combat,
fx,input,debug,render,crowd,config}, ui/, props/ (was tscn_s/). Rename the shell
scene.tscn -> levels/game_shell.tscn and every PascalCase scene to snake_case
(Player.tscn -> player.tscn, MainMenu.tscn -> main_menu.tscn, etc.) so the
case-insensitive web/macOS filesystems can't alias two files together.
Done as a scripted move: each file travels with its .uid; every quoted res:// path
across scenes, scripts, .tres, and project.godot's 9 autoloads is rewritten; the
.godot uid/class cache is rebuilt from scratch. Scenes still resolve by uid, so the
rewrite is belt-and-suspenders. Lint globs (run_tests.sh + both CI workflows) now
walk the new dirs; an orphan animation_tree.gd.uid and 7 pre-existing trailing-
whitespace lints (barrel/torch, never covered by the old root-only glob) are cleaned.
Full suite green on both sides. Asset consolidation (Assets/Animations/fonts ->
art/) is deferred — moving imported .glb/.png/.ttf is safer done in the editor.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017KoYBYQgRyY1zDHXMsXY3V
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
shader_type spatial;
|
||||
// Flat crowd sprite. Each instance is oriented at build time to face the arena centre
|
||||
// (see crowd_billboards.gd) — NOT the camera — so spectators on different segments of
|
||||
// the ring face inward toward the action, like a real stand. Unshaded (the sheet was
|
||||
// baked with lighting), alpha-tested (no transparency sorting across hundreds of
|
||||
// quads), nearest-filtered for a crisp PS1 look that matches the ps1_filter effect.
|
||||
render_mode unshaded, cull_disabled, shadows_disabled, depth_draw_opaque;
|
||||
|
||||
uniform sampler2D sheet : source_color, filter_nearest;
|
||||
uniform int hframes = 8;
|
||||
uniform float fps = 10.0;
|
||||
uniform float alpha_clip = 0.4;
|
||||
|
||||
varying flat float v_frame;
|
||||
varying flat vec3 v_tint;
|
||||
|
||||
void vertex() {
|
||||
// Per-instance clap phase (0..1) and tint are packed into the MultiMesh custom data.
|
||||
// The instance transform already carries the inward facing, so no billboard maths.
|
||||
float phase = INSTANCE_CUSTOM.x;
|
||||
v_tint = INSTANCE_CUSTOM.yzw;
|
||||
v_frame = floor(mod(TIME * fps + phase * float(hframes), float(hframes)));
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// Sheet is two rows: top = front, bottom = back. Show the back when the camera is
|
||||
// behind the spectator (they're facing into the arena, away from us).
|
||||
float u = (UV.x + v_frame) / float(hframes);
|
||||
float v = UV.y * 0.5 + (FRONT_FACING ? 0.0 : 0.5);
|
||||
vec4 c = texture(sheet, vec2(u, v));
|
||||
if (c.a < alpha_clip) {
|
||||
discard;
|
||||
}
|
||||
ALBEDO = c.rgb * v_tint;
|
||||
}
|
||||
Reference in New Issue
Block a user