I am developping a game since couple months, I did a huge terrain with a lot of 3D models etc, no problems with that.
Now I need to add multiplayers functionality in it, but I have many constrainsts :
The server will need to host at least 50 people at the same time ( I will rent a server I think )
I need to store data on the server, example : If a player disconnect with a flashlight in his inventory, he will need to have the flashlight again when he is logging in again
Off course every player will have an account
My question is, is there an existing template / project / tutorial on the asset store ?
If there is not, is it possible just to add the “Up to 50 players at the same time” features without storing any data ? ( I read somewhere “on the cloud” ?? )
I know scripting, but I don’t know anything about networking ( juste skills on PhP code, some Mysql and that’s it )
Basiclx you ll need to write your own server code using lidgren/photon/whatever
when player connect, load his data from a db
when playing, keep data in servers memory, read and modify it from there
on disconnection, save his data to the db
Do not connect unity directly to the database. Unity is client side and you must never trust anything from the client.
You’ll need to add a new layer that will sanitize and check inputed data.
You can do that with any language via socket or as a webservice via http.
And no, there isn’t tutorials about that, but with a little time to search, you’ll surely find help on most if not all specific parts of you system.
So I need to build a program - which is absolutely different from unity - that analyse and filter the required data, and then send it to the master server right ?
You have to write your own TCP or UDP server which will work on your dedicated server.
You can write TCP/UDP server using, Java, C# programming languages or you can use something like Photon or anything similar to it if you can’t write from 0 your TCP/UDP server.
look up on google “gtgd unity3d”. this guy makes a tutorial that are each 1 to 2 hours long ,he now has video 33 and series 2 out. hes going to make a tutorial on how to add master server that lets 32 players connect. the whole series is about a networked fps shooter, that has chat, kill log, teams and scoreboard. its free also