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:
@@ -3,8 +3,8 @@
|
||||
[ext_resource type="PackedScene" uid="uid://dio67r8ambe7h" path="res://Assets/arena_placeholder_v01.glb" id="2_nxogm"]
|
||||
[ext_resource type="PackedScene" uid="uid://cl54dt38yj2x" path="res://Assets/Arena.glb" id="3_fy5k1"]
|
||||
[ext_resource type="Script" uid="uid://dou5ar6tkmng1" path="res://levels/matador_spawn.gd" id="3_spawn"]
|
||||
[ext_resource type="Script" uid="uid://70j3ks1emhkd" path="res://crowd_marker.gd" id="9_agtuu"]
|
||||
[ext_resource type="Script" uid="uid://cj0ytlkuavmf4" path="res://crowd_billboards.gd" id="11_crowd"]
|
||||
[ext_resource type="Script" uid="uid://70j3ks1emhkd" path="res://systems/crowd/crowd_marker.gd" id="9_agtuu"]
|
||||
[ext_resource type="Script" uid="uid://cj0ytlkuavmf4" path="res://systems/crowd/crowd_billboards.gd" id="11_crowd"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_ulcgi"]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bm6rmt3xprhjs" path="res://Assets/bear_level_arena.glb" id="1_beararena"]
|
||||
[ext_resource type="Script" uid="uid://bbtlwihtlc1wp" path="res://levels/bear_spawn.gd" id="2_spawn"]
|
||||
[ext_resource type="PackedScene" uid="uid://o8ocjfprxa7u" path="res://Bear.tscn" id="3_bear"]
|
||||
[ext_resource type="PackedScene" uid="uid://o8ocjfprxa7u" path="res://actors/bear/bear.tscn" id="3_bear"]
|
||||
[ext_resource type="Script" uid="uid://dfk7dcvki7rqu" path="res://levels/bear_hud.gd" id="4_bearhud"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_floor"]
|
||||
|
||||
@@ -4,7 +4,7 @@ extends Node3D
|
||||
## spawners, lighting, colliders) into LevelRoot. Switching levels frees the whole
|
||||
## previous module first, so no old mesh or collider can survive into the next fight.
|
||||
|
||||
const PhysicsLayers = preload("res://physics_layers.gd")
|
||||
const PhysicsLayers = preload("res://systems/combat/physics_layers.gd")
|
||||
|
||||
@onready var _level_root: Node3D = $LevelRoot
|
||||
@onready var _camera: IsoCamera = $Player/Camera3D
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
[gd_scene format=3 uid="uid://b7afbx36ltb3f"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://crtm0xtiql3r8" path="res://actors/player/player.tscn" id="1_ulcgi"]
|
||||
[ext_resource type="Shader" uid="uid://d3xyyy5bh0ma" path="res://systems/render/ps1_filter.gdshader" id="4_ps1shader"]
|
||||
[ext_resource type="Script" uid="uid://butd6b3tdwxrv" path="res://ui/hud.gd" id="10_hud"]
|
||||
[ext_resource type="Script" uid="uid://ce5n4qu88mhyx" path="res://systems/render/ps1_filter.gd" id="12_ps1ctl"]
|
||||
[ext_resource type="Script" uid="uid://ptsfs3wq5bje" path="res://levels/game_shell.gd" id="13_shell"]
|
||||
|
||||
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_73fnb"]
|
||||
dof_blur_far_enabled = true
|
||||
dof_blur_far_distance = 8192.0
|
||||
dof_blur_far_transition = 8192.0
|
||||
dof_blur_near_enabled = true
|
||||
dof_blur_near_distance = 8192.0
|
||||
dof_blur_near_transition = 8192.0
|
||||
dof_blur_amount = 1.0
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ps1"]
|
||||
shader = ExtResource("4_ps1shader")
|
||||
shader_parameter/pixel_scale = 4.0
|
||||
shader_parameter/color_depth = 5.0
|
||||
shader_parameter/dither_strength = 0.8
|
||||
shader_parameter/scanline_strength = 0.2
|
||||
shader_parameter/roll_speed = 3.0
|
||||
shader_parameter/roll_strength = 1.0
|
||||
|
||||
[node name="scene" type="Node3D" unique_id=118294681]
|
||||
script = ExtResource("13_shell")
|
||||
|
||||
[node name="Player" parent="." unique_id=332720469 instance=ExtResource("1_ulcgi")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.2416196, 5.1711025, -4.841382)
|
||||
|
||||
[node name="Camera3D" parent="Player" index="1" unique_id=1120161087]
|
||||
attributes = SubResource("CameraAttributesPractical_73fnb")
|
||||
fov = 50.0
|
||||
near = 2.636
|
||||
far = 0.01
|
||||
|
||||
[node name="Skeleton3D" parent="Player/bull/Armature" parent_id_path=PackedInt32Array(332720469, 1386495166, 1942410469) index="0" unique_id=550138996]
|
||||
bones/0/position = Vector3(0, 0, 0.004288793)
|
||||
bones/0/rotation = Quaternion(0.71960354, 0, 0, 0.6943852)
|
||||
bones/0/scale = Vector3(1.3083478, 0.6738599, 1.3077359)
|
||||
bones/1/position = Vector3(0.003526625, -0.0043296535, 0.004082799)
|
||||
bones/1/rotation = Quaternion(-0.00038647576, 0.06909673, 0.9868542, -0.14609681)
|
||||
bones/1/scale = Vector3(1.0000021, 1.0000001, 1.0000006)
|
||||
bones/2/position = Vector3(-5.853537e-11, 0.002669535, -1.489375e-10)
|
||||
bones/2/rotation = Quaternion(-0.06929122, 3.2415448e-07, -0.11267061, 0.99121344)
|
||||
bones/2/scale = Vector3(1, 1.0000001, 0.9999999)
|
||||
bones/4/position = Vector3(0.004535823, -0.0021376952, -0.0042386237)
|
||||
bones/4/rotation = Quaternion(-0.24948508, 0.19590344, 0.9416978, -0.11217982)
|
||||
bones/4/scale = Vector3(0.99999994, 0.99999994, 1.0000002)
|
||||
bones/5/position = Vector3(1.264555e-10, 0.0028599252, -2.4303243e-10)
|
||||
bones/5/rotation = Quaternion(-0.58943665, -0.36607245, -0.2256448, 0.683842)
|
||||
bones/6/position = Vector3(-7.092306e-11, 0.003274492, 4.6413304e-10)
|
||||
bones/6/rotation = Quaternion(0.52910197, 0.15997829, 0.12024502, 0.82462066)
|
||||
bones/6/scale = Vector3(1, 1.0000001, 1.0000001)
|
||||
bones/8/position = Vector3(2.259811e-19, 0.0010177285, -0.008495503)
|
||||
bones/8/rotation = Quaternion(-0.70710677, 0, 0, 0.70710677)
|
||||
bones/8/scale = Vector3(1, 1, 1)
|
||||
bones/9/position = Vector3(4.814825e-35, 0.0017711426, 0)
|
||||
bones/9/scale = Vector3(1, 1, 1)
|
||||
bones/10/position = Vector3(4.814825e-35, 0.0018082206, 0)
|
||||
bones/10/scale = Vector3(1, 0.99999994, 1)
|
||||
bones/11/position = Vector3(0, 0.0019911951, 0)
|
||||
bones/11/rotation = Quaternion(0, 0, 0, 1)
|
||||
bones/11/scale = Vector3(1, 1, 1)
|
||||
bones/12/position = Vector3(0, 0.002023485, 0)
|
||||
bones/12/rotation = Quaternion(0, 0, 0, 1)
|
||||
bones/12/scale = Vector3(1, 1, 1)
|
||||
bones/13/position = Vector3(0, 0.0016682985, 0)
|
||||
bones/13/rotation = Quaternion(0, 0, 0, 1)
|
||||
bones/13/scale = Vector3(1, 1, 1)
|
||||
bones/14/position = Vector3(0, 0.0014960878, 0)
|
||||
bones/14/rotation = Quaternion(0, 0, 0, 1)
|
||||
bones/14/scale = Vector3(1, 1, 1)
|
||||
bones/15/position = Vector3(0, 0.0010996431, 0)
|
||||
bones/15/scale = Vector3(1, 0.99999994, 1)
|
||||
bones/17/position = Vector3(0, 0.000937381, 0.0075526168)
|
||||
bones/17/rotation = Quaternion(-5.3385083e-08, 0.70710677, 0.70710677, -5.3385083e-08)
|
||||
bones/17/scale = Vector3(1, 1, 1)
|
||||
bones/19/position = Vector3(-0.003526625, -0.0043296535, 0.004082799)
|
||||
bones/19/rotation = Quaternion(0.00038647576, 0.06909673, 0.9868542, 0.14609681)
|
||||
bones/19/scale = Vector3(1.0000021, 1.0000001, 1.0000006)
|
||||
bones/20/position = Vector3(5.853537e-11, 0.002669535, -1.489375e-10)
|
||||
bones/20/rotation = Quaternion(-0.06929122, -3.2415448e-07, 0.11267061, 0.99121344)
|
||||
bones/20/scale = Vector3(1, 1.0000001, 0.9999999)
|
||||
bones/22/position = Vector3(-0.004535823, -0.0021376952, -0.0042386237)
|
||||
bones/22/rotation = Quaternion(0.24948508, 0.19590344, 0.9416978, 0.11217982)
|
||||
bones/22/scale = Vector3(0.99999994, 0.99999994, 1.0000002)
|
||||
bones/23/position = Vector3(-1.264555e-10, 0.0028599252, -2.4303243e-10)
|
||||
bones/23/rotation = Quaternion(-0.58943665, 0.36607245, 0.2256448, 0.683842)
|
||||
bones/23/scale = Vector3(1, 1, 1)
|
||||
bones/24/position = Vector3(7.092306e-11, 0.003274492, 4.6413304e-10)
|
||||
bones/24/rotation = Quaternion(0.52910197, -0.15997829, -0.12024502, 0.82462066)
|
||||
bones/24/scale = Vector3(1, 1.0000001, 1.0000001)
|
||||
|
||||
[node name="HUD" type="CanvasLayer" parent="." unique_id=475750379]
|
||||
script = ExtResource("10_hud")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=998765394]
|
||||
layer = 10
|
||||
|
||||
[node name="PS1Filter" type="ColorRect" parent="CanvasLayer" unique_id=1660776144]
|
||||
material = SubResource("ShaderMaterial_ps1")
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("12_ps1ctl")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="LevelRoot" type="Node3D" parent="." unique_id=5023050]
|
||||
|
||||
[editable path="Player"]
|
||||
[editable path="Player/bull"]
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://32nyipcwrab5"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bbfvwolhomilp" path="res://tscn_s/torch.tscn" id="1_w7uyf"]
|
||||
[ext_resource type="PackedScene" uid="uid://bd56iuttyiypv" path="res://tscn_s/BarrelSimple.tscn" id="2_3o0md"]
|
||||
[ext_resource type="PackedScene" uid="uid://bbfvwolhomilp" path="res://props/torch.tscn" id="1_w7uyf"]
|
||||
[ext_resource type="PackedScene" uid="uid://bd56iuttyiypv" path="res://props/barrel_simple.tscn" id="2_3o0md"]
|
||||
[ext_resource type="PackedScene" uid="uid://dctmlh4hnuux1" path="res://Assets/Lobby_underground.glb" id="2_w7uyf"]
|
||||
[ext_resource type="Script" uid="uid://cwbf7jfkr8j10" path="res://Assets/lobby_underground.gd" id="4_73452"]
|
||||
[ext_resource type="Script" uid="uid://dn77mjyxllgl6" path="res://levels/to_the_bear_level.gd" id="5_6j2sa"]
|
||||
|
||||
@@ -12,7 +12,7 @@ const _EDGE_ACTIVE := Color(1.00, 0.82, 0.32, 0.95)
|
||||
const _NODE_SIZE := 58.0
|
||||
const _BOSS_SIZE := 88.0
|
||||
|
||||
const _MENU_SCENE := "res://MainMenu.tscn"
|
||||
const _MENU_SCENE := "res://ui/main_menu.tscn"
|
||||
|
||||
var _map_area: Control
|
||||
var _completion: PanelContainer
|
||||
|
||||
@@ -3,7 +3,7 @@ extends Node3D
|
||||
signal matador_killed
|
||||
signal all_defeated
|
||||
|
||||
const MATADOR := preload("res://Matador.tscn")
|
||||
const MATADOR := preload("res://actors/matador/matador.tscn")
|
||||
|
||||
var _alive: int = 0
|
||||
var _wave: int = 0
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ signal run_started
|
||||
|
||||
# Every level loads the same reusable shell (player, camera, HUD, PS1 filter); the shell
|
||||
# then instances the level's own `level_scene` module into its LevelRoot.
|
||||
const _SHELL_SCENE := "res://scene.tscn"
|
||||
const _SHELL_SCENE := "res://levels/game_shell.tscn"
|
||||
const _ARENA_LEVEL := preload("res://levels/arena_level.tscn")
|
||||
const _BEAR_LEVEL := preload("res://levels/bear_level.tscn")
|
||||
const _LOBBY_LEVEL := preload("res://levels/lobby_level.tscn")
|
||||
@@ -53,7 +53,7 @@ const BONUS_HP_CAP: int = 2
|
||||
# (its geometry + spawners) and the opponent. The arena (matador wave, normal + boss
|
||||
# flavours) and the bear (a lone boss enemy that can turn up as a normal node) live here.
|
||||
# Future levels — china shop — slot in the same way: a new module + a LevelDef entry.
|
||||
const _BEAR_SCENE := preload("res://Bear.tscn")
|
||||
const _BEAR_SCENE := preload("res://actors/bear/bear.tscn")
|
||||
|
||||
var _arena: LevelDef
|
||||
var _arena_boss: LevelDef
|
||||
|
||||
Reference in New Issue
Block a user