Skip to content
How a Non-Game Team Built a Top-3 Pool Game Using AI
Game Development 19 min read

How a Non-Game Team Built a Top-3 Pool Game Using AI

A client-side team with zero game development experience used AI to prototype, build, and launch a multiplayer pool game inside a live streaming app, solving challenges in game logic, real-time server synchronization, art production, and deployment to achieve top-three engagement in its first week.

Huajiao Technology
Huajiao Technology
Huajiao Technology

01 | Why Build the Game In-House

Huajiao's games previously ran only in solo-broadcast rooms and had not scaled widely. Two factors held them back: cost and operational rhythm. External games charged per active user — more rooms and more participants meant higher total spend, requiring constant ROI evaluation. Operationally, any gameplay tweak for a specific room or event needed coordination with external developers, slowing iteration.

The team came from a client-side background with zero game-dev reserves. Building from scratch meant rules, art, engine, and server all from zero — investment and risk were unjustifiable. AI changed that equation: code, asset, and verification costs dropped enough for a client team to try building a playable game first, then decide whether to continue. This project also expanded the team's delivery scope from client code only to design, development, and launch.

02 | Getting a Runnable Prototype Fast

The first question entering a new domain: can we actually build it? The answer came faster than expected. Pool rules were not spelled out in the prompt — when a ball pockets, cue-ball scratch, turn rotation — because models already know these common game mechanics from abundant public implementations. The implementation structure (table layout, cue drag, collision, turn flow) was also standard. Stating the goal clearly yielded a working first version.

Prototype speed was not limited by code generation. The real gap: AI saying it's done vs. it actually being correct . A logic chain can sound self-consistent, but did the ball really pocket? Did the score update per rules? Was a foul detected correctly? Previously this relied on human playtesting — one person, few games per day, no reproducibility.

The team handed verification to AI, first giving it the means: a connected phone that can screenshot, tap, read UI, install packages. The AI could then launch the game, shoot, and observe results. Rule correctness shifted from "I'll try it" to a repeatable, automated check.

Verification loop
Verification loop

Verification loop: acceptance criteria defined by humans, execution and observation delegated to AI.

Counter-intuitively, over-specifying rules in the prompt does not guarantee better results. The model follows literal instructions, but real gameplay relies on vast unwritten common sense. Over-constraining squeezes out that common sense, creating new bugs that then need correction. What deserves precise definition is acceptance criteria: what counts as pass, what counts as fail .

In the prototype phase the goal was simply to complete a full game — rough visuals acceptable — as long as rules and state could be repeatedly verified.

03 | What to Understand vs. What to Treat as Black Box

Once the prototype ran, a new problem emerged: AI can write a day's worth of code that a human cannot read in a day. In an unfamiliar domain, you lack the reference to judge whether the generated structure is standard practice or an ad-hoc invention.

The gap between code volume and comprehension is "understanding debt." Unlike technical debt, it surfaces silently — tests pass, but no one can explain why they pass — until a real failure exposes it.

Reading everything is neither realistic nor necessary. The key is splitting: what must be understood, what can be a black box .

Collision is a black-box candidate. Pool collision is a solved problem with deterministic solutions; functional correctness and performance are verifiable. Once verified, treat it as infrastructure — no need to read or modify the implementation.

Must-understand areas are different: when a match starts, how a turn advances to the next player, reconnection state, post-match cleanup. These have no single correct answer; they are product semantics that will evolve. Errors here may evade tests.

The team settled on three decision questions:

Will I need to change this code later?

What happens if it's wrong?

Is there a verifiable ground truth for its correctness?

Judgment boundary
Judgment boundary

Code with deterministic answers and verifiable coverage can be encapsulated. Code without standard answers, requiring repeated product judgment, must be understood.

Since no one on the team had game-dev experience, understanding was not about mastery but about gaining judgment: when AI proposes a solution, being able to spot where it's wrong rather than only asking "does it run?"

04 | Learning Game Server Development with AI

The server was the first real blocker. The team's backend experience was classic request-response: query DB, assemble, return. Game servers differ: they maintain long-lived connections and continuously push state — whose turn, shot result, score updates. The business server waits for client requests; the game server speaks proactively.

AI explained the concepts clearly — keep-alive, reconnection, message ordering — and produced working code. But the hard part wasn't messaging; it was ensuring a single authoritative state across all participants in a room . Several players, the server, each client, and spectator views must agree on ball positions, turn completion, and reconnection turn count.

The "white ball jumping" bug emerged here. The server had computed the full shot trajectory and sent it, yet the client rendered a discontinuous animation. Root cause: two code paths — the client missed the server-scheduled playback start when the trajectory arrived, and after a render gap it sampled the new current progress directly.

The fix separated concerns: the server is authoritative for ball position, fouls, and win/loss; rendering time is allowed to lag . The shooter runs local prediction first, then calibrates to the server trajectory at the same progress; spectators play the trajectory continuously; subsequent state updates are processed in order, never letting a later turn's state truncate an in-progress shot animation.

Adjudication vs rendering
Adjudication vs rendering

Multiple solutions exist; AI can supply them all, but choosing among them — how much lag to tolerate, how much aiming time to reserve, stability under weak networks — requires human judgment.

05 | Producing Visuals Without a Designer

A slightly off table angle or weak shadow feels wrong instantly, but the team had no visual expertise and no quality ruler. The challenge: how can a team with zero design capability consistently produce acceptable graphics?

The discovered three-step process: first find reference standards, then define one governing rule, finally translate "looks good" into executable specs .

Reference standards: Screenshots and recordings of shipped similar games sufficed — which table felt right, how balls rolled — align to those.

Governing rule: Establish a common baseline for all assets: light comes from top-left. Once fixed, ball specular highlights, lit edges, dark lower hemispheres, and the pocket's light/dark arcs all follow that direction.

Pool table texture
Pool table texture

The table texture — top-light bright zone, dark corners, cushion lit edges — all painted per that light direction.

Executable translation: Engineers don't say "this ball needs texture"; they say: radial gradient from ball center to edge, contact shadow at bottom-right, two-layer highlight (one broad+weak, one narrow+bright), readable down to ten-odd pixels.

Ball texture
Ball texture

No 3D models, no texture atlases. A single Sprite plus a fragment shader computes base color, number region, highlights, and shadows entirely on GPU.

Asset generation was delegated to AI but constrained: table cloth and start screen received a few variants per round, pick one, then refine via prompt (keep shape, swap material and border color; remove banner and two title lines from badge). Final images baked, re-rendered only on size change.

Start screen
Start screen

Physics constraints helped: art isn't free creation — it's bound by collision geometry. Pocket ellipses are art wells; the table must be painted to match the collision dimensions exactly.

Human decisions boiled down to few knobs: light direction, mandatory elements, what to delete. Numbers must visibly rotate, otherwise they're just color blocks sliding.

06 | AI Tends to Over-Engineer

Previous sections showed AI filling capability gaps. This section flips: integrating the game into the host app involved changes across both the business repo and the game repo. Both codebases were given to AI, so it saw the full chain — efficiency and problems both stemmed from that visibility.

Authentication v1: Game server called business backend APIs directly to check login status and live-room eligibility, then used the live-room ID as the game room ID. The chain worked; functional tests passed. But the game became tightly coupled to that specific business stack. Adding a new host app meant rewiring the whole chain; any business auth change forced game changes. Seeing both sides, AI naturally wired them together.

Authentication v2: Host exchanges its login token for a short code; platform trades code for identity at business backend; game layer receives a structure containing only "who" and "which room", zero credential fields .

Deployment: AI went further. At the time GitLab was 11.7, lacking cross-pipeline deployment mutexes. AI built its own: using a ConfigMap as a lock, draining active sessions before release, stopping old pods and waiting for actual deletion, then acknowledging and re-verifying from the public network. Every step had rationale, forming a complete release transaction.

But the company's practice delegates this to process: test env auto, prod manual, one run per env, maintainer guarantees. The technical solution wasn't wrong — the environment already had owners. Switching to the company's OCI Helm chart eliminated the custom automation in a day; deployment reduced to two helm upgrade commands.

Responsibility boundary
Responsibility boundary

AI's judgment criterion in both cases was "can this run end-to-end." It didn't see from code that identity belongs to the business backend, or that deployment concurrency is governed by release process and maintainers. GitLab lacked a mutex, so AI invented one.

Therefore, handing over code alone is insufficient; the unwritten conventions not in the code must also be provided .

07 | Back to Business Results

The pool game runs in party rooms with zero dedicated promotion. First-week gameplay-open ranking reached top three; over 80% of rooms that opened the game completed a full match , and more than 30% of rooms launched the game at least once .

The original two blockers are resolved. Cost shifted from per-active-user fees to self-managed server and R&D spend. Operational rhythm returned to the team — tweaking gameplay for an event no longer requires queuing in someone else's schedule.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

live streamingAI-assisted developmentgame developmenttechnical debtreal-time synchronizationgame serverfragment shadermultiplayer games
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.