Unity Matchmaking how it works / dedicated Server - unity3d

I create a 2D ffa multiplayer game for android with Unity/Netcode. Now my question is how i could set up a dedicated Server with matchmaking. Do i have one Unity instance who is waiting for requests. And when it received enaugh question. It creates a new Unity instance as 'real' server and send pack the port. But we only have around 64k ports. So i would realy intrested how at the end, the server is started. Or is there only one Unity instance with multiple game Scences? I know unity has a hosting/matchmaking service. But i have not much money. And i want run specific code on Server for other stuff in the game for example database and a Trading system. Maybe somebody has an idea.
Thanks for your time.Lyksel
I was thinking of openmatch but i didn't find out if i can use it on a dedicated server.

Related

How to create multiplayer in the game?

I'm creating a multiplayer FPS game on Unreal Engine 4.
And don't know one thing - if it is multiplayer so it have to have more than one player. If I want to do this should I rent a server? From which hosting?
I want to release my game on Steam - what should I do to create servers for player? I really don't know and need a steps list.
It won't be a game with a big players count, so I don't need a big and strong server.
To start there is 2 ways of doing multiplayer.
You can either do it with dedicated servers (server will calculates all actions and send them back to each clients connected to it) or you can make a specific client a "host".
Wich ever you chose depends on the type of game you want to create, an open world type of game like a survival wich needs to be up 24/7 with players going on and off from it would require a dedicated server. On the other hand a coop game or a game wich can stop when player wants with 2 or 3 players could run on a client acting as an host.
If you choose to go for dedicated servers you can work inside unreal engine and tick the "run dedicated server" in the launch menu. As for releasing it and setting up multiple dedicated servers that's out of my knowledge

Methods to test Unity WebGL multiplayer game server scalability

I am looking for a method to test the scalability of my WebGL multiplayer game (built in Unity 3D). The game is currently based on the PUN (Photon Unity Network) library and cloud service for multiplayer communication. I would like to know how to efficiently find out if the server hardware and architecture can support, let's say, 20, 50, or even 100 players in one room, with the limited number of computers at my disposal. Ideally I would like to know the frame rate each player will experience. I do have access to some powerful servers. A preliminary idea I have now is to run a bunch of virtual machines on these servers, each of which runs a browser tab with the game. Just want to know the industry practice or what you think would work. Thanks!
Framerate is hardware dependent and if you are sending data to the server EVERY frame you are doing it wrong.
Basic premise on doing it right would be, a player shoots a projectile..
Get its spawnpoint, direction and speed and then pass that to the other players/server to then process without the need to send data each frame.
This is a simplified example but gets the point across.

What would be the software architecture of a videogame?

I'm developing a videogame under Unity. I've been asked to describe the software architecture of my project. My videogame won't be using databases nor it will be connected to a server, it is a platform adventure kind of game with one player.
I have heard of other architectures like client-server, peer-to-peer, service-oriented, but can't find the one that truly fits a videogame.
Without further informations nobody can help you. You need to tell us more about your game.
But I guess you program a multiplayer.
Client-Server
In short every player (client) will connect to a server and this server will mostly do all the work what happens in your game.
Peer-to-Peer (P2P)
Here, there will be only one host (server) and every client will connect on it. Because of this, there will be some problems if the host is far away from the clients and more. Basically if you are the host it is much easier to cheat because you are the server.

Unity5 - Make a server only for multiplayer game

I followed the Unity tutorial of an online multiplayer game (here), and the architecture is the following :
But I would like to have this architecture :
I would like to really separate the client part and the server part in an online game. I'm new with Unity and especially with online multiplayer game and I really don't know how to do that. I don't want the solution, but maybe idea of how to do that.
Thanks a lot for helping me.
I am surprised you didn't learn the Tut and post this question. obviously you can make separate server.
As unity UNet basic concept stated:
In the unity networking system, games have a Server and multiple
Clients. When there is no dedicated server, one of the clients plays
the role of the server - we call this client the “host”
Three Modes of UNet Multiplayer Game:
A Networking multiplayer game can run in three modes - as a client, as a dedicated server, or as a “Host” which is both a client and a server at the same time. Networking is designed to make the same game code and assets work in all of these cases. Developing for the single player version of the game and the multiplayer version of the game should be the same thing.
NetworkManager has funcions for entering each of these modes:
NetworkManager.StartClient()
NetworkManager.StartServer()
NetworkManager.StartHost()
Check UNetManager for more details
You can open a Unity instance as a dedicate server.
NetworkManager.StartServer();
However for current state of UNET you can only have 1 room per Unity instances.
Which mean if you want to open many game room at the same time it'll cost you a lot of hardware.
Run as headless mode (No GUI) will help you a bit but that's not enough (Currently I've done that on DO).
So my recommendation is don't use UNET if you want massive users on your game.

Synchronization in multiplayer networked game?

Recently I have been working on a multiplayer networking app. I had successfully implemented the client server model using Bonjour services and NSStream objects. The two way communication has been done successfully.
The problem I'm facing is: the two devices running the app are connected via local wifi. There is a latency problem while sending the messages from client to server and vice versa.
Describing in brief:
It's a car racing game with at most two players.
One server and other client.
When client press the buttons a particular message is sent to the server telling which key or button was pressed. Then the server responds accordingly and make changes on the client's car on the server itself. These changes are not always the same. There is always a difference between the actual location of the car on the client's screen and that in the server screen.
Any ideas?
Welcome to the world of networking. :)
These are the classic difficulties with game networking programming. There's a lot of different techniques to overcome these issues.
This blog has great info on the subject and will probably help you out.
http://gafferongames.com/networking-for-game-programmers/
You may be specifically interested in this article:
http://www.gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking
Good luck!