Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    10
  • comments
    16
  • views
    11039

Another entry, another dollar

Sign in to follow this  
Reddox

639 views

Linq have been awesome! I ended up creating a few extensions for basic development, but other then that, the feature rules :) I have been doing some researching for developing for OSX. It looks like one of the compilers I am using will natively support that OS in a few months or so, and that is good.

There is an OS called SkyOS (http://www.skyos.org). It's a one-man show, but have been around for years. Unfortunately, the foundation is not complete as of yet, so it's no good for any kind of server development. And it has some basic client side development possibilities. But all in all, it may work well for 2D game clients ... who knows. From what I have seen so far, it whip's Linux's butt for basic use ....

With the database back-end and the DAL complete, I turned my eyes towards networking. As you know from previous entries, Socket Tools is used due to ease of use, SSL, and the fact that purebasic have no plans for a basic server network library.

There are a few servers (software) that must be created to get this game (Unformed) off the ground. One Login server, 2 Shell Servers, 1 Core server, 1 AI server, and 1 instance server.

The login server is where everybody connects, manage their characters (add/delete, etc), and then gets forwarded to a shell server. A shell server is pretty much an enhanced relay server. They are created to run on the least amount of resources possible, with massive amount of connections.

What they do is accept a connection transfer, and forward commands to and from the core server and player. If a core server has a message/packet to send to everybody on a map, it sends one packet to each shell server. And the shell server will relay that message to everybody on that map on it's shell.

This keeps the bandwidth cost of the core server down to a minimum, while the shell servers can handle the huge traffic. Now this brings us to the core server. This is responsible for the movement validations, economy, and various other things. It accepts input from shell servers, and AI server.

Instance server(s), are available for the sole purpose of instances. Each server can hold an instance of a pre-determined amount. When a player/group enters an instance, they are transferred to an instance server that has free slots available. That server will load up the instance, and take the player's connection. Since these servers are mostly self contained, the Instance server fills the roll of the Core, and AI server in one package.

The AI server controls the MOBs, NPCs, Companions, Pets, and Minions in the game. That is the sole purpose of the AI server. With the database backend, this allows for multiple AI servers, each controlling their own portions of the AI ... Scalability at it's best :P

Since my goal is to have each server use less resources, and able to do more in a short time period .. Contention is something to watch out for, especially in threads. With that said, the only thing the login server needs to worry about is a shared (in memory) ban/suspension list. And, since the server is one of the least bandwidth/time resource hog, it can be threaded nicely.

Shell servers are a little bit trickier, they need to maintain one connection to login server, one to core server, and all the player connections. It really only need one thread for sending, and one for receiving per socket class.

The core server isn't rocket science. Environmental controls, zone controls, movement validations, economy, items, effects and the like. Really simple stuff. It has connections to AI, Login, Shell, and instance servers.

That's about it, server wise. Original graphics and music, or at least CC licensed products are a bit tough to find on the net, with permission of course. One of the mistakes with Mirage, is that it uses copyrighted graphics without permission, also known as stealing and is against the law :( Unfortunately, almost the entire Mirage based games, such as Legend of the Zodiac (Ex), Secrets of Mirage, etc follows in Mirage's footsteps, using stolen graphics, and in some cases, stolen music.

With Unformed, I want to get away from that. The way I see it, if I used stolen stuff in my game, then it's not really my game. This is for released versions. Testing is a bit of a difference as it's not really released, its for testing algorithms, etc.

Cost is another issue. Each server/hardware dedicated server costs between $20 to $300 a month to rent. For starting, this is a good deal. But once you start scaling out the servers, it gets expensive. There's the option to buy or build a server and co-locate it. But every single collocation cost I have found is extremely over priced. Head over to http://www.webhostingtalk.com. It is one of the best places to find Dedicated servers. The problem is, the top leaders in the collocation industries who are giving out false information there, even admitted to be scammers when it comes to collocating expenses, ouch!

So it's time to look for small shops ... :P Any how, back to prices. I figured $2 a month per account is adequate. At least with 100 folks, I should be able to pay about one dedicated server, after IRS takes away the taxes.

From there, as the user base grows, I can start placing the individual servers on their own hardware, then eventually add more shell and instance servers. I forgot to mention, having shells in different datacenters around the country is a must to service people in the US with decent speeds. The only catch is that the shell server would need a fat pipe for player connections, and a fast connection to the rest of the gaming network servers.

With all written above, most of the network infrastructure is complete. All except for the update server. I remember reading the Guild Wars developer interviews concerning the updating the game on the fly, claiming to be the first? I laughed since the first mmo that did that came out in 2001 ... years before guild wars.

So, since Mirage pioneered on-the-fly updating, I was looking at doing the exact same for Unformed. It's not hard, create a hash for a version, as well as files, and do a comparison. Same for all updates done.

Now, the workload could be on it's own server, instead of integrated into the game server, but why do it at all? If much of the server side logic are compiled scripts such as CScript (aka C#). Then they could be modified with out modifying the client. Bug fixes and AI changes could be done on the fly. Object data (sans id, name and image) can be modified on the fly.

The only updates truly needed are for additional/modified media (graphics, sound/music), and the media's identifiers (name & id). With that as the case, client updates are rarely (say monthly or so) needed. And even in that case, just have the Patcher run before the client runs, each time to check for updates that way.

As mentioned before, Unformed uses byte based networking. It first came into the MS community by Verrigan, then when Spodi came onto the scene, he created a nice tutorial on his site http://www.vbgore.com, you may even seen him on Gamedev.net :) However, since (it seems), I'm one of the few people who believe security is needed between a client and a server, Unformed will be using SSL for encryption. This does make the packets bigger, but not as big as string packets, since I use bytes instead.... :)

That's all I can think about for this entry. The next one should contain some actual content related info!

Sign in to follow this  


4 Comments


Recommended Comments

Hehe. I recently made the move to Linux myself. It was prompted by two things. Wine (Cant live without CS:Source) and something which i should have spotted earlier. mingw32, or more specifically the ability to build windows apps on Linux, then test them on Wine :D.

I don't think i will be going back to windows any time soon. Now that i can develop for it, via Linux that is. I'm so much more productive on Ubuntu too. I can push that MSN conversation, or browser into a far away workspace and forget about it.

So ya. Linux > Windows :D. For game development at least. The only argument against that, is DirectX, but honestly, in the world of indie development, one has no reason to use DirectX.

Anyhoo, good luck on the MMO!

Share this comment


Link to comment
I follow this journal every update. I love indie MMOs, and was definatly a fan of Mirage Online. I cant wait to see the first screenshots/videos!

Share this comment


Link to comment
I follow this journal every update. I love indie MMOs, and was defiantly a fan of Mirage Online. I cant wait to see the first screenshots/videos!

Share this comment


Link to comment
Thanks for the replies :) I do want to repeat though, that I am in no way going over to Linux until they get their act together :) Until then, it will probably keep on flailing around trying to keep it's head above water (in the desktop area). Server side, however, is a totally different story ...

I've been keeping an eye on Jason Ely, the creator of Dransik, Ashen Empires, and Stygian Worlds. I may end up going that route to start with. In other words, I keep this design and code written so far.

However, for the first "Phase", basically the 1.x series will host everything on one box, and one server software. I just need to remember to keep things modular, in order to easily separate them for the 2.x series.

This will get this game out, running, people can play and content can be develop, etc. Then in the 2.x series, and hopefully there's enough community by then, I can rewrite the back-end and the players would never know it :)

The more I think about it, the better it's sounding to me.




Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!