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.
pkuzmenko's picture

I was head of server department last 3 years for http://twinity.com

Inertia's picture

This is interesting, so you're suggesting to use Erlang for the server due to scalability? I imagine it must be pretty hard to get the packing/unpacking of data for the network protocol right with 2 different languages.

pkuzmenko's picture

My advice is - use existing protocol - for example SIP to connect server and client. You can find implementation for both Erlang and C#

http://en.wikipedia.org/wiki/Session_Initiation_Protocol

Erlang: YXA http://www.stacken.kth.se/project/yxa/
C# http://www.independentsoft.com/sip/index.html

And one more the best way to use Erlang is use Erlang OTP framework http://erlang.org/doc/design_principles/part_frame.html

OTP is profesional tool. It quite complex buy it'll save A LOT of time for debugging and deployment in future.

pkuzmenko's picture

scalability - OTP + Mnesia it's the most scaleably solution which I ever seen, but you have to design you server object properly (using pool for nodes etc...)

Kamujin's picture

I understand that Erlang is great for simplifying concurrency, but the performance is not that great.

http://shootout.alioth.debian.org/u32q/benchmark.php?test=all&lang=hipe&...

http://shootout.alioth.debian.org/u32q/benchmark.php?test=all&lang=hipe&...

For the second link remember that the Microsoft.NET runtime is often much faster than mono's in my experience.

pkuzmenko's picture

Check that please http://www.sics.se/~joe/apachevsyaws.html

Main benifit of using Erlang is not perfomance of operarator ++ or string operation - it's 10000> threads per CPU, light process only 10 k byte, for normal CPU u can run ONLY 1000 threads and where a lot problems which syncronization which will require more 1000 core objects(mutex...)

pkuzmenko's picture

For perfomance u can esealy create C++ module for erlang. more when half routers from whole world use Erlang from Erricson as framework for communication layer - it's fastest platform for multithreading programming

Kamujin's picture

With all due respect, I earn my living writing low latency highly concurrent trading applications that my firm uses for it's own trading. I disagree with your previous statement.

Not all multi-threaded programming problems are the same. Languages go in and out of favor. Having done this for many years, I find that there is no one perfect language. What has worked for me is trying to be aware of the strengths of many languages and trying to bring the best aspects of those languages to whatever language I was using.

pkuzmenko's picture

I belive that every server program faced the same problems each time, and I belive that a lot very smart programmers try to solve the same problems in own manier and in different way. But the patterns which they are using is the same and actuacly they try to do the same ideas by scratch using C++ C#, Java, .....

So main idea, is to check if a language has build in functionality like

1. Transperent Nodes (Cpu) "you don't care where are the called process is spawned (CPU/Computer)" - C++ , C#, Java ?? . To make only that a programmer has to spend a lot of time + fix bugs.

2. Fail tolerance in terms of Application - C++, C# , Java - no , in Erlang you have system (OTP) of supervising to keep your system run even after crash by reanimation the falen worker process.

3. Hot plug - you can change code without server shutdown.

4. Syntax which avoid the problems with cross process comunication - in Erlang you can do only one thing - send a message to process - it remove problem this sharing a resource + you have only stack valiables

All of that is main patterns of internal server structure, why I have to make it from zero on C++ or C#, etc.... if it already done in Erlang OTP ? ofcause I can, but result will be the same - so it's only your choice as programmer to choose the platform. I just show to you the tool which became popular now and incupsulate the ideas from last 10 years.

and few links more:
http://sunweaver.blogspot.com/
http://www.erlang-consulting.com/euc2005/mmog/mmog_in_erlang.htm
http://www.erlang-fr.org/articles/thierry_mallard_001-en.html

and you can find more in google
So it's up to you, I know how it hard to understend that you can do i faster when some stupid framework, but as soon you finish a project you'll start to understand that you just spend time for nothing because you did the same framework and sametime not better when that stupid framework. It's my expearence, I just share it with you.

objarni's picture

Erlang is Ericssons system language for cell phone "base stations". Ericsson has quite a good reputation in the base station market. I'll hazard it's quite robust and fast.. Of course C/assembler will beat anything, but at what development price..?