Open shubhank008 opened 6 years ago
I'll answer your first question within the question number 2. 1- As far as I know, if we want to use region-based we need to create something above the Master Server (I'd even suggest the community to build it as this is an open source project). On the ideal approach, we'd have a server with only the Master Server, and then other servers with the Spawner/Game Servers. 2- Yes, the spawner only spawns intances on the same servers (so far). Whenever a Spawner Server is created, it registers itself on the Master Server, along with its max instances property, so the Master Server can ask this spawner to spawn game instances. The Game Servers will terminate themselves after no more players are connected or when the match is over (it will depend on your game type). I'm not sure about lobbies and rooms, because I didn't dig on that too much, but I'm aware that there's a demo for that on the framework, I'm sure you'll get it once you try it. 3- Yes, it's the same concept, and what defines this limit is the Spawner Server. 4- I managed to do this using UNet's LAN components, so it is possible. Self hosted servers are likely to have NAT issues, and they could be done with pure UNet too. 5- No clue on that one, sorry 😞
Last but not the least, I was thinking to use If/Else/Switch within my game code itself to make the client act sort of pseudo-server selector. For that, I would use hostnames of servers instead of IP and switch between which master server (hostname) to use based on user's selection.
Yeah aware of NAT issues but I wanted to add LAN for local play and single player (with bots) if only 1 player playing. I will play around with UNET LAN implementation for this I guess, since my purpose is to use LAN for Wifi/same network based play and for Single Player game.
I am aware of the fact that player-hosted GameServer will/can have NAT issues as well, is there any way to detect such issues to guide players to fix them or just let them know they can't host ? Telling them about NAT issue and to use dedicated server is better than them waiting to connect or for players to join unaware of the issue.
Can simply checking if the user has a public IP or if they can connect to master server detect NAT issues ?
I will test this out too I guess, this will open a lot of flexibility and scalability to my other needs and queries above :D
I use GIT for plain versioning and commits so no idea how PULL requests or contributing to open source works, but if I end up creating the Load Balancer/Region functionality and the dynamic whole server spawning (create new cloud server, transfer game server, run it, shut down cloud server), I will make sure to submit my code snippets and guide on how to do it. I hope someone else can then pick them up and submit/contribute to the MSF project as PULL request or whatever.
It's pretty simple to make pull requests, you just need to fork the repository, then make a commit on your end and a pull request here. 1- If you manage to start this, please share with us so we can help and push it further! 4- LAN has no NAT issues, it's actually works pretty straight-forward. Most games that does the player hosting approach suggests the players to port-forward the given server port. There are ways to determine if one is able to host a public match following your ideas.
@JoaoBorks @JadeWhite I would really appreciate if you could help me a bit, I played around with MSF a bit over the last 2 weeks and integrated with my game.
I am really confused and clueless where I am going wrong.
What I want is to be able to host our own servers, let users also host their own servers/lobbies (well rooms perhaps) and users being able to do LAN (in case no internet or offline play)
I am new to MSF and must say, fantastic project, specially being free and opensource now (the CCU limits on UNET/Photon were a bummer).
I have checked the quick start and getting started wiki pages but wanted to better understand the server setup and clarify a few doubts.
If I understand correctly, if one is to setup a proper server setup (vps/dedicated), then there are basically 3 different Game Builds (Client, MasterServer, GameServer).
Now, is SpawnServer a separate entity or GameServer and SpawnServer are one and all, with SpawnServer launching instances of GameServer ?
Furthermore, my other doubts and queries are:
To do that, what DefaultMachine IP(s) and ServerIP(s) do I need to use and setup ?
PS: Sorry for so many questions, I am a quick learner but just a bit confused here at start. Anyone taking their time to answer, you have my regards and thanks.