I’m looking for some options to create a multiplayer game. My intention is to create my own dektop application that would act as the game client. Meaning I would handle users, their data, configurations, menu stuff and all that.
I’d like to code my game using unity, preferably with multiplay. My question is how to propperly connect the two applications, here is a theoretical example (I have not found a way to make this work).
A player logs in and ques for a game in my client app.
My client app is in charge of matchmaking and all that good stuff.
It finds X number of players to fill a lobby and connects the players togethen in the lobby (game preparation and stuff).
Once the game is ready to launch I’d like to create a server instance with specific config for that game (for example the ids of the players in that lobby, what they choose to play as… And of course everything linked to these specific players).
I’d like to then launch my unity clients, with the Id of the player and the id of the server they should connect to.
From then on out the server does it’s thing, allows only the players that it’d recieved when created, loads the map and the match starts.
Once the game is over, the server should then notify my app, somehow, and close itself (also, the unity app should also close, but it does not need to be automatic). My client could then show post-game stats and stuff sent by the game server (brfore it shut down).
If any of you are familiar with league I’m going for that style of flow, but without their shitty ass code xd.
I’ve looked into the Unity services Web API, and I’ve seen you can create server configurations and builds on demand, but I’m hesitant because of a couple things:
I’m not convinced that would be fast, and even though I don’t need it to be very fast, I don’t want to make players wait for 5 mins to get into a game.
I’m also under the impression that these configs and build would then be deployed into a fleet, but I really only want the one server for a specific match. (Is there any way to send data to an existing server intead of creating / destroying them contantly?).
Even if what I just mentioned was possible, how could I then say to my app that the match finishes? Is there any reliable way to make HTTP requests though unity?
This is a theoretical way this could be done, but I’m aware that it may not be achiavable. I’m open to other ways of acomplishing a similar goal.
For example, I’m aware I could use sockets for app-to-app communication, but they are heavely unreliable and I’d appriciate some alternatives.
Also any help on how to open a unity app from another app while passing some basic info would be greately appriciated.
Thank you in advance if anyone has any idea how to achive this.