Touhou Adventure gameplay

Why I built this

I built Touhou Adventure to gain experience developing a complete, multi-system commercial project and managing its release cycle as a solo developer on Steam. I wanted to move beyond small sandbox demos to construct a fully rounded game product.

Integrating real-time bullet-hell combat with deep farming and scheduling databases provided a playground to study system coordination and scope control. It was also an opportunity to experience publishing, community support, and product updates on a major store platform.

Releasing a commercial game taught me the lifecycle of shipped software, requiring me to pass Valve's store checks, integrate Steamworks SDK wrappers, and handle post-release support.


What it is

Touhou Adventure is a 2D RPG that combines bullet-hell action mechanics with life-simulation systems. Players explore worlds, manage crops, craft items, and complete scheduled NPC quest storylines:

  • Bullet-hell combat (Danmaku)
    Enemies fire directional and homing projectile patterns in real time. Players dodge volleys while attacking back. The system uses pooled projectile emitters with configurable angles and cooldowns.
  • Grid-based farming
    Players till soil tiles, plant seeds, and wait for crops to grow through multiple stages. Neighboring tiles are checked to auto-tile plowed patches into cohesive shapes. Farm layouts persist across scenes via serialized save data.
  • Crafting system
    A 2x2 drag-and-drop crafting grid matches ingredient combinations against recipe definitions. Valid combinations instantly produce output items that can be added to the inventory.
  • Branching dialogue and quests
    NPCs follow daily schedules using a timetable system and A* pathfinding, moving between points on a map based on the in-game hour. Talking to them triggers localized branching conversations with tracked quest objectives.
  • Save and load system
    Player state, inventory contents, farm tile layouts, and dialogue progress are serialized to a binary file. The game fully restores the world on load, including which crops are planted and which quests are active.
  • Character customization
    Players choose from multiple visual styles for their character at the start. Hotbar slot selection controls what tool, weapon, or seed is active, tying equipment choice to in-game actions.

Key challenges

One of the main hurdles was coordinating the real-time Danmaku combat systems alongside database-heavy life simulation loops. Pooling thousands of active bullets on screen without dropping frame rates, while keeping track of tilled farm grids, plant growth stages, and NPC scheduling models, required careful profiling of update loops.

Another blocker was setting up the deployment pipelines. Preparing build structures that compile correctly across target runtimes, testing Steam Cloud save paths, and formatting store assets to comply with Valve's metadata rules required building custom shell scripts and spending significant time testing platform wrappers before release.


How it works

The game architecture decouples core visual slots from backend data containers. In the inventory system, drag-and-drop slots on the canvas fire change events that update a data class, keeping UI components from mutating the inventory states directly.

The farming subsystem uses Coordinate grids. Plowing tiles fires checks to immediate neighbors, dynamically updating autotiling borders to draw cohesive patches. Growth states increment via timers, swapping prefab graphics as crops mature.

The NPC schedules run on scheduled timetables. Each hour of the in-game clock, NPCs evaluate target path nodes, driving seeker and pathfinding wrappers to route characters around collision assets.


Future improvements

Reflecting on the codebase, the reliance on a single central singleton manager created strong coupling across systems. It handled everything from UI instantiation to player coordinate histories, leading to CPU garbage collection spikes on scene transitions. I would redesign the core using dependency injection patterns to keep subsystems isolated.

I would also replace the parallel array serialization model used by the save system. A single offset index shifts and corrupts subsequent inventory slots, leading to parsing errors. Storing save files in structured JSON schemas would eliminate index alignment bugs entirely.

Detailed code analysis and specific examples of structural debt are documented in the repository README .