Symbol's picture

OpenTK + C# - MMORPG Game Programming

Are their any tutorials out there for MMORPG programming? Using C# and OpenTK? I really need a tutorial.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

A MMORPG is not something that you can build using tutorials. It's the kind of project that requires solid foundations in software engineering, an experienced team to back you up and a generous source of funding (how do you plan to cover server costs?)

Is it possible to write a persistent, online RPG in C#? Yes, it's been done before (sorry don't remember the name of the project). Note that I avoided the term "massive", here - massive implies tens of thousand of regular players. Not even Planeshift can touch that and it's a project that's been in development for years.

My advice (take it or leave it as you please, no ill-will :))

  • Forget the "massive" part.
  • Scratch the "RPG" part too. Role playing games are interesting to design but boring to develop - speaking from experience.
  • Concentrate on creating a fun, online, competitive game. Start with a simple but interesing concept, for example, something like Magic Carpet:

    Players fly on a map trying to acquire mana (needed for casting spells); find stronger spells; defend their castle; destroy their opponents' castle. Graphics are simple (heightmapped terrain, skybox, water reflections, a couple of terrain props and a few spells (even 2d billboards can work)), but the game can look quite impressive with a little work. No need for AI (competitive play only). Simple physics / collision detection.

    Assuming prior C# experience, you could complete this in a year. Even less if you are familiar with graphics / audio programming.

I hate being negative, but I consider myself a relatively experienced programmer and I wouldn't even dare to think of designing a MMORPG. A Magic Carpet remake, though... (if only I had the time :) )

puklaus's picture

Or find some existing project, download sources, learning it and then join the group if have good ideas and so.
I remembering there is some C# projects on open source (dont know opentk projects but axiom projects (and on axiom forums Smartmap project is used to RPG project (still early stage,i think,but it is under development)))

objarni's picture

Magic Carpet was ... Magic :) It even had a red-green "true 3d" rendering mode for red-green-3d-glasses. Never saw that in other games haha.

Kamujin's picture

I work on an MMORPG using C# and OpenTK. Fiddler is completely correct in his assessment.

Just to get my MMORPG to it's current state has required spawning several feeder projects to build network, database and graphics support libraries. Additionally, there are projects for development tools and game patchers. Massive doesn't just refer to the number of players.

In my case, this is something that I really want to do, but it's also something that I realize I will probably never finish.

I have extensive experience with software development and still the project is pretty overwhelming.

You might be better served to look at something like http://unity3d.com/ instead as you will have something playable in much less time.

Dinberg's picture

Magic Carpet looks awesome - is that by bullfrog?

the Fiddler's picture

Yes, it's a bullfrog game.

objarni's picture

Another classic Bullfrog is PowerMonger. Love the intro sequence! :)

Inertia's picture

One MMORPG server emulator I know of is Dawn of Light, which is written entirely in C# (look at the repository if you have doubts about that). Performance appears not to be the issue, but rather player activity (the largest freeshard has ~500 players at prime time).

Long ago, I've read an interview with Mythic (the creators of www.darkageofcamelot.com) in which they stated they saved approximately 2 years worth of engineering time by licensing an engine, solely due to the network logic provided by the engine. Keep in mind though that the game is older than 5 years and back then a 64Kbit ISDN was a BLAZING internet connection for consumers and not standard, nowadays you might get away with something less efficient.

Dinberg's picture

I actually work with Dawn of Light, but didn't want to bring it up as I know some people find the issue sensitive.

But seeing as someone else brought it up, I will elaborate a bit on this:

What I was originally going to say until I thought differently of it was the following. Dawn of Light has been in development for years and years, and is solely a server-side application. It has a large amount of developers that have worked on it, of varying skill as with any open source project, but there have been some absolutely brilliant programmers for the project. Many thousands of man hours have gone into its creation.

And yet its only server side, and still incomplete. So whats the issue? Well, At Dawn of Light the ONLY concern is the server program. If theres a bug, you can be sure its in the server code rather than the client. No media has been created, nor efforts in graphics programming, collision, game client loops, client side packet handling - in short, it uses a ready made client. The client when making a MMORPG will take up a SIGNIFICANT portion of the games development, especially creating media to populate the world with. And yet its still taken hundreds of people all that time, without even worrying about client side!

As touched on earlier, the problem with making both client and server is it doubles the places you have to look to fix a bug. If you have a text string displaying incorrectly, it could either be the server sending it wrong or the client reading it wrong. Creatures jumping around could be the client reading perfectly and the server misbehaving, or the client making a tangled mess of perfectly ordered server messages. That will cause you a nightmare to develop, and will not be fun to fix AT ALL!

I believe Dark Age of Camelot uses the Gamebryo engine, which is quite a costly tool for a solo hobbyist! Something like garage games or Unity might be more suited, and would remove alot of the work you need.

Another issue you will find if you do take this up is that C# isn't the fastest language for handling network connections. Network theory itself is quite complicated, but the benefit C# gives you is that it will give you alot of Send and Receive functions for the System.Net and Socket namespaces, which are a godsend if you are starting out fresh on connections. It also seems to handle asyncronous connection activity fairly well, I've managed to make a small multiplayer application and server before using it with little trouble. Although as I said, C# isnt the fastest for networking, the fact you are looking for a 'MMORPG tutorial' makes me think that you are fairly new to this all; sacrifice the power and take the utility, it will help you much more in the long run and will increase the likelihood of you finishing the project.

But the biggest pain in the ---- for making any multiplayer game will be cheat prevention, especially on c# which could be vulnerable to memory hacking as C# doesn't really have anything on the level of prevention* of packet sniffing, packet fiddling, address editing tools like ArtMoney etc. But if you try to tackle this problem aswell, you wont get anywhere, so for now assume your game is for you and a few friends, that you can all trust and that cheating wont be an issue. Worry about it when it happens, its a hobby project.

But that said, if you still feel up for the challenge, go for it! I would recommend you hang around a project like dawn of light to pick up the network experience you need - skip all the custom npcs and scripting and grab it right by the gut in its inner depths. Look at how the innards, ask on the support forums if you get stuck and ill be glad to help (as it wouldn't really be relevant here).

Save yourself a world of pain and do the game 2d, at least until you get the basics of client and server architecture under your thumb. And you'll probably end up binning your first attempt at making a network game, because like with alot of code you will learn things fast as you go, and youll look back in a month or so and think 'damn, I really had no clue'.

Thanks for reading,
Dinberg!

*: read "To my knowledge." If someone knows of a way, I'd LOVE to hear it!

Dinberg's picture

PS Fiddler, I'd love to see an OpenTK magic carpet remake ^^