saltysystems / overworld

Open source framework for scalable multiplayer games.
Mozilla Public License 2.0
22 stars 4 forks source link

Autoregister #34

Closed cmdrk closed 3 months ago

cmdrk commented 3 months ago

This considerably reduces the boilerplate needed to register a new application with Overworld.

Now, you should be able to simply tag a module with -rpc_client([]) and -rpc_server([]) attributes. It is assumed the msg [de|en]coder will be named <app>_msg.erl

escape hatches exist in the <application>.app.src file, i.e.:


{env,
  [
   {overworld,
     #{
        app => overworld,
        router => ow_msg,
        prefix => 100,
        modules => [ow_module1, ow_module2]
      }
    }
  ]
},
>