Archived on 2026-10-24. This is a historical implementation note, not current setup instructions or an active task list. Original claims, code examples, file paths, and completion statements have not all been revalidated. Use the current documentation and issue register for maintenance decisions.
Tiny-Chaos Code Structure¶
Legend¶
- 📍 existing script already in its intended folder (matches
docs/file_tree.md) - 📝 script still sitting in an old/legacy folder but already implemented
- 🧩 planned/placeholder component not created yet
- ❓ entry listed in
docs/file_tree.mdbut no script currently present (needs verification/creation)
Root Overview¶
- Actual top-level folders under
Assets/Script:Editor,Entities,GameSystem,Interfaces,Items,Manager,Network,ScriptableObjects,Steamworks.NET,Tutorial. - Planned folders from
docs/file_tree.mdnot yet present:Core,Enums,Utilities,UI(their contents currently live underManageror other folders). - Goal: migrate scripts from
Assets/Script/Manager/...intoCoreorGameSystemas documented below, align UI scripts under a dedicatedAssets/Script/UI, and ensure each subfolder mirrors the plan.
1. Core¶
- 📍
GameManager.cs(Assets/Script/Core/Game/GameManager.cs) – still the central god class but now under Core; eventual rename toGameSessionController. - 📍
PoolManager.cs(Assets/Script/Core/Pooling/PoolManager.cs) – global pooling service. - 📍
GameSettings.cs(Assets/Script/Core/Systems/GameSettings.cs) – runtime settings bootstrap. - 📍
SaveManager.cs(Assets/Script/Core/Systems/SaveManager.cs) – persistence layer, formerly in Utilities. - 📍
GameEvents.cs(Assets/Script/Core/Events/GameEvents.cs) – current global event bus. - 🧩
AudioManager.cs(Assets/Script/Core/Audio/AudioManager.cs) – new singleton scaffold awaiting migration of actual audio logic. - 🧩
GameSessionController– future MonoBehaviour to replaceGameManageronce responsibilities split. - 🧩
GameEndFlow– extracted coroutine/leaderboard logic (may live in Core or GameSystem once built). - 🧩
StageUnlockService– unlock persistence helper (if it ends up scene-agnostic it can remain in Core; otherwise move to GameSystem/Progression).
2. Editor¶
- 📍
Assets/Script/Editor/CheatFunctions.cs,CheatWindow.cs,SpawnDataEditor.cs,UpgradeEditor.cs– already underEditor/. - 📦 Matches
docs/file_tree.md(Editorfolder). No migration needed besides namespace cleanup later.
3. Entities¶
Actual structure uses Entities/Enemies, Entities/EnemySpawner, Entities/Player. Map each planned subfolder:
3.1 Base
- 📍 Entities/Entity.cs – aligns with plan.
3.2 Enemies (docs/file_tree "Enemy")
- 📍 Entities/Enemies/Boss.cs, BossSpawn.cs, Enemy.cs, EnemyAttackAOE.cs, EnemyAttackMortar.cs, EnemyAttackRanged.cs, Indicator.cs.
- Subfolders:
- EnemyCore → 📍 Enemies/EnemyCore/EnemyAttack.cs, EnemyAttackState.cs, EnemyBaseState.cs, EnemyMechanic.cs.
- EnemyState → 📍 numerous scripts (EASChargeAttack.cs, EASChaseAttack.cs, EASExplodeAttack.cs, EASGoblinKingSummon.cs, EASGroundAttack.cs, EASHydraAttack.cs, EASMinotaurAttack.cs, EASMortarAttack.cs, EASMotherSlime.cs, EASNormalAttack.cs, EASRangedAttack.cs, EASRangedBurstAttack.cs, EASSummonCreature.cs, EASVampireAttack.cs, ESChase.cs, ESIdle.cs, ESSpawn.cs, ESStroll.cs, ESSuicide.cs, ESWarp.cs). Already under Entities/Enemies/....
- Boss subfolder → 📍 Enemies/Boss/SAGoblinKing.cs, SAHydra.cs, SAMinotaur.cs.
- Mechanic → 📍 Enemies/Mechanic/EMBulletShoot.cs, EMChangeState.cs, EMHeatSystem.cs, EMMortarShoot.cs, EMSummonAOE.cs, EMSummonCreature.cs, EMTimerAbility.cs.
3.3 Enemy Spawner
- 📍 Entities/EnemySpawner/SpawnerData.cs, SpawnerEventManager.cs (heavy; later refactor to GameSystem/Spawning).
3.4 Player
- 📍 Entities/Player/*.cs (AbilityHolder, AbilityPanel, CircularRotator, CircularWeapon, Companion*, MovementTrail, Player (core), PlayerAOE, PlayerAttack, PlayerAttackCarrier, PlayerCollectItem, PlayerModifier, PlayerWeapon, StatusPanel, Wisp, etc.).
- Mechanic (folder currently empty per plan) – ❓ no dedicated Player/Mechanic scripts yet.
4. Enums¶
- ❓ Folder not present in repo yet. Need to gather enum definitions (likely spread across scripts) and relocate later.
5. GameSystem¶
Current contents:
- 📍 GameSystem/GameState/GameStateService.cs.
- 📍 GameSystem/Player/PlayerManager.cs.
- 📍 GameSystem/Bootstrap/GameInitializer.cs (class still named GameInitialization; TODO rename when ready).
- 📍 GameSystem/Upgrades/UpgradeSelection.cs, UpgradeFunction.cs, UpgradeEvoFunction.cs, WeaponEvoData.cs.
- 📍 GameSystem/Rewards/RewardRoller.cs – now owns reward queue processing, upgrade card spawning, reroll flow, and FX triggering (still driven through GameManager wrappers until UI extraction finishes).
Planned (per docs/file_tree):
- ❓ EventManager.cs – verify existence (not yet in repo).
- ❓ GameResult.cs, GameState.cs, GameUI.cs – referenced in plan but not yet located.
- 🧩 RewardManager.cs – planned to host reward tables/logic (currently inside GameManager + UpgradeSelection).
- 📝 Timer.cs currently Manager/Game/Timer.cs; target GameSystem/Time.
6. Interfaces¶
- 📍
Interfaces/ICollectible.cs,ICrowdControl.cs,IDamageable.cs(already underAssets/Script/Interfaces). - Matches plan; no migration needed.
7. Items¶
- 📍
Items/Items.cs,ItemsBreakable.cs,ItemsIndicator.cs,ItemsMerger.cs. - Align with
Itemsfolder in plan; later consider subfolders if list grows.
8. Manager (Legacy Hub Needing Split)¶
Folder structure: Achievement, Game, Mainmenu, Resources, Utilities (Resources now empty after migrating to Core).
8.1 Achievement
- 📍 AchievementManager.cs, GameDataCounter.cs – target GameSystem/Achievement eventually.
- 8.2 Game (major god classes)
- 📝
CameraController.cs– should move toGameSystem/Camera. - 📝
DamagePopUp.cs– belongs toUI/GameHUD. - 📝
DialogManager.cs–UI/GameorUI/Dialog. - 📝
EndlessTileMap.cs,MapGenerator.cs,ScreenBounds.cs– world/terrain utilities →GameSystem/World. - 📝
GameMenuManager.cs– split intoUI/GameHUD+ menu logic. - (Moved)
GameSettings.cs,GameInitialization.cs,GameEvents.cs,PoolManager.cs, upgrade scripts – see Core/GameSystem sections. - 📝
SkillIndicator.cs,SpecialUpgradeDatabaseButton.cs,SpecialUpgradeDatabaseManager.cs– still need new homes. - 📝
Timer.cs– pending move toGameSystem/Time.
8.3 Mainmenu
- 📍 Scripts already grouped: ShopManager.cs, ShopButton.cs, SoundManager.cs, MenuManager.cs, MenuManager UI components (CharacterManager.cs, CollectionManager.cs, CollectionButton.cs, LevelManager.cs, LevelSelectButton.cs, TabsManager.cs, Panel.cs, LeaderboardButton.cs, ChangeLogReader.cs, Statistic.cs, etc.). Target UI/MainMenu.
8.4 Resources
- (now empty after moving Ability/Audio/GameResources into Core/Resources).
8.5 Utilities
- 📍 Utility scripts (AbilityFunction.cs, Announcer.cs, ButtonChecker.cs, ChangeKeyImage.cs, CharacterWobble.cs, DemoButton.cs, ExpandedMenu.cs, GameMechanic.cs, GameUtilities.cs, InputManager.cs, LocalizationManager.cs, SaveManager.cs, SettingsInterface.cs, SwitchToggle.cs, TextAnimator.cs, TrackerStat.cs, Yielders.cs).
- Plan: split between Utilities (static helpers) and Core/Systems (InputManager, SaveManager, LocalizationManager).
9. Network¶
- 📍
DiscordRichPresence.cs,Hyperlink.cs,LeaderboardManager.cs– already underNetwork/. Later, align withdocs/NetworkREADME.md.
10. ScriptableObjects¶
- 📍
Ability.cs,Character.cs,DialogTrigger.cs,KeybindPreset.cs,Keys.cs,LevelData.cs,ShopUpgrade.cs,SO_Achievement.cs,SO_Upgrade.cs. - Already grouped; ensure references updated when managers move.
11. Steamworks.NET¶
- 📍
SteamManager.cs,SteamScript.cs– keep under this folder, just ensure dependencies use new GameSystem services when available.
12. Tutorial¶
- 📍 Tutorial suite (
TutorialCamera.cs,TutorialEnemy.cs,TutorialManager.cs,TutorialPlayer.cs,TutorialPlayerAttack.cs,TutorialPoint.cs,TutorialSpawner.cs). - Will eventually depend on the refactored GameSystem interfaces instead of
GameManager.
13. UI (Planned)¶
- 📍
UI/GameHUD/RewardUIController.csplaceholder ready for HUD reward logic. - 📍
UI/GameHUD/Upgrades/UpgradeButton.csmoved from Manager/Game. - ❓ Remaining UI scripts still live under
Manager/Mainmenu,Manager/Game(DamagePopUp,StatusPanel, etc.); migrate intoUI/GameHUD,UI/MainMenu,UI/Commonover time.
14. Utilities (Planned)¶
- ❓ Folder not present; see Manager/Utilities list. Need to move general-purpose helpers here.
Upcoming Organization Work¶
- Move lifecycle + pause/resume into
Core/Game/GameSessionController; keepGameManageras temporary facade until all callers switch. - Create
GameSystem/Rewards/RewardRoller.cs+UI/GameHUD/RewardUIController.cs, move reward queue code and button FX there. - Introduce
GameSystem/Upgradesnamespace for upgrade-related scripts; split logic/UI. - ✅ Core/Resources now contains ability/audio/game resource singletons.
- Stand up
UI/GameHUD/GameHUDControllerto own XP/score UI; pointGameManagerto it. - Once new folders exist, update
docs/codestructure.mdentries from 📝/🧩 to 📍 as scripts migrate.