Devlog3. Dice Rolling and Board Movement
In Dice & Domination, players roll a physical-looking dice and move across a looping board made of tiles.
System Structure
- DiceSide.cs : Check which side of the dice is facing up after rolling.
- DiceManager.cs : Rolls the dice, detects the final value, and synchronizes the result over the network.
- TilesRoute.cs: Holds the ordered list of tiles that players move across.
- BoardPlayer.cs: Moves the player according to dice results and triggers landing events.
Implementation
DiceSide:
The DiceSide class detects which face of the dice is touching the ground after it finishes rolling. Each side collider checks if it is resting on a surface tagged as "BattleGround". If a side touches the ground, it updates its onGround status and used later to determine which number was rolled.
As part of the setup, each dice side's Side Value matches the number of dots shown, and the opposite sides are matched logically (1 is opposite 6, 2 is opposite 5, 3 is opposite 4).

Six colliders on the dice surface
Set Side Value "1" on the surface 6
DiceManager:
This class handles rolling the dice and syncing the roll across all players in a multiplayer session. When the player clicks the "Roll Dice" button, it triggers a roll only if the dice hasn’t already been thrown. It applies a random torque to the dice, making it spin physically. It also sends the torque values to other players using Photon RPC, so all players see the same roll. ‘
When the dice has landed, it freezes its physics, checks each dice side and finds which number is facing up
TilesRoute:
The TilesRoute class organizes the path players move along.It automatically gathers all child tiles into a list called childTileList.
BoardPlayer:
The BoardPlayer class controls each player’s movement across the board after rolling the dice. When a dice roll is completed, it listens to the OnDiceRolled event and starts moving.
In MoveOnBoard(), the player advances one tile at a time for each number rolled. In the while loop, it keeps track of the player's current tile index RoutePosition, and after each step, it updates the position based on the board’s tile list. If the player’s movement wraps around the board (meaning the player passes the start tile at index 0), the game detects this by comparing the previous tile index and the new one. When this happens, it rewards the player with extra money. The MoveToNextTile() method moves the player’s position toward the next tile.
After finishing the move, it checks which tile the player landed on and shows the tile information UI and triggers events like battles or purchasement.
Design Pattern
- Observer: DiceManager uses events like OnDiceRolled and OnDiceLanded to notify other systems when a dice roll finishes.
- Command: Dice rolling action like RollDice and ResetDice is encapsulated and triggered by player input
- Composite:Treats a group of tile GameObjects as a collection that the player can move across sequentially.
- Mediator: BoardPlayer communicates with the tile system (through TileVisualizer) without tightly binding those classes.
Gameplay Demonstration
Initial setup of dice rolling and route movement
Final effect of dice rolling and route movement
Future Plan
The current TileRoute structure stores all tile positions as a simple ordered list. Because of this setup, it would be easy to insert new tiles later by updating the child objects in the scene or extending the list dynamically. If more complexity is needed in the future, such as adding branching paths, event tiles, or shortcut routes, this route structure could be adapted.
References
- [1] Photon Engine. (n.d.). Multiplayer Game Development Made Easy. Available at: https://www.photonengine.com/ (Accessed: 21 March 2025).
- [2] Miro, 2025. https://miro.com/app/dashboard/ (Accessed: 21th March 2025).
Dice & Domination
A high-stakes multiplayer strategy game with domination and combat
Status | Released |
Author | Angir |
Genre | Strategy |
Tags | 3D, Board Game, monopoly, Multiplayer, Top down shooter |
Languages | English |
More posts
- Devlog 10. Score Display & Conclusion42 days ago
- Devlog9. Mode Switching System46 days ago
- Devlog8. Backend System and Camera Setup46 days ago
- Devlog7. Money and Tile Ownership47 days ago
- Devlog6. UI Display of Dice&Domination47 days ago
- Devlog5. Turn Management50 days ago
- Devlog4. Designing Scalable Board Data52 days ago
- Devlog2. Programming Architecture78 days ago
- Devlog1. Game Design of Dice&Domination87 days ago
Leave a comment
Log in with itch.io to leave a comment.