Hi Elixir community,
I’ve looked at several ways of communicating between an elixir backend + Unreal Engine server and a C++ front end for games. In particular, trying to create a prototype in Unreal Engine.
Looked at grpc, thrift, json + rest and flatbuffers + zeromq.
- GRPC doesn’t have a production level elixir client/server and Windows c++ grpc is ridiculously hard to build.
- Thrift has a production level elixir client / server, but I had trouble adding the library to the game project. This is one of the leading choices.
- Json + rest is a standard, but there’s no schema to validate and upgrade versions.
- Flatbuffer exists as eflatbuffers and zeromq is a production level service.It has schema! However, one is required to write a custom rpc interface.
Here’s an example service.
dobydigital248 days ago (Edited 4 times)
- Use https://itch.io/api/1/jwt/me to get information about the player (I’m assuming you’re already doing this)
- Then call the API described here to verify the user is legit (if your game requires a user to have purchased the game, or obtained a key from you some other way)
- You should now be confident in your game client that your user is valid (and owns the copy of the game if you decided to do #2). You should be able to pass the same ITCHIO_API_KEY environment variable to the server, and have the server also perform #1 & #2 again so it can also trust the player is legit. The key is valid until ITCHIO_API_KEY_EXPIRES_AT environment variable so you should be able to auth using that key until it expires. I don’t yet know how long that timeframe is though.
- The player launches the game and sends the env variable to the backend as a service.
- The backend server sends back a token to the player with a valid username + a crypto token.
- The player uses the token to request a list of servers.
- The Backend sends a list of servers and metadata like amount of players etc.
- The player uses the token to join a server.
What do you recommend?