Engineering Practices for an AI-Driven Bullet Hell Survival Game

    This article explores the engineering practices of developing an AI-driven bullet hell survival game without relying on traditional commercial game engines. It details the system architecture, engineering constraints for AI-assisted "vibe coding," rendering and performance budgets, gameplay modeling, AI asset pipeline governance, and quality assurance. The core focus is on transforming "AI-driven" development into a maintainable, verifiable, and publishable engineering workflow for small teams under short development cycles.

    1. Background and Core Problems

    When a gothic fantasy bullet hell survival project completes its prototype development—from concept to a distributable desktop playable version—in a short time without relying on traditional commercial game engines, the real takeaway is not simply whether AI can write code. Instead, it is about how AI-assisted development can enter a maintainable, verifiable, and publishable engineering workflow.

    The technical characteristics of this case can be summarized as follows: using a strongly typed scripting language for core logic, a 2D rendering library for visual presentation, an Entity Component System (ECS) for organizing runtime data, and a desktop application packaging framework to deliver the executable. Art assets were produced by conversational generative models, music was AI-generated, and animations simulated dynamic effects like “shaking” using custom shaders. The development process relied heavily on “vibe coding” with intelligent programming assistants.

    The advantages of this approach include strong control, a lightweight architecture, and fast iteration. Developers can directly dictate the render loop, resource loading, entity management, and packaging process without being constrained by the black-box behaviors and heavy editors of commercial engines. However, the trade-offs are equally apparent: numerous “built-in engine capabilities” such as input, audio, resource pipelines, scene management, crash reporting, platform adaptation, code signing, and updates must be built or integrated manually. This is especially true when integrating the desktop packaging framework with content distribution platforms; signing, installers, update strategies, crash collection, and platform API adaptations are often less smooth than in mature commercial engines. Therefore, this case is abstracted into a general technical problem: Under the conditions of a small team, short cycle, and strong AI assistance, how to design a runnable, scalable, and governable bullet hell survival game engineering project.

    2. Overall Architecture: Layers and Boundaries

    It is recommended to divide the system into six layers: Platform Shell, Rendering Layer, ECS Runtime, Gameplay Rules Layer, Asset Pipeline Layer, and Tooling & Observability Layer. The Platform Shell handles windowing, lifecycle, file system, and desktop packaging; the Rendering Layer handles batch merging, texture atlases, layer sorting, and shader effects; the ECS Runtime handles entities, components, system scheduling, and query caches; the Gameplay Rules Layer manages death mechanics, spell synergy, summon units, and bullet generation; the Asset Pipeline Layer handles the import, filtering, metadata, and authorization records of AI-generated assets; the Tooling & Observability Layer is responsible for logging, performance timing, replay, and debug panels.

    Not using a traditional engine does not mean “having no architecture”; on the contrary, it requires clearer boundaries. The Rendering Layer should not directly modify gameplay state, gameplay systems should not depend on specific desktop shell implementations, and the Asset Pipeline should output stable IDs and metadata rather than scattering prompts in the code. A simplified ECS main loop can be shown as follows:

    1. type Transform = { x: number; y: number; vx: number; vy: number };
    2. type Health = { hp: number; maxHp: number; dead: boolean };
    3. type Spell = { school: string; cooldown: number; tags: string[] };
    4. function tick(world, dt) {
    5. world.time += dt;
    6. updateInput(world, dt);
    7. updateSpellCooldown(world, dt);
    8. updateSummonLifecycle(world, dt);
    9. updateBullets(world, dt);
    10. updateCollision(world, dt);
    11. updateRenderState(world, dt);
    12. }

    The key to this loop is not the code format but the system order: input, cooldown, summon lifecycle, bullet movement, collision, and render state must be stable and testable. Fixed timestep and render interpolation should be separated to prevent frame rate fluctuations from causing inconsistent bullet hit detection.

    3. Engineering Constraints for AI-Assisted “Vibe Coding”

    “Vibe coding” can be understood as a collaborative method where the developer primarily describes intent in natural language, the intelligent programming assistant generates the first draft, and the developer iterates quickly through runtime results and test feedback. It significantly reduces the cognitive load of boilerplate code and API lookups, but shifts the cost to review, verification, and integration. The following constraints should be established in engineering:

    1. All generated code must pass static checks, type checks, and minimal unit tests.
    2. High-risk modules (save systems, networking, payments, platform APIs) must not be merged without review.
    3. Prompts, change descriptions, and generated code markers must be traceable.
    4. Dependency versions must be locked and security scanned.
    5. Generated code should be committed in small increments to avoid large, unreviewable patches.

    It is reasonable for developers to feel less mentally fatigued because AI handles a lot of repetitive labor; however, teams must not underestimate the review cost. A more prudent approach is to position AI assistance as “accelerating prototyping and boilerplate implementation” rather than “replacing architectural decisions.” For core gameplay rules, rule tables and test cases should be written first, and then the assistant should complete the implementation. For platform integration, a minimum viable verification should be done before expanding features.

    4. Rendering, Animation, and Performance Budget

    The core pressure in a 2D bullet hell survival scene comes from the sheer volume of sprites, bullets, damage numbers, and effects. The Rendering Layer should utilize texture atlases, batch merging, object pooling, and layered culling to avoid creating temporary objects every frame. For animations, simulating a “shake” effect using custom shaders is a highly cost-effective solution: driving vertex offset or fragment perturbation with time noise, and then overlaying damping and phase differences, can achieve a dynamic feel with minimal frame resources. The pseudo-code is as follows:

    1. offset.x = noise(time * 0.5 + vertex.y * 0.01) * amplitude;
    2. offset.y = noise(time * 0.7 + vertex.x * 0.01) * amplitude * 0.5;

    Performance budgets should be divided by frame time: input and rule updates, collision detection, render submission, and audio and platform events should each have their own upper limits. Bullet collisions can use spatial partitioning or grid hashing, and queries for summon units and enemies should limit radius and layer levels. Object pools should cover bullets, effects, damage numbers, and temporary event objects to reduce garbage collection jitter. In co-op mode, where entity counts are higher, a screen bullet limit must be enforced and incremental synchronization must be performed.

    5. Gameplay Modeling: Death Mechanics, Spell Synergy, and Summons

    As a core mechanic, death should not merely be a failure condition, but part of resources and builds: death can trigger undead summons, change spell costs, open a resurrection window, or affect synergy rules. In implementation, death events should be written to an event bus and subscribed to by the rule system, rather than being hardcoded in the collision code. The five dark magic schools can be modeled via a tag system: each spell carries tags like school, element, summon, and damage-over-time. Synergy rules are driven by a “condition-effect-priority” table to avoid combinatorial explosion.

    1. rule = {
    2. when: ["frost", "necrotic", "on_death"],
    3. effect: "summon_ghost",
    4. priority: 10
    5. }

    Summon units require caps, lifecycles, simple state machines, and ownership relationships; bullets require generators, trajectories, collision layers, and damage sources. For co-op mode, it is recommended to use an authoritative host or deterministic random seeds plus snapshot synchronization. Key events should use reliable channels, while position and animation should use interpolation to avoid broadcasting the full state every frame. Death and resurrection rules must be network-consistent, otherwise the co-op experience will quickly deteriorate.

    6. AI-Generated Asset Pipeline and “100% AI” Label Governance

    When generating art, music, and animation assets with AI, a “generate—filter—post-process—metadata—review” pipeline should be established. Each asset should record its ID, generative model type, prompt version, generation time, post-processing steps, license status, and reviewer. Style consistency is maintained through prompt templates, color palettes, and manual screening. Music needs loop point, loudness, and license checks. Animations should prioritize procedural shaders and minimal keyframes to reduce asset size and style drift.

    When a project externally claims to be “100% AI generated” or “100% AI-driven,” it easily sparks disputes over copyright, quality consistency, and player expectations. In engineering, one should avoid using the label merely as a marketing slogan and instead provide transparent asset documentation, manual review logs, and swappable pipelines. The review policies, privacy statements, and asset authorizations of content distribution platforms should also be evaluated in advance. The “100% AI” label is not proof of technical capability, but the beginning of governance responsibility.

    7. Quality Assurance and Release Practices

    Quality assurance should cover rule unit tests, snapshot tests, replay tests, fuzzing tests, and performance benchmarks. Bullet hell games are well-suited for recording input replays to reproduce synergy rule and collision anomalies. Before release, desktop packaging, signing, updates, crash logs, and privacy compliance must be verified. When integrating with content distribution platforms, a platform API adaptation layer should be reserved to prevent business logic from coupling with the shell layer. For short-cycle prototypes, it is recommended to first ensure it is “runnable, reproducible, and observable” before pursuing content volume.

    8. Applicable Boundaries and Conclusion

    This path is suitable for stylized 2D, procedural animation, rapid prototyping, and small team collaboration, but unsuitable for heavy 3D, complex physics, console certification, or massive online networking scenarios. Best practices include: defining clear architectural boundaries, utilizing data-driven gameplay, ensuring traceable AI-generated assets, mandating reviews for generated code, and validating platform integrations early. AI-assisted development can significantly compress the prototyping cycle, but engineering quality still depends on architectural design, testing strategies, and compliance governance. Transforming “AI-driven” into a maintainable engineering workflow is the most valuable experience from this case.