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
- Call
OperatorInterface.setup(...)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, both Light and Wonder (LNW) and Playtech (POP) require the reality-check flow. Your game must handle realityCheck and answer with sendRealityCheckResponse.
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.
And then you are ready for operators
Your engine config is promoted. Your frontend is wired up. The Operator Interface is implemented. The remaining work is distribution. Create a Partner and an Identity for each operator brand. Set your Game's permissions. Verify the launch and wallet behaviour with the Game Launcher and Wallet test runner. Then hit Publish. See Now I want to distribute my games in the hizi app docs.