Overview
You can extend GenGame functionality beyond its capability with hooks. Hooks let you run your own function in between events, so you can achieve thing like server authoritative actions.
There are 2 ways implement hooks.
- Using Elixir
- Using any other programming language via HTTP server
We'll explain about this on the next session.
Details
Here is available hooks:
Hook Name | Payload | Response | Detail |
---|---|---|---|
rpc | arbritrary JSON | arbritrary JSON | Called when GenGame client exec an RPC. The payload is as-is from the client, and any response will be sent back to the client. |
before_create_match |
|
| Called before match is created |
after_create_match |
| ignored | Called before match is created |
before_create_session | work in progress | work in progress | |
after_create_session | work in progress | work in progress | |
before_create_account | work in progress | work in progress | |
after_create_account | work in progress | work in progress |