Main differences between Peer and LitePeer

Options
Alewinn
edited October 2011 in Photon Server
Hi !

I'm trying to introduce some kind of FSM server side to be able to manage more closely states changes between authentication, character management, World, instances, etc...
I wanted to do that because i want to be able to use all the features of the Lite project (When a group of players come inside a game instance created only for themselves) and in the same time be able to manage "big" worlds with massive load of players (MMo with grid and interrest areas).

Digging the examples code i founded that the LitePeer inherits directely from Peerbase (ok) but MMoPeer iherits from a Peer class. What is the job of the Peer class ? What will i have if i make LitePeer inherit from Peer instead of Peerbase ? Will this impact performances ?

As i want to "unify" these two aspects (instances and mmo world) in one FSMPeer class (uhuh .. "One peer to rules them all" !) i'm questionning myself on the best way to handle this. Looking closely the Peer class i thought that it can act like a sort of FSM (with the SetCurrentOperationHandler stuff) but it's not as much sophisticated than a real FSM (like stateless).

Any suggestions on "mergins multiple peers" in one ?

Comments

  • dreamora
    Options
    I see no reason why you would want to use Lite at all within MMO

    You can just generate a new interest area and assign those you would put into a room to such a 'room interest area' or you just assign a specific channel to them. in both cases it does the job too and that much better and cleaner than trying to force room onto the MMO which will be a nightmare
  • ok. That make sense.
    The main reason i wanted to mix MMo and Litelobby/lite was that there are special places in the game that are acting exactly like litelobby and lite. So i wanted to know if it was redoing the wheel to re-implement them in MMo.

    Thanks
  • Boris
    Options
    Alewinn wrote:
    Digging the examples code i founded that the LitePeer inherits directely from Peerbase (ok) but MMoPeer iherits from a Peer class. What is the job of the Peer class ? What will i have if i make LitePeer inherit from Peer instead of Peerbase ? Will this impact performances ?

    As i want to "unify" these two aspects (instances and mmo world) in one FSMPeer class (uhuh .. "One peer to rules them all" !) i'm questionning myself on the best way to handle this. Looking closely the Peer class i thought that it can act like a sort of FSM (with the SetCurrentOperationHandler stuff) but it's not as much sophisticated than a real FSM (like stateless).

    In Photon 3 Peer is a PeerBase subclass and it adds nothing but the IOperationHandler capability.
    The IOperationHandler members has a peer parameter that allows you to implement stateless instances for your state machine.

    Lite and MMO Demo are not designed to combine multiple peers (or games) into one, so I agree with dreamora that you should just pick the features you need from Lite and add them to your server. I think you could reuse the Lobby functionality if you wanted, just send the required messages to the lobby instance at enter/leave.
  • Yes :)
    Seems that i've had a good idea to post about my internal questionning before acting :D

    Thanks alot for these responses, seems that it will make me gain a lot of time.