Back to Blog
SaaS & Software

How to Build a Xiangqi (Chinese Chess) Game App in 2026

Last updated:

By SpiderHunts Technologies  ·  June 30, 2026  ·  8 min read

To build a Xiangqi (Chinese Chess) game app you need five core layers: a rules engine that enforces Xiangqi's unique piece movements, the river, the palace and the flying-general rule; a board UI rendered on the 9×10 grid of intersections; an AI opponent (usually alpha-beta search or a Stockfish-derived engine); a real-time multiplayer and matchmaking backend; and a monetisation and retention layer. In 2026 the fastest reliable path is a cross-platform client (Flutter or React Native) wrapping a proven open-source engine over the UCCI protocol, backed by a WebSocket server for online play. The sections below walk through each layer, the tech-stack trade-offs, and realistic timelines and costs for teams shipping in the USA, UK and Europe.

What is Xiangqi and why build an app for it in 2026?

Xiangqi is the traditional board game often called Chinese Chess, played by hundreds of millions of people across China and the wider Chinese diaspora. Two armies of 16 pieces battle on a board of nine files and ten ranks, with pieces placed on the intersections rather than inside the squares. A central "river" splits the board and a 3×3 "palace" confines each general and its advisors.

Demand for a polished Xiangqi app is strong and underserved outside Asia. Diaspora communities across the USA, UK and Europe want a clean, ad-light experience with fair matchmaking, offline AI practice and tutorials in English as well as Chinese. Building in 2026 is easier than ever because strong open-source engines, mature cross-platform frameworks and managed real-time infrastructure remove most of the hard engineering that used to sink these projects.

  • Large, loyal player base with relatively few high-quality Western apps.
  • Clear monetisation: cosmetics, coaching content, tournaments and optional ad removal.
  • Long session times and daily habits make retention economics favourable.

What are the core features of a Xiangqi game app?

A minimum viable Xiangqi product needs enough depth to feel authentic while staying shippable. Prioritise the game loop first, then layer social and monetisation features once retention is proven.

Must-have (MVP)

  • Interactive board with legal-move highlighting, drag-and-tap input and move history.
  • Full rules enforcement, including check, checkmate, stalemate and repetition rules.
  • Offline AI opponent with several difficulty levels.
  • Undo/redo, save/resume, and a clean win/draw/resign flow.

Growth features

  • Online multiplayer with rating (Elo/Glicko) and matchmaking.
  • Puzzles, opening trainers and post-game analysis with engine evaluation.
  • Accounts, friends, spectating and chat with moderation.
  • Localisation (English/Chinese), accessibility and a light/dark board theme.

How do you implement the Xiangqi rules and game engine?

The rules engine is the heart of the app, and Xiangqi has several rules that trip up developers who assume it behaves like international chess. Model the board as intersections (9×10 = 90 points), then encode each piece's movement and its blocking conditions precisely.

  • General: moves one point orthogonally, confined to the palace.
  • Advisor: one point diagonally, inside the palace only.
  • Elephant: exactly two points diagonally, cannot cross the river, and is blocked if the intervening point is occupied ("blocking the elephant's eye").
  • Horse: one orthogonal then one diagonal, but is "hobbled" if the orthogonal point is occupied — so it is not a symmetric knight.
  • Chariot: moves any distance orthogonally, like a rook.
  • Cannon: moves like a chariot, but captures only by jumping exactly one screen piece.
  • Soldier: forward one point; after crossing the river it may also move sideways, but never backward.

Two rules cause the most bugs. First, the flying-general rule: the two generals may never face each other along an otherwise empty file, so your legal-move generator must treat that as an illegal position. Second, stalemate is a loss in Xiangqi (unlike chess), and there are strict rules against perpetual check and perpetual chase that force a player to vary. Represent positions with a FEN-style string so you can serialise games, run tests and integrate an engine. Write an exhaustive unit-test suite for move generation early — it is far cheaper than debugging illegal moves reported by players later.

How strong should the AI opponent be, and how do you build it?

Most teams should not write a world-class Xiangqi engine from scratch. The practical answer in 2026 is to integrate a mature open-source engine and expose difficulty levels by capping search depth and time. This gives you both a beatable beginner bot and a near-unbeatable expert.

Your options, from simplest to strongest

  • Alpha-beta search with a handcrafted evaluation — good enough for casual difficulty and easy to tune.
  • Open-source engines such as Pikafish (a Stockfish-derived NNUE engine for Xiangqi), driven over the UCCI/UCI-style protocol — the pragmatic default for strong play.
  • Neural approaches (AlphaZero-style self-play networks) if you have research capacity and want a distinctive playing style.

Difficulty tuning is a product problem, not just an engine one. Reduce depth, add randomness among near-equal moves, and occasionally play a sub-optimal line so beginners can win. For coaching and analysis features, our machine learning and data science teams at SpiderHunts Technologies build move-quality annotation and mistake-detection on top of engine evaluations, so players get useful feedback rather than a raw number. Run the strong engine natively (compiled for the device) or on the server for heavier analysis, and keep a lightweight bot on-device for fast offline play.

Which tech stack should you choose to build a Xiangqi game app?

Your stack decision hinges on how much you value native performance versus speed to market across iOS, Android and web. Because a Xiangqi board is 2D and turn-based, most studios do not need a full 3D game engine — a cross-platform UI framework plus a native engine binary is usually the sweet spot.

ApproachBest forPerformanceTime to market
Native (Swift + Kotlin)Premium feel, deep OS integrationHighestSlowest (two codebases)
Cross-platform (Flutter / React Native)One team, iOS + Android from one codebaseExcellent for 2DFast
Web / PWA (TypeScript)Instant reach, no install, spectatingGood; engine via WebAssemblyFastest

A common winning pattern is a Flutter or React Native client for the stores, plus a WebAssembly build of the same engine for a companion web app — sharing rules logic across all three. SpiderHunts Technologies typically pairs this with cloud-hosted services, and our mobile app development and web development teams keep the board renderer and rules engine in a single shared package to avoid rule drift between platforms.

How do you add online multiplayer and matchmaking?

Real-time multiplayer is where most Xiangqi apps live or die. The critical principle is that the server, not the client, is the source of truth for the game state — never trust a client to validate its own moves, or cheaters will exploit it.

  • Transport: WebSockets for low-latency move exchange; fall back to reconnect logic for flaky mobile networks.
  • Authoritative state: validate every move server-side using the same rules engine as the client.
  • Clocks: server-authoritative timers so timeouts and increments are fair across regions.
  • Matchmaking: rating-based queues (Glicko-2 works well) with time-control filters.
  • Integrity: engine-assistance detection, rate limiting and abuse reporting.

Region matters for latency and compliance: hosting nodes near your players in North America and Europe keeps moves snappy, and processing accounts for UK and European Union users means designing for GDPR from day one. Our cloud engineering team builds this backend as a scalable, multi-region service so a launch spike or a viral tournament does not take the game offline.

How much does it cost and how long does it take to build?

Cost and timeline depend almost entirely on scope. A single-player app with a strong offline AI is a different project from a rated, real-time multiplayer platform with tournaments. As of 2026, plan in phases and validate retention before investing in the heavier online systems.

  • Phase 1 — Playable MVP: board, rules engine, offline AI and core UX. Typically a few months.
  • Phase 2 — Online: accounts, real-time multiplayer, matchmaking and ratings.
  • Phase 3 — Depth: puzzles, analysis, tournaments, coaching content and monetisation.

The biggest hidden costs are anti-cheat, live operations and content — not the board itself. Budget for ongoing server costs, moderation and regular content updates, which are what actually retain players. A phased build also lets you ship to one region first (say the UK or the USA) and expand once the economics are proven.

Why build your Xiangqi app with SpiderHunts Technologies?

SpiderHunts Technologies is a UK-founded software company that has delivered custom applications, real-time systems and AI features for clients across the USA, UK and Europe since 2015. A Xiangqi platform sits exactly at the intersection of our strengths: a precise rules engine, a strong game AI, and a low-latency multiplayer backend that has to be correct under load.

  • One shared codebase: we keep rules logic in a single package used by mobile, web and server, so the game behaves identically everywhere.
  • Engine integration done right: we wrap proven open-source engines, tune difficulty as a product feature, and add analysis on top.
  • Launch-ready operations: multi-region hosting, anti-cheat, GDPR-aware account handling and observability from day one.

Whether you want a focused single-player trainer or a full competitive platform, our custom software team can scope a phased roadmap that ships something playable early and grows with your audience. The result is an authentic Xiangqi experience your players can trust — and a codebase you can keep building on.

Frequently Asked Questions

How long does it take to build a Xiangqi game app?

A single-player MVP with a board, full rules engine and an offline AI opponent typically takes a few months. Adding accounts, real-time multiplayer, matchmaking and ratings extends the timeline, and depth features like puzzles, analysis and tournaments come in a later phase. Building in phases lets you validate retention before investing in the heavier online systems.

Do I need to write a Xiangqi AI engine from scratch?

No. Most teams integrate a mature open-source engine such as Pikafish (a Stockfish-derived NNUE engine) driven over the UCCI protocol, then expose difficulty levels by capping search depth and time. A simple alpha-beta search is enough for casual difficulty, while a full neural approach is only worth it if you have research capacity and want a distinctive playing style.

What tech stack is best for a Chinese Chess app?

Because a Xiangqi board is 2D and turn-based, you rarely need a full 3D game engine. A cross-platform framework like Flutter or React Native covers iOS and Android from one codebase, and a WebAssembly build of the same engine powers a companion web app. Keeping the rules logic in one shared package prevents behaviour drifting between platforms.

What Xiangqi rules are easiest to get wrong in code?

The flying-general rule (the two generals may never face each other on an open file) and the fact that stalemate is a loss, not a draw, catch out developers used to international chess. Blocking rules for the horse and elephant, and the cannon's jump-to-capture, also need exact modelling. Write an exhaustive move-generation test suite early to catch these.

How do you stop cheating in online Xiangqi multiplayer?

Treat the server, never the client, as the source of truth: validate every move server-side with the same rules engine and run server-authoritative clocks. Add engine-assistance detection, rate limiting and abuse reporting, and design accounts to be GDPR-aware for UK and EU users from day one. Multi-region hosting near your players keeps latency low and moves fair.

How much does it cost to build a Xiangqi app?

Cost scales with scope: a single-player app with a strong offline AI is far cheaper than a rated, real-time multiplayer platform with tournaments. The biggest hidden costs are anti-cheat, live operations, moderation and ongoing content, not the board itself. A phased build lets you launch in one region such as the UK or USA first and expand once the economics are proven.

💻 More in SaaS & Software

Continue reading

How to Plan a Custom Software Foundation (Step by Step)

Read guide →

Custom Software Requirements & Architecture Done Right

Read guide →

Custom Software Discovery Phase: Why It Makes or Breaks

Read guide →

IT Staff Augmentation Services: Full 2026 Guide

Read guide →
View all SaaS & Software →

Ready to Start Your Project?

Book a free 30-minute strategy call with SpiderHunts Technologies — serving the USA, UK & Europe.

WhatsApp Us Now Book a Free Strategy Call

Relevant Services

Services related to this article

Mobile App DevelopmentCustom Software DevelopmentMachine Learning