-
Notifications
You must be signed in to change notification settings - Fork 1
How the Chessboard works
DuncanSzabaga edited this page Nov 21, 2025
·
1 revision
This document explains how the current board/tiles system is structured, and how to extend it in a scalable way so you can sell / unlock additional board colors (themes) via a store.
The system is built around three main pieces:
-
aBoard(controller object)- Responsible for creating all the tile instances once.
- Stores basic configuration like tile size, scaling, and origin.
- Uses
global.initializeBoardas a flag to decide when to build the board.
-
BoardPiece(tile object)- Represents a single board square (tile).
- Many instances of this object exist, one per square (e.g. 8×8 = 64 tiles).
- Each instance stores:
-
is_light→ whether the tile is a light or dark square. -
sprite_index→ which sprite to display, based on the selected theme. - exported variable:
-
-
pos→ chess coordinate like"e4".
-
-
-
contain→ for future implementation.
-
-
-
-
boardColorMap(In ./Scripts)- Given
is_light(true/false) and usingglobal.boardColor, returns the correct sprite. - Acts as the single place where theme → sprites is defined.
- This is where you plug in new themes.
- Also need to add it to
global.AllboardColorsinDefaultSettingsobject.
- Given
See how to add a new theme here: How to add a new theme
(This separation lets the board be created once, and then “repainted” by changing the sprites, without recreating instances.)
Wiki
User Stories
Design
Requirements
Architecture
Considerations & Issues
Documentation
- How to Add a Card to the Game
- How the Music Controller & Script work
- Card Paging & Search System (CardManager)
- How to Spawn Cards in a Room
- How the Chessboard works
- How to Add a New Board Color
- How to use Alert System
- Chess Logic
- Cheat Mode
- Timer
- How the new card system works
- How the NEW Chessboard works