Jump to content
  • Advertisement
Sign in to follow this  
lordcorm

High traffic Game Server (C# vs C++ with Boost)

This topic is 3508 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For about the last week ive been going on a 'language/library/engine/framework' tryout spree to try to find the best framework for my Game Server. Currently, Its has come down to C# or C++ (with Boost). ----------------------------------------------------------------------- Looking at the Pros and Cons of a C# Server. Pros: - Faster Development Time - Easier to implement 'modular' support (Class Libraries) - Huge Integrated Framework (.NET 3.0) - Easier for n00bies to jump on Cons: - Slower Performance - Windows Only (Virtualizing with Mono is not ideal) ----------------------------------------------------------------------- Looking at the Pros and Cons of a C++ (with Boost) Server. Pros: - Performance (if programmed correctly) - Will work on any x86/x64 platform. Cons: - Slower development time. - Harder for n00bies to jump on. (Unless they are very skilled in C++) - Although Boost has alot of framework pieces already done, it still is missing some things I need. ------------------------------------------------------------------------- Ive been finding it really hard to make my decision.

Share this post


Link to post
Share on other sites
Advertisement
IMHO portability should be a major concern and I would thus vote for C++ and abstract the lower-level net code into some wrappers.

Share this post


Link to post
Share on other sites
First, as someone who has done high-performance distributed computing with Mono, I'm somewhat surprised about that "virtualization not ideal with Mono" claim, especially since the needs of a video game are probably not as complex or heavy as those of distributing computing grids.

Second, a game server is something huge, which involves a lot of parts that have no reason to be written in the same language. Some parts, such as the low-level UDP socket manipulation, may indeed deserve to be done in C++, but there's no reason to do the high-level work in C++ (especially since you will probably want to gain a lot of performance through multithreading, which C# supports far better than C++).

Share this post


Link to post
Share on other sites
Personally, my opinion for a smaller team size (i.e. < 10 developers) would be to go with whatever you'd be most productive in. For most people, that's going to be C# by a long margin...

Share this post


Link to post
Share on other sites
"game server" can mean a server for a poker site, or a server for an in-browser 2D game, or a serer for an MMO game, or a server for an FPS, or one of a number of different kinds of servers.

First, asnwer the question: What is your game? What requirements does it have?
Once you know that, you can whittle down the list of available technologies.

Share this post


Link to post
Share on other sites
Quote:
Original post by lordcorm
- Windows Only (Virtualizing with Mono is not ideal)


Sorry, but what? Mono doesn't virtualize anything, .NET/CLR code is assembled on a specific bytecode format, Jitted/AOT'ed later by the mono runtime or the .NET runtime.

Share this post


Link to post
Share on other sites
Quote:
Original post by ToohrVyk
Some parts, such as the low-level UDP socket manipulation, may indeed deserve to be done in C++

Que? The speed of the network is so much slower than the code interacting with the network that at no point in time would the network code be a bottleneck compared to your ability to transmit data, especially if you use IOCP (which C# sockets are inherently built to do when you use the asynchronous method calls such as BeginSend/EndSend).
Quote:
but there's no reason to do the high-level work in C++ (especially since you will probably want to gain a lot of performance through multithreading, which C# supports far better than C++).

So very true also there's the ease with which you can mix managed and unmanaged code, although there are plenty of performance penalties for doing such and so you should be extra sure to profile first before and after you attempt such intermixing...

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603

First, asnwer the question: What is your game? What requirements does it have?
Once you know that, you can whittle down the list of available technologies.


Its actually an MMO Emulator, so i dont expect to have as much traffic as a live commercial server.

The most i expect on a server at the time is 2,000 (and thats not on one zone, but one cluster.)

Share this post


Link to post
Share on other sites
How will you reach 2,000 players and have them all play your emulator all at the same time?

Anyway, there was an Ultima server emulator written in .NET a few years back, and I think it did 2,000 users in pure .NET.

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
How will you reach 2,000 players and have them all play your emulator all at the same time?


The game im emulating used to be huge, and there are several server communities waiting for a server to be done (there are actually several other teams working on the same game, but not doing too well of a job) that have around 5,000 members on their forums (but only around 500 - 1,500 are active atm).

But yea, ill look into those servers then and see what they did for load distro and session handling then, because im fairly new to C#, but a 2 year veteran of using C++. (which both of the languages are very similar so its not really a problem of learning syntax, just where everything is in the .NET framework, because i never used managed C++.)

Anyway, thanks for the help guys.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!