Skip to main content

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.

  1. Using Elixir
  2. Using any other programming language via HTTP server

We'll explain about this on the next session.

Details

Here is available hooks:

Hook NamePayloadResponseDetail
rpcarbritrary JSONarbritrary JSONCalled 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
{
username: string
match_id: string
}
{
username: string
match_id: string
}
Called before match is created
after_create_match
{
username: string
match_id: string
}

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