This section is designed to walk through the creation of a master server and a set of sub servers that work together to form a small cluster. The setup we are going to build is not exclusive to an MMO project, however it is more likely to be used in an MMO game. We will begin by building the server up into a small framework that will be easily expandable with different sub server types. The premise behind this setup is that a client will only connect to the master server and the master server will route data to the appropriate sub server and then return the response the sub server generates. This sounds like it will put a lot of pressure on the master server, but in reality the master server is really acting like a router and shuffling packets between connections. We will also be building a new client that takes the new Photon 3.0 client code and makes it easier to us to expand the client without a lot of needless coupling like the one built for Photon 2.6. This should clear up some of the errors seen in other tutorials as well.
This series will be provided in 2 ways, text based blogs like the original Photon course as well as video tutorials for those who like a more visual approach to learning. Entries will be added here as they are produced.
Comments
lazalong
Sun, 10/16/2011 - 03:05
Permalink
Some precision
We discussed it via email but I will ask some questions so everyone is clear on the goals.
- What will the sub servers manage?
- Will it be possible to have a single world divided in regions with region being in different sub servers?
- Will it be possible for peers to move from one sub server to another?
Yes - if I am still up to date to your goals.
One question I didn't ask:
- Do you think it will be possible to have some sub servers being "sub games"? For example, sub servers 1 to 10 managing regions in a single world and sub servers 10 to 20 being different "dungeons" with gamelogic specific to those dungeons.
PS: Could you provide some sequence diagrams to document the data flow between client and sub servers?
dragagon
Sun, 10/16/2011 - 08:55
Permalink
Sure, sounds good.
Sure, sounds good.
Sub Servers, depending on the type will manage different things. A Login SubServer would manage account creation, Login validation, and Character creation and selection. A Chat SubServer would manage Global chat, guild chat, tells, and other forms of non-local messaging. A Region sub server will handle collision detection, monster AI, crafting, movement, and local messaging (shout, say, emote).
The Goal of the region sub servers is to provide a seamless world for the player to maneuver around in. The will be interconnected, meaning for any single sub server 8 or more connections would be made around them corresponding to the surrounding regions.
I think it will be quite possible to make a sub server behave as a dungeon or instanced area. The idea would be that the sub server wouldn't be connected to other regions, but would have trigger areas that when used would move the play to another region. In this fashion you could have doors that lead to the instanced areas.
I will see about getting some sequence diagrams up so that it will be easier to follow.