Would like to discuss about my server logic

Options
Hello, i was thinking about implenting for my project PUN, but i still need to build the surface so it would fit to that kind of game.
Basically its going to be a very small mmo RPG. Its simple, its like a normal 2D rpg but with 15-20 top players online.
That means the server should always be live, and have access to the data of the players.
First that means i'd probably host the game bymyself and not with the cloud so i could alternate the logic..
The MasterServer which will be hosted by me (or someone else i'll choose), so all the data will be saved on the server's computer.
When a client connects, it will automatically connect an available room , if none is online except that client, than that client will create the room and others will join it (up to 20 players).
Now, since its an mmo-rpg like, players can stay online for a while which means the room might run out of memory, etc.. So i'll need a function that after a certain amout of time the room will be destroyed (while saving all the data of course) and players will just relog (while the first player will create the room obviously).
Bascially once a room is created it won't be possible to create another room.

So, what do you think? Will it work? I know that more arrangements should be made but thats kinda the basis..
I also heare about Photon Turnbased that can save and load state.. But i'm not really sure how it works... I mean, a state for my game would basically be all the stats,items,etc.. Which is kinda a database.

Comments

  • vadim
    Options
    Hi,

    It should work but tricky part is saving and restoring room state. Photon cloud does not supports this directly. Photon Turnbased uses 3rd party services to do so. Unfortunately PUN does not support Turnbased currently. But you can use WebRPC call to make requests to 3rd party services or your own http service to save/restore game state .