MMO Roadmap and progress - Week 9

Forums:

With week 9 seeming to just begin, i have now made more progress. I've been working with my framework in an attempt to get it stable and usable. I have completed a few more things on my list. The biggest new advancement being getting sub servers to connect to each other. Specifically I have region servers connecting to each other. The next step is to send a registration message between them so they can figure out what areas they monitor so they know if they need to exist in each other's list. From here I can begin to work out the details for how to determine what to send between servers in terms of AI.

This week I also hope to accomplish getting character creation and selection back into the program. I am also working on another couple videos to extend the Server2Server series and get us to the point where we can send messages to the master server and have them show up in the sub server.

My checklist looks like the following.

Accomplished:

  1. Build a connection server - in terms of Exit Games' Load Balancing, this is a master server
  2. Build a generic sub server - for starters this will be a login server setup
  3. After logging into the connection server, pass messages to the login server
  4. Using the generic sub server create a chat server
  5. Build a Region Server from the generic sub server
  6. Create a message that requests other region servers from the connection server - using this connection we will communicate between regions for a seamless world
  7. After logging into the connection server pass back responses to the client

ToDo:

  1. Log in more than one person and have them access the chat server and send messages
  2. Design some generics to allow players to build their game - This is the current AegisBornPlayer, etc.

Week 7
The end of the week rounded out this weekend. A few notes for everyone. I finished breaking my Aegis Born code into something of a framework. The only portion it is missing is the communication between sub servers. I used this framework to rebuild the application and was able to make it so that I can now register accounts and log in with the new setup. This is really a big step forward for the project. It allows you to quickly define a new sub server type, work with the collections to separate it out if necessary, and then expand it quickly with message handlers. Also in the works are a new set of videos that I hope to have up soon that cover the creation of the sub server classes in the Server2Server course. Also some other interesting developments which I will talk about at a later date.

So the week is off to a good start. I finished up the code necessary to pass requests and events back to the client which checks off another item from the list of things to accomplish. Due to the number of people who didn't want to use the web site to register users I've decided to use the same sql files, but add the ability to register from inside the client. Also since operation requests are flowing correctly I'm going to hold off on the communications between servers long enough to design how to inform the master server when to send data to the chat and region servers when a player successfully enters the world. This then requires me to re-implement all the old code to the point where we can get in game again. From there I will pick up adding in chat and lastly beginning to play with the region servers and begin the workflow for handing collisions.

I have also been working on getting this turned into framework so that people can include a .dll or 2 and be ready to design their own messages and have things work. Closer and closer.

This week I also plan on getting more tutorial blogs covering server2server along with the videos.

Week 6
Well the Intro to Photon 3.0 series is now complete. Next I'm going to work on a set of videos to cover the Server2Server Interface. This series will cover making a master server and sub servers and how to pass data back and forth between the master server and sub servers as well as how to pass a message from a client along to a sub server. The idea will be that the master server handles all messages and knows how to pass them to a sub server where it will be handled and passed back to the master server to send back to the client. If any of you have any ideas for future videos, please let me know and I will see about putting them together.

We also have the GitHub repository which has the latest code for my own personal MMO server code. I had created a list of things I wanted to accomplish. Here are the things that are currently complete:

  1. Build a connection server - in terms of Exit Games' Load Balancing, this is a master server
  2. Build a generic sub server - for starters this will be a login server setup
  3. After logging into the connection server, pass messages to the login server
  4. Using the generic sub server create a chat server
  5. Build a Region Server from the generic sub server

And here are the things i still hope to accomplish:

  1. After logging into the connection server pass back responses to the client
  2. Log in more than one person and have them access the chat server and send messages
  3. Create a message that requests other region servers from the connection server - using this connection we will communicate between regions for a seamless world
  4. Design some generics to allow players to build their game - This is the current AegisBornPlayer, etc.

A few questions were also asked which I'm going to go ahead and address here:

Cached Events: These will be something we can use. Its something everyone will receive the moment they log in. It could range from Server Message of the Day (MotD) to downtime announcements and anything else that will need to go to everyone once they are in game.

Receiver Groups: This is a coding structure they built in Lite. Will we use it? No, it isn't something useful except in lite where events are broadcasted to everyone, everyone but the sender, or just the master client (owner of the room). In terms of what we are doing they aren't useful. We will already have structures for groups/parties, clans/guilds/corporations, as well as shout, world chat, and private tells.

For those wondering about the structure the servers are going to take, I'm looking at the following:

We will have front facing connection servers, these will handle all traffic. When they start up the wait for Sub-Server and client connections. They will funnel all messages to the sub servers.
Behind them, not accessable by players will be different servers performing different functions. A login server, which handles everything up to the character being selected and put into the world. A chat server, which keeps track of which players are connected to which connection server and passes chat through. Region servers, which contain the data about the regions they cover.

The last sub server, the region server, will keep track of other surrounding region servers so that if a mob or player passes between zones, they can exchange information and pass along the AI state. This will probably be one of the more tricky parts of the server, but is something we want to tackle to have a seamless world. This is also where the collision checks will occur.

Keep in mind, this collection of servers theoretically all exist within the same data center, but they don't necessarily have to. Because they are usually co-located, concerns of latency between servers should be a minimum. Again, this is designed with an MMO in mind. If we were building a game like DotA or the like, we would follow the lite model and have a lobby with servers that host games that could be located closer to all/most players among several data centers along the trunk or in other countries. These are the considerations you need to make when designing and is why I have chosen the setup I have to move forward with.

lazalong's picture

Seems we are exactly on the same track. I may make a branch on GitHub so I can test stuffs in case I am slightly ahead of you :)

I made a branch in my GitHub project called Photon3.0. So far it has the initial connection server, roughly 80% complete. Next I'm building the server peer which will be used when a subserver connects to the master server. pretty straight forward at this point.

lazalong's picture

Could you please make the github photon3.0 branch the master branch ?

Done. I ment to do that last night, but didn't find the time.

Made more progress tonight. I'm in the middle of the code to handle registering a sub server. I'm trying to figure out if Photon removed the ability to have the operation handlers or if they just decided not to use it in the new MMO code.

When I complete this section I will be writing the generic Sub Server and then setting up how we will go about starting each of these. When i finish with step 2 above, I'm thinking about first making sure all the stuff works at once. This means 5 servers. 1 master server, 1 login server, 1 chat server and 2 region servers that connect to each other. Once that is working, I can begin to focus on the messages that will be passed back and forth. I may switch it around to do the chat server then the login server, just so I can quickly gauge how well things are working.

After I get the code where I want it, I will begin taking the time to record videos and write up the steps to complete these. I think it will be an interesting experience.

lazalong's picture

Saw on your twitt that you searched for a recording tool. You might try this sourceforge open-source one http://camstudio.org/

I must try if I can take records of my game in-progress :)

Laki's picture

We look forward to.

lazalong's picture

Will you consider Roles for connected peers?

Such as
- LobbyAdmin : can add, close games, ban players, ...
- GameAdmin : can ban player in-game, monitor data, perhaps even add/remove game object.
- FreePlayer
- PaidPlayer

It seems those roles should be set during login as it could lead to different peers being created. For example you could have a "simple" admin console instead of a full Unity app to control the lobby.

Also do you plan to disconnect the peers that aren't needed anymore. For example once the logging is done do you think we still need the connection to the login server? Shouldn't we only keep a connection to the chat & game server?
In a similar thought do you think it is possible to toggle from one "region peer" to another. I am thinking about decreasing inter-server messages where the client changes peers when he changes regions/servers.

Last time I tried to follow you photon tutorials I got so lost because half of the content was in the SmartFox tutorials. But I have no interest in smartfox and had a difficult time jumping between the two tutorial sets. So just a thought but for "Photon 3.0" it would be cool if you isolated it and literally built it from scratch so we can see every step in a clean environment. Again, just a thought to help people like myself who are new to servers.

lazalong's picture

Mh... I only read the Photon part and was able to recreate the code with only the Photon tutorials. Only difference from the tutorials was that I use MySQL directly (not Hibernate).

Just when we are getting used to Photon 3, looking forword to the new improvements "under the hood"

hello, dragagon. we have week 9 already, when you will show new video lessons?

I'll be working on more videos tonight and getting them posted up. I apologize for the delay, I've been working on the code I have to make sure future videos work correctly. Tonight I'm going to tackle the SubServerCollection class, the Handler classes and adding the handlers to the master server and the sub servers. Should make for about 3 videos to cover it all.

thank you for care about us=)
dont forget to check sound, i hope you can show videos with login system soon (just stuck in it on photon 2.6)

In my prototype code, I just finished up getting a simple "Game wide" chat going. So my prototype now allows user registration (Yes no more dependence on Web Server), login, character creation, character selection, and now a world wide chat. I hope to cover all these within the next couple weeks.

i'm waiting for it with impatience and especially videos

Laki's picture

I'm too. We all waiting for it.