- Home /
Dedicated Server for 1v1 Gameplay
I started working on a game Idea for a competitive online game which is based on a turn based combat system.
After thinking a bit about my Idea 2 questions got to my mind.
First: Is it possible to use a dedicated server for your Unity games? And whats the best way to do so, if i only have 1v1 situations -> only two clients on one server?
Second: Is it possible to connect your server to some kind of database, where all data about the player and his character, his abilitys, his stats and the things he unlocked and did not unlock is stored?
I am gratefull for all kinds of answers.
Sorry for my bad english.
Answer by cgklutts · Dec 18, 2019 at 01:39 PM
A lot of people use Photon for multiplayer games. You could of course choose the rocky path and make your own game server using socket.io... As for the database to store the users information.. you can get a plugin from the asset store "BestHTTP" and link out to your own website where you store the information..
I use NodeJS for my website stuff... If you take the NodeJS route you might want to google
NodeJS > Which is the basic web server.
Express > A framework for NodeJS which makes it much simplier and faster to code.
Passport > For allowing users to sign into your website using google or facebook or whatever
MongoDB > The database choosen amongst javascript developers because it doesn't use SQL which sucks in everyones opinion... (at least mine)
Moongoose > A framework that makes working with MongoDB super easy. Socket.IO > If you don't want to use Photon.
Answer by GetLitGames · Dec 20, 2019 at 07:16 PM
The easiest route is a service like Playfab and networking with Photon Bolt or regular Photon.
For one vs one matches, one person could easily host the match on their PC and Photon tutorials show this. If you want to eliminate cheating (even from one of the players hosting) then you could use Playfab Game Servers, or Amazon Gamelift but that is significantly more complex.
The most complex route would be hosting your own custom dedicated server whether using Photon with Playfab or the fully custom code route suggested above (that is the most complicated)
Answer by hsadler · Nov 26, 2021 at 11:19 PM
@holyPraline Here's an example websocket server and Unity game client: https://github.com/hsadler/unity-websocket-multiplayer
Your answer
Follow this Question
Related Questions
Dedicated Server Database 1 Answer
Photon Server 1 Answer
Unity networking tutorial? 6 Answers
Hosted Database for Mobile Game 0 Answers
Custom dedicated server application 3 Answers