How josephliao542211/ggstudio works
Repository Scope
GGStudio is a multi-project game-development repository. It contains three independent HTML5 game projects, shared licensed art/audio sources, and GLB conversion/rigging toolchains. Binary source assets are expected through Git LFS. Root guidance: README.md, docs/README.md, vercel.json.
Product Entry Points
Each game is separately buildable/runnable, with its own Vite/TypeScript configuration and browser entry:
• Subway, an endless-runner project: Subway/index.html, Subway/src/main.ts, Subway/src/game/Game.ts.
• Comfy Zoo, a zoo-management/simulation game: comfy-zoo/index.html, comfy-zoo/src/main.ts, comfy-zoo/src/core/Game.ts.
• Zombie Motorworks, a vehicle-building survival game: zombie-motorworks/index.html, zombie-motorworks/src/app/main.ts, zombie-motorworks/src/app/App.ts.
Each project owns its runtime code, public assets, package manifest, and Vite configuration; they should be treated as deployment/build boundaries.
Asset Production and Shared Sources
Raw or reusable source assets are centralized rather than duplicated in game code:
• Shared/ contains third-party source packs, audio, fonts, UI art, and multiple source formats.
• saved/ retains raw/generated GLBs used as pipeline inputs, e.g. saved/models/gunslinger-source.glb.
• glb-pipeline/pipeline.mjs transforms textured GLB assets into optimized pixel-art/runtime assets, with Blender/Python stages in glb-pipeline/blender_voxelize.py and glb-pipeline/optimize.mjs.
• glb-rigger/rig.mjs applies declarative rigid-part animation hierarchies from files such as glb-rigger/gunslinger.rig.json.
The asset boundary is explicit: games consume runtime-ready artifacts from their public/assets directories, while Shared/ and saved/ are production inputs.
Comfy Zoo Architecture
Comfy Zoo is organized around a core game context and event-driven simulation:
• Core lifecycle, persistence, assets, and spatial queries: comfy-zoo/src/core/Game.ts, comfy-zoo/src/core/GameContext.ts, comfy-zoo/src/core/SaveSystem.ts.
• Data-driven content defines animals, shelters, resources, balance, and quests: comfy-zoo/src/data/animals.json, comfy-zoo/src/data/balance.json, comfy-zoo/src/data/quests.json.
• World generation and placement use tile/grid abstractions: comfy-zoo/src/world/WorldGen.ts, comfy-zoo/src/world/TileGrid.ts.
• Simulation systems update spawning, hunger, economy, construction, capture, and progression: comfy-zoo/src/systems/SpawnSystem.ts, comfy-zoo/src/systems/HungerSystem.ts, comfy-zoo/src/systems/EconomySystem.ts.
• UI consumes game state through dedicated HUD/menu modules: comfy-zoo/src/ui/index.ts, comfy-zoo/src/ui/HUD.ts.
Platform adapters isolate host integration for CrazyGames, Devvit, playable ads, and local development: comfy-zoo/src/platform/PlatformAdapter.ts, comfy-zoo/src/platform/CrazyGamesAdapter.ts.
Subway Architecture
Subway is a real-time endless-runner loop coordinated by a central game controller:
• Subway/src/game/Game.ts drives input, track/lane movement, collision handling, entities, and effects.
• Procedural/run progression is separated into reusable systems: Subway/src/systems/Spawner.ts, Subway/src/systems/DifficultyDirector.ts, Subway/src/systems/ScoreManager.ts.
• Player, chaser, obstacles, and track are distinct gameplay units: Subway/src/game/entities/PlayerAvatar.ts, Subway/src/game/entities/ChasingImposter.ts, Subway/src/game/Track.ts.
• Platform lifecycle and host SDK calls are abstracted behind providers: Subway/src/platform/PlatformSDK.ts, Subway/src/platform/providers/CrazyGamesProvider.ts, Subway/src/platform/providers/PokiProvider.ts.
Zombie Motorworks Architecture
Zombie Motorworks has a clear build-to-combat control flow:
1. The app/title layer manages launch, profiles, saves, badges, leaderboards, and CrazyGames access: zombie-motorworks/src/app/App.ts, zombie-motorworks/src/app/profileStore.ts, zombie-motorworks/src/app/crazyGamesSdk.ts.
2. The editor converts grid-based part placement into a vehicle blueprint: zombie-motorworks/src/editor/EditorMode.ts, zombie-motorworks/src/core/blueprint.ts, zombie-motorworks/src/core/placement.ts.
3. Runtime assembly turns blueprints into driveable combat vehicles: zombie-motorworks/src/runtime/assembler.ts, zombie-motorworks/src/runtime/vehicle.ts, zombie-motorworks/src/runtime/weapons.ts.
4. Survival mode runs arenas, waves, zombie AI, combat effects, and camera/UI: zombie-motorworks/src/survival/SurvivalMode.ts, zombie-motorworks/src/survival/WaveManager.ts, zombie-motorworks/src/survival/zombies/ZombieSystem.ts.
5. Core rules remain mostly pure/data-oriented—parts, economy, damage, progression, serialization, and wave models: zombie-motorworks/src/core/parts.ts, zombie-motorworks/src/core/economy.ts, zombie-motorworks/src/core/runSave.ts.
Main entry points: pipeline.mjs GLB optimization pipeline · GameContext.ts Game context · Game.ts Game controller · EditorMode.ts Vehicle editor
Components 26
Asset Production
Shared source assets are transformed into game-ready artifacts.
- Shared source packs · Licensed art, audio, fonts, and UI source material.
- Saved GLB inputs · Raw and generated GLB pipeline inputs.
- GLB optimization pipeline · Voxelizes and optimizes textured GLBs for runtime use.
glb-pipeline/pipeline.mjs - Blender voxelizer
glb-pipeline/blender_voxelize.py - GLB rigger · Applies declarative rigid-part animation hierarchies.
glb-rigger/rig.mjs
Subway
Independent endless-runner build and runtime.
- Browser entry
Subway/src/main.ts - Game controller · Coordinates input, movement, collisions, entities, and effects.
Subway/src/game/Game.ts - Run progression · Spawning, difficulty, and scoring systems.
Subway/src/systems/Spawner.ts - Runner world units · Player, chaser, obstacles, and track.
Subway/src/game/entities/PlayerAvatar.ts - Platform providers · Abstracts CrazyGames and Poki SDK lifecycles.
Subway/src/platform/PlatformSDK.ts - Runtime assets
Subway/public/assets
Comfy Zoo
Independent simulation-game build and runtime.
- Browser entry
comfy-zoo/src/main.ts - Game context · Owns lifecycle, persistence, assets, and spatial queries.
comfy-zoo/src/core/GameContext.ts - Game content · Animals, balance, and quest definitions.
comfy-zoo/src/data/animals.json - Generated tile world · Tile-grid generation and placement.
comfy-zoo/src/world/WorldGen.ts - Simulation systems · Spawning, hunger, and economy updates.
comfy-zoo/src/systems/SpawnSystem.ts - HUD and menus
comfy-zoo/src/ui/index.ts - Platform adapter · Adapts CrazyGames, Devvit, playable ads, and local hosts.
comfy-zoo/src/platform/PlatformAdapter.ts - Runtime assets
comfy-zoo/public/assets
Zombie Motorworks
Independent build-to-combat game runtime.
- Browser entry
zombie-motorworks/src/app/main.ts - App and profile layer · Launch, profiles, saves, badges, leaderboards, and host access.
zombie-motorworks/src/app/App.ts - Vehicle editor · Converts grid placement into vehicle blueprints.
zombie-motorworks/src/editor/EditorMode.ts - Core rules · Parts, economy, damage, progression, and serialization.
zombie-motorworks/src/core/parts.ts - Vehicle assembly · Builds driveable combat vehicles from blueprints.
zombie-motorworks/src/runtime/assembler.ts - Survival mode · Runs arenas, waves, zombie AI, combat, camera, and UI.
zombie-motorworks/src/survival/SurvivalMode.ts - Runtime assets
zombie-motorworks/public/assets
Connections 26
- Shared source packs → GLB optimization pipeline: source material
- Saved GLB inputs → GLB optimization pipeline: GLB input
- Blender voxelizer → GLB optimization pipeline: voxelization stage
- GLB optimization pipeline → GLB rigger: optimized models
- GLB optimization pipeline → Runtime assets: runtime artifacts
- GLB optimization pipeline → Runtime assets: runtime artifacts
- GLB optimization pipeline → Runtime assets: runtime artifacts
- Browser entry → Game controller: starts
- Game controller → Run progression: updates
- Game controller → Runner world units: controls
- Game controller → Platform providers: host lifecycle
- Runtime assets → Game controller: loads
- Browser entry → Game context: starts
- Game context → Game content: loads
- Game context → Generated tile world: builds
- Game context → Simulation systems: runs
- Simulation systems → HUD and menus: state updates
- Game context → Platform adapter: host integration
- Runtime assets → Game context: loads
- Browser entry → App and profile layer: starts
- App and profile layer → Vehicle editor: opens build mode
- Vehicle editor → Core rules: uses placement and parts
- Vehicle editor → Vehicle assembly: produces blueprint
- Vehicle assembly → Survival mode: vehicle to combat
- Core rules → Survival mode: rules and saves
- Runtime assets → App and profile layer: loads