Unity5 - Make a server only for multiplayer game - unity3d

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.

Related

Unity Matchmaking how it works / dedicated Server

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.

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.

GPGS Unity Plugin - Network Latency Check & Synchronisation

I'm trying to develop a realtime multiplayer game in Unity using Google Play Games plugin. So far, it all has been pretty straightforward. I'm using a P2P architecture.
One of the issues I have is that the data I'm sending to players is time sensitive. I can use and send an unreliable message, but we know that no two players will have the same set of data or 'game state' at any given point. Is there any way I can synchronise my players? my understanding is that having even a client-server architecture will only help me synchronise players to a certain degree, but not completely. Is that correct?
My knowledge of networking, especially with Google Play, is very limited so if you can explain this to me like I'm five, that'd be great. ^_^

Multiplayers online game (MMO) | Architecture | Learning Path

I want to learn game development.
I'm coming from Web, Desktop and Mobile Applications.
where is no really REAL-TIME programming.
And all architecture templates and life cycles is very different.
Now I have 1 idea for game. I don't know if this will very good game, but for first game my main goal is - Get experience
My game is online game with 2 players.
The players has cards (like in Clash Royal) and will player release the card - game need to do something.
Now question is in Architecture....
In applications that I made - all business logic was on SERVER SIDE..........
But If i understand right - here is Game on Players phone do all business logic..and server is just "message provider" ??
The second question is - If I have to use online service (like Photon) or build my TCP/UDP server.. (Its not so hard and for first game I think I can do it by myself)
UPDATED:
The main question what is resources I need to read for get more information about type of Architectures in Game Dev?
Thank you for your answers.
There is no RIGHT ANSWER for your question, as there are many ways to do an on-line game, and everyone have their pros and cons, like:
Host & Clients, where one of the players is acting like a server.
Authoritary Server, where all the logic is calculated on one side, and then update the others.
If you are working on Unity I recommend you to look the different network api's over there: Photon, Unet...
You can use the server services that Unet provides, or build your own system.
But one advise: don't mess with physics on on-line games, will be punishing.

How can I implement multiplayer in my iphone game?

I want to create a playstation home style multiplayer game for iphone. How can I implement multiplayer in my project? Also, how can I give players a chance to chat? How can I let them create their own avatars to interact? I am a one man developer, with no access to servers. Maybe I can use iPhone game centre???
If you're looking for some kind of platform to build on, there is a product called SmartFoxServer:
http://www.smartfoxserver.com/
I have not used it, but it claims to provide a client API for native Obj-C or Unity3D. It allows for chat features.
If you want to roll your own, I recommend getting started with NodeJS:
http://nodejs.org/
GameCenter does not provide any kind of backend for multiplayer networking, at least not in the way you are implying. If you intend to build a networked multiplayer game over the internet, you most likely need some kind of backend.
Slicehost is a good way of getting a server like NodeJS running quickly and cheaply:
http://www.slicehost.com/
Don't forget that GameKit in iOS allows multiple devices to find each other locally (via Bluetooth or local Wifi) and create sessions. This might be a good starting point for your game. Here's some info on GameKit:
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html
I think this would usually be done with webservice interaction against a server. You may be able to develop a webservice and pay a small fee to have it hosted by a web provider, or to use your own machine as (an unreliable) server while proving the concept.
Or you could just use Nextpeer - http://www.nextpeer.com
It makes adding online tournaments to your game real simple.
You can look at Gamooga (http://www.gamooga.com/).
Its a realtime communication platform for multiplayer games so you dont need to worry about building and deploying your own multiplayer servers. You can upload your own server side scripts onto Gamooga's cluster which receive and process your clients' messages. You can use Gamooga's iOS API with in your app to send messages from the client side to your server side scripts. You can download the SDK and look at the demos to start off.
There is a free plan of Gamooga platform too that you can make use of to start with.
Disclosure: I am founder of Gamooga, replying only since its relevant to the question.