Chess App
This engineering thesis project delivers a full mobile application and backend ecosystem enabling real-time online gameplay for chess, checkers, and fully custom rule-based board games. The system supports dynamic board sizes, non-standard shapes, multiple players, and user-defined rules-all backed by a reactive cloud-based architecture.
Overview#
This project implements a multi-layer mobile application (Android, Kotlin) with a cloud backend (Java, Spring WebFlux) that allows users to play classic and custom logic games on a chessboard grid. Beyond standard chess and checkers, the platform enables players to design and play entirely new board-based games by modifying rules, board shapes, and piece behaviors.
Key Features#
- Online and local gameplay for chess, checkers, and custom games.
- Configurable rules, including piece movement, special effects, or custom constraints.
- Board customization: arbitrary sizes, rectangular boards, cross-shaped boards.
- 2–4 player support.
- Time controls: Bullet, Blitz, Rapid variants.
- User accounts, authentication (OAuth2), and match history.
- Reactive real-time communication using Server-Sent Events (SSE).
- Cloud-hosted backend using Spring WebFlux, NoSQL/SQL, and RabbitMQ.
- CI/CD deployment to Ubuntu servers on OVH.
Game Customization#
The application exposes a full configuration panel that allows users to design their own variants before the match begins.
1. Piece Sets#
The game uses custom-designed SVG icons, allowing dynamic recoloring to match the selected theme. Out of the box, it supports:
- Chess: pawn, king, queen, bishop, knight, rook
- Checkers: man, king
The system is prepared for future extension-adding new icons automatically integrates them into customization menus.
2. Board Configuration#
Users can set:
- Custom board dimensions (4×4 to 14×14 for each axis).
- Board shapes: rectangle or Greek cross.
Example Sizes#
Example Shapes#
3. Player Count#
Games can involve 2 to 4 players, enabling non-standard multiplayer variants.
4. Time Controls#
Available presets:
- Bullet: 1+2 (1 minute + 2s increment)
- Bullet: 2+1
- Blitz: 3+2
- Rapid: 10+10
Core Application Functionality#
The goal of the thesis was to build a complete online gaming system with:
- Accounts and authentication
- Matchmaking and session management
- Real-time move synchronization
- Configurable rule engine for designing new game types
Built-in games include:
- Chess
- Checkers
- Atomic Chess
- Mini Chess
- Progressive Chess
- Anti Chess
- Four Player Chess
But players can also define entirely new variants using the rules interface:
Supported customizations include:
- Altered movement rules
- Special effects
- Non-standard board sizes and shapes
- Additional players
This system effectively becomes a board-game creation platform.
Real-Time Architecture & Concurrency#
A critical part of the system is real-time synchronization between players. Events flow through:
- User sends an action (move event).
- Stateless backend retrieves the current session state from the database.
- The move is validated.
- A transactional update ensures no conflicting writes occur.
- The event is published to RabbitMQ.
- Clients subscribe to a dedicated SSE channel.
- All new events are pushed live to connected players.
This guarantees consistency even when multiple users send simultaneous actions.
SSE (Server-Sent Events) enables lightweight, real-time push communication. The backend emits both move events and keep-alive signals to maintain connection stability.
Example Backend SSE Endpoint#
@GetMapping(path = "{sessionId}", produces = MediaType.TEXT_EVENT_STREAM_VALUE)public Flux<ServerSentEvent<EventDto>> listenForEvents(@PathVariable long sessionId) { var moves = sessionService.listenForEvents(sessionId) .map(eventMappers::map) .map(it -> ServerSentEvent.<EventDto>builder().data(it).build());
var keepAlive = Flux.interval(Duration.of(15, ChronoUnit.SECONDS)) .map(it -> ServerSentEvent.<EventDto>builder().event("keep-alive").build());
return Flux.merge(moves, keepAlive);}Example Android Client Listener#
override fun listenForEvents(sessionId: Long): Flow<Event> = flow { coroutineScope { sessionApi.listenForEvents(sessionId) .byteStream() .bufferedReader() .useLines { sequence -> sequence.filter { it.startsWith("data:") } .filter { isActive } .map { it.removePrefix("data:").trim() } .map { objectMapper.readValue(it, EventDto::class.java) } .map { eventMapper.map(it) } .forEach { emit(it) } } }}.flowOn(ioDispatcher)Settings & Personalization#
A key part of the application is its extensive customization module, allowing players to tailor the entire experience to their preferences. Users can switch between interface languages, enable or disable sound effects, and choose from multiple visual themes that completely change the look and feel of the board. The app also supports dynamic board scaling—regardless of device or orientation, the layout automatically adjusts tile sizes, piece proportions, and UI elements to maintain clarity and comfort during gameplay.
Summary#
The final product is a complete, cloud-driven mobile system for online board games. It supports:
- Standard chess & checkers
- Fully custom rule-based games
- Custom boards and shapes
- Multiplayer beyond two players
- Real-time gameplay via SSE
The combination of reactive programming, scalable architecture, and flexible gameplay design makes the system a strong foundation for future extensions.
Future Work#
Planned or possible expansions:
- Publishing the Android app to Google Play.
- Vertical or horizontal scaling in Cloud environment.
- Additional languages and themes.
- More game types and rule sets.
- Social features and tournaments.
- AI-driven opponents.
This architecture allows seamless extension with new game mechanics, cloud capabilities, or interface improvements.