Description
A performance-optimized Roulette demo focusing on scalability through Scriptable Objects and modular system design. It features an Observer-based Event Bus for decoupled communication and utilizes Coroutines to deliver smooth, deterministic 3D animations without third-party dependencies.
README
🎡 Deterministic Roulette - Game Developer Demo
A high-fidelity, 3D single-player Roulette prototype built in Unity 6 (6000.3.0f1). This project focuses on realistic wheel physics simulation, a robust betting system, and a deterministic outcome engine for testing and controlled gameplay.🎮 Gameplay Demonstration
Click above to watch the gameplay video
📋 Project Overview
This prototype simulates a complete Roulette experience with a specialized "Deterministic" mode, allowing the next winning number to be pre-defined via the UI.- Deterministic Engine: Manually select the next result or let the RNG decide.
- Full Roulette Rules: Supports Inside (Straight, Split, etc.) and Outside (Red/Black, Columns, etc.) bets.
- 3D Experience: Immersive wheel animations and ball drop physics.
- Statistics: Tracks spins, win/loss ratios, and total profit.
🛠️ Technical Implementation
I have strictly followed the technical requirements, focusing on clean code and zero third-party dependencies.Architecture & SOLID
- Observer Pattern & Event Bus
- Implemented a central Event Bus to manage communication between decoupled systems.
- When the wheel stops, a Event_OnSpinEnded event is broadcasted. Independent modules like UI, Session, Board and Statistics subscribe to this event, ensuring zero direct dependency (Low Coupling).
No Third-Party Plugins (No DOTween)
- All animations (wheel spin, ball movement, UI transitions) are handled via Custom Coroutines and Lerp to ensure high performance and precise control.
- Deterministic Spin Logic: Precisely tuned to simulate the wheel's friction and the ball's final landing and smooth transitions between state changes.
UI & Graphics
- TextMeshPro: Used for all dynamic text and historical records.
- World space UI for text on top of placed chips.
🎮 Gameplay & Controls
- Select chips from the menu on the lower side. There are 5 different chip types. The default one is red, which is valued at 100.
- Interact with the board in the center to place your bets.
- To select the outcome, use the scrollable menu on the right side. Scroll to the desired number and click.
- After placing your bets, you can click SPIN to continue.
Any Known Issues or Future Improvements:
- Logic is working fine but needs general improvement on feel
- Needs a complete UI makeover
- Lacking animations and effects to improve immersion
- 3D environment around table
- Add support for American Roulette (Double-Zero)
- Save & load session data
⚙️ How to Run
- Clone this repository.
- Open the project in Unity 6000.3.0f1.
- Load the SampleScene located in Assets/Scenes/.
- Press Play to start the simulation.
📸 Screenshots
|
Roulette Wheel |
Bet Placements |
Chip Stacking |
|
Event Bus |
Pooling Chip Objects |
Pooling Chip Texts |
Credits
- "Roulette Table 2 Downloadable" (https://skfb.ly/oRuAK) by Dudzy is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).
- "simple low poly casino chips and dices" (https://skfb.ly/oGXrX) by lupas is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).
- Bet icons created by Andrejs Kirma - Flaticon
