Should I use a dedicated server GPU for acceleration? - unity3d

I'm using Unity Engine.
I just thought about server game for game online. that server will be simulate physical, get a remote control from client then send back position, collider physical, animations and etc... of character on server.
So should I use dedicated server GPU to speed up. Is this faster than Dedicated Server without GPU?
Thank you for reading my question...
give me some ideas... thank you!

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.

How does real time communication over the internet work?

I'm researching and trying to building a RC car that can be controlled by the internet. I've started looking into how communication over the web works, but I seem to be going nowhere. My goal for the project is straight forward:
The RC car has an on-board camera and 4g wifi router that enables communication (driving commands, video streaming) over the internet. A Raspberry Pi will serve as the on-board computer.
I will be able to control the car with my PC even across the globe, as long as I'm connected.
I want to preferably do as much by myself as possible without relying too much on other people's code.
So here are my questions:
How does an application communicate over the internet? What is the interface between the application's logic (e.g pressing "w" to go forward), and transmitting/receiving that command over the internet?
How is video data stream handled?
I've looked into WebRTC and WebSockets for communication, but they are aimed at providing real time communication to web browsers and mobile, not something like a raspberry pi, and I'm still in the blind as for exactly what technology should I use, and in general the overview and architecture of real time communication.
All I've achieved so far was an app that sends text messages between devices through a server on my network, with very primitive reading/writing using java Socket.
In short, what does messenger/skype/zoom do in the background when you send a message or video call?
Any guidance would be greatly appreciated.
First things first. You cannot do real-time control over Internet, period. There is absolutely no way to guarantee the delivery latency. Your control commands can arrive with a delay from milliseconds to seconds, or never. No way around it.
Now, you can still do a number of reasonable steps to absorb that unpredictable latency as much as possible and safe-guard your remote robot from the consequences of the unreliable communication.
For example, instead of sending the drive commands directly - as in, acceleration, deceleration, turn angle, etc., you can send a projected trajectory that is calculated from your drive commands locally on a model. Your RC car must be sufficiently smart to do some form of localisation - at the very least, wheel odometry, and with a good enough time sync between the sender and the RC car you'll be able to control the behaviour remotely without nasty consequences of drive commands executed at an unpredictable delay.
You can add a heart-beat to your protocol, to monitor the quality of the communication line, and if hear-beat is delayed or missing, initiate emergency stop.
Also, don't bother with TCP, use UDP only and maintain your own sequence counter to monitor missing packets. Same applies to the telemetry stream, not just command channel.

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.

Unity real-time multiplayer with node.js (cross-platform with IOS & Android)

i'm having hard time to find an answer regarding to develop real-time multiplayer with node.js. Currently i have a small team and wanted to build a realtime multiplayer boardgame(turn base) which will be cross-platform between ios and android. Since we are out of budget to subscribe Photon or Smartfox as the multiplayer server, we suggest to setup our own node.js server. But since we are so new to the real-time multiplayer game development, we are still struggle with the decision whether node.js is the right server for our realtime multiplayer board game.
We are aware that some of the developers mentioned that the speed of node.js is slower since it is using TCP instead of UDP, but we do read some post/tutorial that using node.js as the multiplayer server.
I wanted to know if anyone here use node.js as the server when develop real-time multiplayer game?
Node can do TCP or UDP and can be a great choice as a real time server, however there are some pros and cons (as always):
Pros:
Node is easy to develop for due to strong community and plethora of modules and examples
By default, your server will be async and will be able to handle a lot of concurrent connections without you really having to do anything
Cons:
By default node will run in just one logical thread for all connections, so if you do any compute in response to a message, you are blocking all other responses from your server. So node is best suited to low compute but high I/O servers
If your realtime server creates and destroys a lot of objects then you can trigger the garbage collector which will effectively pause your server. This usually completes quickly and when it finishes all received requests will be serviced, but it does mean you get the ocasional spike in latency
So, if your server is low compute, and can handle the occasional minor latency spike, node js is a fine choice.
I would suggest designing the server so you can run multiple instances at once, as if you do hit processing bottlenecks you can simply scale horizontally by adding more server instances.
If continuous low latency is a requirement, you could also investigate golang, although it is harder to write for.

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!