3.2.53 • Published 1 year ago
live_dealer_roulette v3.2.53
Roulette
Description of the game
Game controlled by state machine (stateMachineConfig.ts), game logic split on UI components and business logic. Business describe in services (/core/service):
- App service - controls the operation of the application, there is no connection with the game
- Chat service - all chat activities, chat with dealer and other player
- Game service - main game service, all game control, game state management
- Player service - player settings, video settings, audio settings, everything what related to player
- Stream service - stream control, stop, run, size and other
Docs:
How build game
- Download and install packages: npm run i
- Download submodules: npm submodule update
- Run dev serve: npm serv
How deploy game:
Deploy works with JIRA integration based on bash scripts and bitbucket-pipelines.yml config All scripts located in submodule/platform/scripts
- deploy.sh - main game deploy script
- pre_pull_request.sh - run on each PR before merge to master
- Bitbucket pipeline section BitBucket
- Chose branch
- Press RUN
Development rules
- Create a branch according to the creation rules (check README.md in platform submodule)
- Do develop
- Create pull request
- Deploy implementation for checking by QA
- Merge to master
Stream
- Stream doc Stream
Regular roulette flow
State machine playground
- Copy code from stateMachinePlaygroundConfig.ts into State machine visualizer
- Press Visualize
- You will see roulette state machine, play with it to understand how it works
Structure
Main game states and handlers
- INTl - Initial game state, on this state APP loading all assets, translation and do preparation job like INIT request to server, handler: ChannelInitResponseHandler.ts
- GAME STOPPED || GAME PAUSED || CLOSED - SM Manager can stop game, usually its fo for some maintenance handler: ChannelSMActionHandler.ts
- PLACE BET - On this state game wait from user action like placing bets, handler: ChannelPlaceBetResponseHandler.ts
- NO MORE BETS - On this state user wait while game not choose winning number, handler: ChannelGameStateResponseHandler.ts
- WINNING NUMBERS - On this state game show to user his winning number and winning amount, handler: ChannelGameStateResponseHandler.ts
- MONEY WHEEL (OPTIONAL) - It is optional state, used in game show roulette, where user can have addition winning bonus, handler: ChannelGameStateResponseHandler.ts
Main game modules
- Playground - table where user can make bets and all activities related to main game (Playground.tsx)
- Favorite - use can store his favorite bets (Favorite.tsx)
- AutoPlay - Allow playing autoplay with some optional parameters (AutoPlay.tsx)
- Chat - way of communication with other player or service manager (ChatConnection.tsx)
- Statistics - section where user can see most popular and unpopular numbers split by numbers type (Statistics.tsx)
- Bet limits - section where described bet limitation per bet type (BetLimits.tsx)
- History - user activities from all games, not only from roulette (HistoryConnection.tsx)
- Settings - section where user can change his settings (Menu.tsx for mobile or Header.tsx for desktop)
Code styles
How do I name the style files?
- There is only one style file in the folder with the component
For example:
MyComponent.tsx
myComponentSytles.scss
- There are multiple style files in a folder for different devices or screen layouts
For example:
MyComponent.tsx
myComponentD.scss
myComponentM.scss
myComponentP.scss
myComponentL.scss
Where the capital letters D / M / P / L denote, accordingly, desktop / mobile / portrait / landscape