I am making a role-playing game. I’m hosting it here, and it already supports creating/saving accounts. The data is all saved in the account.
I’m wondering how I could make this game multiplayer. Perhaps I could have one text file that contains information about players’ locations, if they are logged in, what they are doing, etc.
Then every person’s webplayer automatically reads this file every second, and writes to it with php. When the browser reads the file, it takes the players’ variables and displays them in Unity.
To me, this sounds like an… “ancient” way of doing this. Do you have any better ideas? Thanks
Is your RPG turn-based? If not, you have to update player statuses and so on dozens of times per second. The method you mentionend (http protocol, file read/write, php processing) is WAY too slow.
Please read the Documentation of Unity, especially the Multiplayer/Networking part. There you’ll get a basic sense what Multiplayer Gaming means and how to implement it. After reading it, you are welcome to post your questions in this forum. However, as I’m trying to create my own multiplayer game atm, I can’t resist to say that it’s the hardest and most undocumented thing I’ve ever done with Unity and requires lots of time and money. Whatever - take it as a challenge to handle that stuff! Then it’s still fun
In general, the idea I get from reading these forums is that you should plan your game as a multiplayer before you start making it, as this is easier in the long run.