Mmo-str / Pun ?

Options
Hi , first of all, sorry for my bad English i try my best.

I want to make a mmostr with unity engine and use photon as master server and want to know if that possible ? can we don't use the room system ?

my game is a galaxy who use dynamique solar system ( who can be destroyed and created by player ) each of this solar system is a map who stay in persistent world ( he don't gonne be destroyed when player leave )
i want to use single scene in unity who is generated by some dynamique prefab .

ex : player 1 create a solar system , and add 2 planet , when he leave , the solar system stay online , player 2 connect the game and see this solar system , when he connect in , he show the 2 planet who player 1 make .

is that possible with photon ?

again , sorry for my poor english

Comments

  • Kaiserludi
    Options
    In general this is possible with PUN, but if PUN is the better option or if you should better use the MMO-application (wich currently isn't compatible to load balancing) depends on the question, how many players would be online at the same time in the same galaxy: If you have thousands of galaxies with only a few players online at the same time in the same galaxy, then PUN with its room-concept is the better approach for the high.level Photon access of choice, but if you have only a few galaxies, which are huge with potentially thousands of players per galaxy online at the same time, than the MMO-application with its interest-managment would be the better option as high-level Photon layer of choice. Either way the Photon low-level core can handle both scenarios.
  • there is not multiple galaxy in the server cause 1 galaxy = 1 server .

    there can be about 1000 player connected in same time in the galaxy , i want that is hard to make new solar system for a player ( like need a GUILD for make one ) but the player can make easily new planet in the solar system

    so for exemple :
    1 server = 1 galaxy = 1000 players

    1 galaxy = 0-700 solar system up to 0-30 player per system , player can switch and look all system if he have access to it ( ship on place ) , is like EVE -ONLINE , but more strategic version
  • Kaiserludi
    Options
    Thats sounds like the MMO-application is the way to go: just one galaxy per server is not really what the room-concept of PUN or Lite is made for, but such amounts of players in one instance are exactly what the interest managment of MMO is made for and when you always have one galaxy per server anyway an the player shoud be able to play in the same galaxy, whenever he is online, then the Loadbalancing concept from PUN, which will assign a game-server to the creator of a new room, depending on which game-server has the most unused ressources, will not be of any use for you, anyway, as you would just have one room per gameserver.
  • i don't really understand the 50% last part of your message . the solar system in my galaxie is same as a map in world of warcraft or eve online (so player only see the solar system where is in), but this map is generated by data stored in database . is there gonna be a mmo application for pun soon ? or he never get release ?
  • Can i make my server host the masterclient of all my room ? cause if i make a Client Masterclient of my mmo-game he can change data with memory hack , if it possible , can i make room alive even if there is no client connected ? and all with loadbalancing side application ? thanks much
  • Kaiserludi
    Options
    i don't really understand the 50% last part of your message . the solar system in my galaxie is same as a map in world of warcraft or eve online (so player only see the solar system where is in), but this map is generated by data stored in database . is there gonna be a mmo application for pun soon ? or he never get release ?
    Currently MMO is not compatible to PUN or LoadBalancing and there are no plans yet, to make them compatible in the near future, but MMO is perfectly compatible to the standard Unity client SDK.
    Can i make my server host the masterclient of all my room ? cause if i make a Client Masterclient of my mmo-game he can change data with memory hack , if it possible , can i make room alive even if there is no client connected ? and all with loadbalancing side application ? thanks much
    If you provide it with multiple gameservers, then the LoadBalancing Setups Masterserver will automatically move new rooms to whatever server will have the least load / the most unused ressources left and PUn will automatically connect to that gameserver, if the client wants to join that room, including the master clients. IIf all Masterclients should additionally hold a connection to a seperate server, where they can find all other master clients (for whatever reason this should be good for), then this is possible with Photon, but you would have to use the Standard Client APIs instead of PUN or other LoadBalancing client APIs or you would have to modify the client side PUN / LoadBalancing source (which is open source) yourself.

    I don't understand, waht you want to tell us with the memory hack sentence. Can you eyplain it a bit more in depth?

    Yes, you can make rooms alive with no clients inside, but you will have to modify the high level server code in the LoadBalancing Game server application therefor (avaiable as open source within the server SDK). However this means, that you will have to run the Server on a hardware, which you can administer youself, which for now excludes use of exitgamescloud.com
  • kay , i explain better what i want and what i mean with hack memory

    my game is a space stratégie game like homeworld homeworld2.jpg

    i want to make a similar game in mmo-str . my game have this hierarchy :

    galaxy = is one server , and it look like a lobby who player can join solar system
    this image can explain better 1_15.jpg

    solar system = this is the main game ( player play here , build new ship and exploit some ressource ) a player can switch to solar system 1 -> galaxy -> solar system 2 with there ship , there can be unlimited amount of system solar ( who can be maked by player , but stay alive forever till a player don't destroy the system solar )

    a solar system look like that : 201846640_0589ed8cf3.jpgss000675fp.jpgthis give a main view of a system solar .

    and that give a view of the ingame content
    15230.jpgand that

    for the memory hack : if a player is masterclient , he can use a apps like cheatengine for modify ram memory ( like gold who player have , life of ship etc ) if the data is not managed by server , so i want that only my server can host for get all data and can't give a possibly hack of game .

    so what exactly i should use for my game ?

    unity standard client sdk ? and the mmo-application
    unity pun ? with loadbalancing ?

    galaxy = room reference ?
    room = system solar ?

    what sdk i have to use ?

    thanks for help
  • Kaiserludi
    Options
    Well, now it sounds to me, although you stated your game to be a MMo, previously, that you do not really want to develop a MMO like WOW with tenthousands of players on one single map, but a classical Multiplayer strategy game like the Warcraft -, Starcraft- or C&C series, where you have a lot of maps, but a small amount of players per map like not more then a few doesn't players on the same map at the same time, jsut with a different scenario and with persistent maps, that live on, even with no player playing them for some time.
    In this case, you should better go with PUN and use one room per solar system. You could either use one master server per galaxy and and much game-servers, as needed, depending on hte size of your galaxies and the hardware, which you use for them or you could just use one masterserver and a suitable amount of gameserver for all galaxies and modify the master server code to open up a different lobby room for each galaxy. Which room is running on which gameserver should really be of no interest to you, as there currently is no build in functionality to cdirectly ommuncate with players inside of different rooms anyway.

    About cheating:
    You would just add some server-side game logic, which is checking important requests from any client against the rules of the game. So for example if player a request, that he has attacked player b with weapon x, the server would check, if player a previously gained access to weapon x and has it avaiable on the position, where it states the origin of the shot, if weapon x with the upgrade-state of player a has that amount of firepower, if it still has munition, if it can shoot that far, etc. and if something indicates a cheat, then the server would simply return an error to the client of player a and not grant the request. You do not really have to give the masterclient any more rights then the rest of the players. The only reason that PUN knows something like masterclients is for cpompatibilty to unitys buildin netwok, which doesn't know gameservers, which could fullfill the masterclients role instead, but if you don't have to port an exisiting peer 2 peer network usage to PUN, but directly start with a client-server setup, than just treat every player equal and let the server be the decision maker.

    PUN always comes with LoadBalancing builtin, but if you donät need it, because one gameserver is enough for you, just set up only one and it will still run fine.

    Coming back to galaxies: If you really want to strongly differ on galaxy from each other with maybe different client versions in differenct galaxies and different ingame rules depending on the galaxy, then maybe one virtual application == one galaxy, as the masterserver in this case keeps the players in one galaxy apart from the ones in another, so the clients don't see the roomlists of another galaxy, get seperate lobbies, etc. and it can still mix rooms from different galaxies on one gameserver, so that you don' waste ressources by having hardware only runing half the amount of rooms it would be able to just because of small amounts of players in some galaxies.

    Room == Solar System

    You would use the most recent Photon 3 server SKD and the most recent PUN SDK.
  • okay , i'll try thas . i wanted to know if we can communicate in room to another room ?

    ex : player 1 is in system solar 520 , and he want to send a message to player 2 who is in solar system 200
    the message is : " come to solar system 250 with your armada" ,

    the room 250 no have anyone connected in , this room have 3 planet .

    so the player 1 and 2 use the hyperspace of his ship , unload the solar system ( room ) and connect to the new solar system ( room 250 ) and load see all his ship comming from hyperspace , see the 3 planet , and play .

    is that possible with photon ?
  • Kaiserludi
    Options
    Currently it's not possible to send messages to players in other rooms.
    Edit (Tobias): Yes, there is. Details below.
  • damn , there is no solution ?
    is that gonna be released soon in photon ?

    do you have a tutorial or project exemple for make permanant room ? or a documentaion or something like that ?
  • Tobias
    Options
    Well, all this is possible with Photon of course. It just isn't a "out of the box" feature and requires some custom work by you. Our implementation just doesn't do it and the Photon Cloud is not likely to get this feature anytime soon.

    Have a look at the "Lite" application in the server SDK. This is our base for everything and we try to keep it simple.

    You can change the implementation of the peer (in the server side) to send chat messages (or any other) to any room. It's in fact simple as you could use the very same mechanisms that is in place to get a client's requests into the "currently joined" room.
    The operation RaiseEvent is our general purpose method to get an event into "this peer's current room". Add a new operation based on RaiseEvent and extende it by a "room name" parameter. Every time this operation is called on the server, it finds the room (by name) and sends a message about this operation to the specified room.

    That's pretty high level but currently, we can't provide free, custom support beyond that. I'm sorry.


    Persistence:
    We don't really want to do persistent rooms (or any persistency for that matter). We don't want to force any particular persistency solution on our customers and it keeps the Photon SDKs free of any DB requirements, too.
    The high-level idea is to assign a ID to each room and then save the room's data some way each time it changes. If someone enters a room (world, whatever), load the data. Solve this in your favorite DB and DB abstraction layer.
  • thanks for your help , think i can do what i want why that info .
  • Hi , it me again , i have a question about Masterclient.

    if a player is first to join a room , he become masterclient , true ? i wanted to know if this master client is the server of room ?

    cause if in room i have about 2000-3000 entity , is my gameserver keep all data ? or is it the client ?
  • dreamora
    Options
    The masterclient is the server for the room in the sense that he has the authority and that the local data are with him.

    Photon only handles the data transfer and the properties for actors and rooms.
  • if i understand that work like that :

    Player2 -- PLayer 3 -- PLayer 4
    --O
    O
    O
    --||
    ||
    ||
    --||
    ||
    ||
    --||
    O
    ||
    --\\__O-Gameserver-O__//
    O
    ||
    ||
    O
    MasterClient
  • dreamora
    Options
    if the -- between the players is no connection, then yes thats right, clients & master client (is a client too just a special one) talk to photon which forwards it to the desired target clients in the room.

    MasterClient can be something you host or simply the player starting the round
  • Tobias
    Options
    Everyone communicates with anyone else through the server. Per room, "actornumbers" are assigned as shorthand per player in this room. They start with 1 and go up and are never re-used.
    Anyone with the lowest actor number in a game (a.k.a. room) is in this room for the longest time. Photon doesn't care but to simplify things, the clients assume that one player is a "master" and does extra tasks (like start a round or be authoritative about scores, etc). The masterclient changes when the current master leaves a room. Depending on how well this is handled, the other players can keep playing.
    A masterclient does not really host the game itself (it's always on Photon) but the closes you get to Unity's "host" or "server".
  • hi , i have little prob now : can i make master client send all data of room ( entity position , variable , and other thing ) each min to masterserver , and when all client disctonnect from room , photon call a php file and send all this data for save in sql database ?

    cause if i have to call each minute this php page by the masterclient i gonna get this prob : about 2000(room)*500 up to 3000(entity) my server gonna have about million of sql querie per minute and that is a bit bad and/or if all client disconnect from room 1 sec before the next save , we gonna lost 1 minute of data .
  • Tobias
    Options
    PUN is not really suited for 3000 entities, let alone 500 or even 2000 players per room. Being room-based in the server logic will simply trash the idea, as you can do the same maths for position updates a player receives. There is no interest management in PUN (yet).
    You really need to get into Photon Sever development and use custom operations to your advantage. Then you can keep stuff in-memory and save it in intervals.
    The mass of DB updates via PHP will be your least problem if you continue to use PUN.

    Try to get into: http://doc.exitgames.com/v3/mmo
  • buck
    Options
    Tobias wrote:
    PUN is not really suited for 3000 entities, let alone 500 or even 2000 players per room. Being room-based in the server logic will simply trash the idea, as you can do the same maths for position updates a player receives. There is no interest management in PUN (yet).
    You really need to get into Photon Sever development and use custom operations to your advantage. Then you can keep stuff in-memory and save it in intervals.
    The mass of DB updates via PHP will be your least problem if you continue to use PUN.

    Try to get into: http://doc.exitgames.com/v3/mmo

    This is good to know.

    Using the demoworker PUN example as the basis for testing. At what point does PUN top out using cloud services? Is it 500, 200, 100, 64 or 10 concurrent connections.? Any data on this would be helpful.
  • dreamora
    Options
    With the message limit of indie (500) and realtime syncronization of a single photonview per player, its at <= 4 players per room at a sendrate of 30
  • that not 2000 player per room ... but 1 to 15 , this is a strategie game so player have lot of entity ( 1 plyaer can have 200 ship for exemple )
  • dreamora
    Options
    Well you can do the math yourself: messagelimit / sendrate = total number of messages per 'tick' for all views in the room. At a rate of 30 thats 16.666 messages for all views at the 500 msg limit
  • Tobias
    Options
    Even if you have 10k units, you don't have to sync each of them based on their floating-precision vector position and "by itself".

    You can have 1 photonView that observes a script. This script runs a logic across your units and aggregates movement updates (position to go to as int-value with fixed point precision, time of arrival) into a message and accepts incoming updates accordingly. This will save messages and perform far better than the alternative "brute force" approach.
  • Kaiserludi
    Options
    For RTS games the usual approach is, not to send thew actions of all units through the network, but to instead send the commands, which the players are giving.
    For example you could have an operation "moveOrder", with a list of unit-IDs, for which the player has given the order, the target position, where these units should go and the servertime, when the order should be executed.
    Now client a sends this moveOrder-operation to all clients in the same room with the execution time being somewhat in the future, example if you currently have a roundtrip-time of 100ms, you could set the executiontime to servertime of the player giving the order plus + 200ms, so every client has enough time to receive it. Then, at execution time all clients would let their identical AI pathfinding algorithms calculate the actual movements of the units locally, so that you do not have to send all these movements, update positions, etc.
  • Hi , first of all, sorry for my bad English i try my best.

    I want to make a mmostr with unity engine and use photon as master server and want to know if that possible ? can we don't use the room system ?

    my game is a galaxy who use dynamique solar system ( who can be destroyed and created by player ) each of this solar system is a map who stay in persistent world ( he don't gonne be destroyed when player leave )
    i want to use single scene in unity who is generated by some dynamique prefab .

    ex : player 1 create
    solar panels , and add 2 planet , when he leave , the solar system stay online , player 2 connect the game and see this solar system , when he connect in , he show the 2 planet who player 1 make .

    is that possible with photon ?

    again , sorry for my poor english
    Were you able to create the game? It seems an exciting one as I love to place solar system based theme games..