Programming Game Servers

Started by
3 comments, last by Neurotic 23 years, 7 months ago
Heya all, Just a wondering thought. Coming from a Java background, I''ve done my fair share of client/server applications, and am also looking at transferring a board game into Java based, multiplayer net game. I was curious what language people where programming their game servers in, and why they were useing it? ... wonder if you could use java servlets... woah.. weird thought... But I am also guessing that this another area where milliseconds really count, and using C++ would be the default for speed reasons? Just curious Mark
<< ...and here is one we developed earlier... >>
Advertisement
In general CPU time is not a large issue with servers, and bandwidth efficiency is commonly more of a problem. This is because an obscenely powerful computer only costs around $3000 or so, whereas an obscenely fast Internet connection will burn you a good $50,000 per *month*.

I use C, because I am not paying for the connection anyway, or the computer that is hosting the game as a matter of fact, and so I want it to use as little CPU and bandwidth as possible.
I program in C/C++ and use WinSock for all the basic apps, i have yet to move on to something more complex. But if you want to learn WinSock, it''s a pain cause a lot of books are out of print and i had a lot of trouble finding goos articles about it.

==============================
"You don''t know the power of the Dark Side..."

- Darth Vader, Episode VI
==============================

Drew Sikora
Executive Producer
GameDev.net

Our game servers have, so far, been written with ANSI C for Unix/Linux.

Performance is good, even on rather low-end server hardware (like old 400 MHz P2s, or lower). Since the server isn''t concerned with rendering 3D images, or even moving 2D images around, or queueing up sound and music (that''s all located on the client), the server generally has a lot of free CPU cycles on its hands.



DavidRM
Samu Games
Actually, I think java would work just fine for something like that. With a board game, most of the server''s time is spent waiting for the player''s next move to come in. Performance on a board game would be no issue.

Bandwidth in Java is no different from bandwidth in any other language... It all depends on the data you send across the network. With a board game, once again, that is relatively tiny... Board state updates every time someone moves, and possibly some chat relay. Both of those are insignificant as far as the bandwidth they need.

If you are most comfortable with network programming in java, stick with it. Neither bandwidth nor CPU time are significantly different for that sort of thing.

This topic is closed to new replies.

Advertisement