Appearance
Step 5: Implement the Operator Interface
Your game runs inside an operator's lobby or wrapper. It does not run on its own page. @hoelle/operator-interface is the client-side protocol that connects the two. It tells the wrapper what your game is doing, such as a spin starting, a round ending, or a balance changing. It also reacts to what the wrapper asks of your game, such as mute, quit, or resume.
The package lives on the @hoelle registry. Log in to it once before you install the package.
bash
npm login --registry=https://code.hoelle.games:7082/ --scope=@hoelle
npm install -S @hoelle/operator-interface@latestWhat to do
- Register event listeners, then await
OperatorInterface.setup(...)once at start-up. Pass the operator protocol, game code, currency, language, player ID, mode, and lobby URL. The login call in Step 3 returned the protocol inoperatorProtocol. - Broadcast the lifecycle events your game produces. This includes
gameReady,roundStarted,roundEnded,spinAnimationStarted,spinAnimationStopped,balanceUpdated,cashWin, and others. - Listen for the wrapper's incoming events and act on them. This includes mute, quit, resume, and stake changes.
- Check the operator's own page for any calls it specifically requires, and implement those too. See the next section.
Per-operator requirements
Most of the protocol works the same way everywhere. Some operators require specific calls before your game passes their integration checks. For one example, Light and Wonder (LNW) requires the reality-check dialog. Call realityCheck when the interval expires. Playtech (POP) instead delegates the responsible_gaming page through the same method. Send sendRealityCheckResponse only when the operator's contract requires an acknowledgement.
Do not assume every operator needs the same calls as this example. Go to Operators and read the page for each operator you integrate with. The required calls differ per operator. If your operator is not listed there, ask hizi.io support what that operator requires. Do not assume the defaults are enough.
Where to read more
- Getting Started: registry login and installation.
- Usage:
setup, listening for events, and broadcasting events. - Configuration: every
setupparameter, logging, and the available operator protocols. - Operators: per-operator notes and required calls.
- API Methods and Events: the full method and event reference.
Validate the complete frontend
Complete the frontend release checks before operator acceptance. Test the actual wrapper, player limits, jurisdiction behavior, and interrupted rounds.
Use the implementation guide for notification ordering, audio, pause, errors, and reality-check acknowledgements. A working wallet alone does not complete operator or jurisdiction integration.
After acceptance, configure distribution through Hizi. See Now I want to distribute my games.