we are currently in process of making a new multiplayer game. It will be RPG card game, where multiple players can connect together and venture into the dungeon, cast skills, take loot, kill monsters and disconnect.
Now we are deciding which multiplayer framework to use to prepare our game logic/code for multiplayer solution from the beginning. As we need a DGS solution to prevent cheating(no P2P) I originally thought that we will wait for the new Unity NetCode/Transport layer, however I am not so sure now.
What I saw from the preview the NetCode is focused on Ghosts/prediction and is using ECS. The transport layer seems very basic.
We do not need any fancy FPS prediction for player movement, and this kind of stuff. The game should be just sending RPC calls from time to time, like Player 1 casted Fireball on Enemy3, Enemy3 healed, Player 2 lost 3 Health etc. Simulation should be done on server, clients sends inputs, server sends them results, clients display results.
Can someone help me to understand if new Unity networking is viable solution for this? Is is possible to easily make this with current NetCode or Transport Layer? Or will it be in foreseeable future? We also do not want to host our own dedicated servers we would like to pay for this service to Unity/Whomever who will take care of this automatically based on the game load.
Any ideas or help will be much appreciated!
PS: Just to clarify, the DGS will be also communicating with BAAS service like Playfab, ChillyConnect etc. , this is not that important to know, but just to clarify.
I am not sure what a DGS is? But it looks like you’re looking for a client-server solution for your card game.
I’ve posted this in other places as a suggestion, take a look at www.smartfoxserver.com. I think it is the kind of solution you might be interested in.
You can build the game logic on the server side and you get lots of useful features for match-making, managing rooms, users, chats, banning etc. The whole thing is free for 100CCU and pretty affordable if you want to scale up. For pricing check the elastic licenses, they are the most affordable.
Hi, yes DGS is dedicated game server , so server-client architecture. I heard of Smartfox before, but had no time check it more deeply. If the Smartfox offers Unity binary running as a server, than this could be viable solutions for us.
I have used the preview of DOTS NetCode aka FPSSample for several months. It lacks documents and requires a lot of works. But it is usable and stable in my opinion. Since you don’t use prediction/ghost features, it would be more easier to implement.
A new sample is coming within a month or so and will offer more insights - it is a netcode sample with prediction and more according to Unity at latest Unite. Quite excited to try that.
I’m hoping for the community’s sake that the new network solution lives up to the promises, but I wouldn’t make plans based on promises.
Unity’s new networking is behind their originally stated schedule (if I remember correctly it was intended to be completed and ship between 2019.1 and 2019.2 based on the earliest postings on the topic), and their previous track record is releasing network API’s in a buggy state, not finishing them, and then stop supporting them when they come up with another idea which they will implement a few years later.
Why do you need to run Unity on the server side for a card game?
SmartFox (or the equivalent game server) should be all you need. Your game logic and state should be handled by the game server. If you want a Unity binary to run your game server code then you probably won’t need another multiplayer solution.
I want a server to be a Unity binary because it is 100x times easier and faster to write your game logic , both client and server in Unity using all tools unity can offer. If I had to write my server code logic in some proprietary Javascript on other platform than the development time and whole process will be much slower. The UNET solution offers this to us but it is P2P. Also new Unity NetCode in DOTS is offering us this in DGS environment. I checked the Smartfox and it will not cut it for us as the server have to be written in javascript, this is no go for us.
What about scalability?
Are you running a Unity server instance per match? Per group of players (i.e. geographical region)? Or maybe a single instance to server all players?
This is something you should worry since the beginning of your project, to avoid bottlenecks when the game will be released.
(By the way, in SmartFox the server logic can be written in Java too, which is not too different from C#)
Scalability should be solved more than enough by the new Unity NetCode solution using ECS. They bought Multiplay and use them as a server solution provider which uses “bare metal” + cloud solution to offer dynamic scalability. In our case we will run multiple instances of Unity server on a single machine. They also solve matchmaking, geo, segment players etc. These guys run service for games like Path of Exile or Apex Legends, I think they know what they are doing Currently the Madfinger Games uses Unity NetCode with ECS as a solution for their new Shadowgun multiplayer game.
What I am definitely not sure about is whether it is possible to test all of this with new NetCode preview package the Unity offers as a preview package?
Wouldn’t you just run a DOTS headless build on some dedicated machine? As far as I know, the new system also connects Unity instances, right?
On the server machine, you want to handle as many connections you can and run as many games as possible. Even if DOTS is very efficient to run within one process, I am not convinced this plays nice when running several instances (or lots) on a single machine. This in turn means: Yes, you are faster to write your game (once) but it’s more expensive to run the dedicated instances.
Honestly I have 0 experience running Unity as a server. If you can help me understand why it is inferior to run Unity as Server to other solutions I would be glad. I cant see much difference if you run Unity binary or binary of some other engine on a server.
There are many reasons as to why a dedicated server can be way more efficient. Fundamentally a dedicated server is what name says: a software dedicated to manage 1000s and 1000s of connections and requests per second. It’s quite Unlikely that Unity was built with that as a priority, considering that it does a ton of other things. Also it’s very likely that the dedicated server offers you many more tools and features than what the Unity networking API does.
There are valid reasons for both approaches (dedicated server vs. headless Unity servers) depending on what your game does, your team size and the budget of your project. Fundamentally I think it boils down to whether or not you need the Unity state on the server side or not. In other words if your server logic heavily relies on the state of the 3D world, physics, navmeshes etc… then running multiple Unity instances is likely the way to go.
You’re trading efficiency and costs for essential features you need to make your game the way you want it. If instead the game doesn’t heavily rely on Unity’s state you’re probably much better off with a dedicated server, which can be orders of magnitude more efficient and probably less expensive as a whole. (Imagine having to run a separate Unity executable for every game room)
I do not agree. Unity is putting everything behind the development of the DOTS platform. They release updates regularly and are fairly open and transparent around development. All the source code is available and extensible as well. So if it does not work for you, you can improve it.
As far as not supporting old technologies, it is generally ludicrous to support something you and the community have determined to be unusable and problematic. The best thing to do is learn and move on. Unity has consistently done that.
I would advise you to take a minute and think about what they are trying to achieve before promulgating fear, uncertainty, and doubt.
DOTS is already great, it will continue to improve. At a minimum, the netcode is something we can learn from and build our own off of.
What are you talking about, the new networking API is DOTS. The entire structure of the netcode is such that it uses chunks on the server, and per entity on the client. It is quite literally referred to by unity as DOTS-Netcode.
DOTS stands for Data Oriented Technology Stack, and the new netcode is most definitely developed with DOTS methodology front and center.
Tobiass, I am not sure how it would be more expensive. As has been said multiple times, DOTS is not about doing more, it is about doing less. Computers today are very good and executing and interrupting processes and assigning affinity to cpu’s. The best thing you can do in todays world of programming is do as little work, as much of the time as possible.
DOTS is about organization of data. - By organizing the data we are able to iterate over it extremely fast and perform mutations without needing to do expensive context switching at the OS level.
DOTS is about bandwidth - Because we are doing less work and we have access to mostly safe parallelism and concurrency, we can do more of that less work, in even less time, and let the OS negotiate how many resources to provide us.
DOTS is not about faster frames - Envision you have two systems, and those two systems are locked dependent on external stuff like the graphics driver and take 16ms to complete. DOTS is about all the bandwith that is available between those two systems finishing.
So here you have it, when running DOTS on the server, you are generally architecting for doing as little as possible as fast as you can and letting the Operating System negotiate the rest. You should see that using primitives like Docker and other container systems should provide even more control over resource allocation, while still allowing the Operating System to do what is does best, scheduling interrupts and processing time.
Developed with DOTS and “is DOTS” are entirely different things. You developed your app with Visual Studio, so your app actually is Visual Studio now, right?
Short explanation of DOTS below, and you’ll notice networking isn’t even mentioned. https://unity.com/dots
Joe-Censored I think you misunderstand me completely, and misunderstand the concept of stacks to some degree. When I develop code with visual studio I am just simply using a tool to create. When I develop code with python the same can be said. However, when i develop “pythonic” code, I am subscribing to a style of programming that leads to a common result. The same can be said for when I subscribe to Unix Philosophy i.e. NodeJS, or when i user ObserverPattern, I write Observer pattern code.
DOTS is a Technology Stack, that focuses on optimizations around tightly packed linear data that can be stuff into cpu caches, to put it succinctly. When discussing networking with respect to this philosophy networking is by definition DOTS.
If i said I am building a curl command for unix, and you said well thats not unix, and i said well sir, the curl command supports cat data | curl -u json.com &> e.json
Then yes the curl command is unixy. Even if I do not support that, I have to justify to the unix community on why it cannot be support.
Networking in DOTS does the same thing. It states what is and what is not in line with DOTS.
Before trying to expand your position any further please determine whether your premise has any cause for battle, you are trying to state the most mundane position, that something is not something, and I say, if it walks like a duck, quacks like a duck, it is a duck. Then you are trying to argue nuance that is not quite there, for a point that does no-one any good.
Hope your Holidays have been enjoyable and lets work together to try to understand this new data oriented technology stack, and how networking plays into it.
I will tell you one other thing you and others may not be aware of, the new Networking Code is only built with FPS’s in mind. It may be useable for others, but that is its main function. There will be multiple NetCode packages that serve as building blocks for a variety of types of games. They are 100% trying to not make another UNET, but the process will be slow.
he just mean you can use dots to make a flappy bird game, its not a networking framework.
HOWEVER, there is a networking package based on dots. its that simple.