Old 05-28-2006, 02:30 AM   #1 (permalink)
Orc's Breathmint
 
Join Date: May 2006
Location: In the annex of creation...
Posts: 113
Reputation: 10
Send a message via MSN to MisterPoppet Send a message via Yahoo to MisterPoppet
Default Network Programming Questions

Hey, this is for anyone with network programming experience.

Okay, I know that programming network code is a really big thing, but how big are we talking. Is it so big that the need for it would require an entirely separate programmer, or could the person who is working on a game server type of program be able to do it (I'm talking about 300-500 people max, if that)?

As I was working on my design doc, I decided to do a little study on the networking side of things. All the articles act like that it's so ungodly hard that you need a man hooked up to a super computer to do it right. Granted they didn't actually say that, but it seems like they were hinting at that level of difficulty.

Now mind you I understand the fact that it is hard, but would a one person programmer be able to code a game server with the networking stuff and a scripting interpreter for like quests and other content like stuff? Or, could it be that i'm just over thinking this and the networking code is the bulk of the server code?

-Bryan-

P.S. What do you prefer, TCP or UDP? For me it's UDP because I just like to squeeze out that little bit of extra speed. Heh heh...
MisterPoppet is offline  
Old 05-28-2006, 04:46 AM   #2 (permalink)
Luigi’s Pizza
 
HopeDagger's Avatar
 
Join Date: May 2006
Location: Ontario, Canada
Posts: 119
Reputation: 10
Send a message via MSN to HopeDagger
Default

Quote:
Originally Posted by MisterPoppet
Okay, I know that programming network code is a really big thing, but how big are we talking. Is it so big that the need for it would require an entirely separate programmer, or could the person who is working on a game server type of program be able to do it (I'm talking about 300-500 people max, if that)?
Depends on the project. For a game (RPG?) that is supposed to process 300-500 players at a time, the network can very easily grow to a complex level. Efficiency and scalability are absolutely paramount in large-scale online games.

Quote:
As I was working on my design doc, I decided to do a little study on the networking side of things. All the articles act like that it's so ungodly hard that you need a man hooked up to a super computer to do it right. Granted they didn't actually say that, but it seems like they were hinting at that level of difficulty.
I think "ungodly hard" is an exaggeration. Right now I'm writing Skirmish Online, and I've developed the network code by myself as well as all of the other game code without any massive problems. Granted I had tons of problems with networking along the way, but trial & error, along with getting advice from knowledgable network programmers (the folks on GD.NET's networking section are fantastic!) will help you get there.

Quote:
Now mind you I understand the fact that it is hard, but would a one person programmer be able to code a game server with the networking stuff and a scripting interpreter for like quests and other content like stuff? Or, could it be that i'm just over thinking this and the networking code is the bulk of the server code?
Definitely. It won't be easy by any means, but it's certainly doable.

Quote:
What do you prefer, TCP or UDP? For me it's UDP because I just like to squeeze out that little bit of extra speed. Heh heh...
Again, this depends on what sort of game it is. Turn-based games, slow-speed realtime games (RPGs), and RTS's tend to use TCP, while fast-paced action games (Quake 3, Counterstrike, etc) usually use UDP.
__________________
Gauntlets of Recursion (+5) - My game development journal.
HopeDagger is offline  
Old 05-28-2006, 01:41 PM   #3 (permalink)
Cloud's Hair Spray
 
Join Date: May 2006
Posts: 63
Reputation: 10
Default

I wouldnt say that creating network code is too hard, I havent tested mine yet under extreme conditions with like 500 people connected, but that time is almost here =).

I basically have (client side) 3 threads for my MMORPG. One in , one out thread, one graphics and sound thread, one client side predictions thread.


all messages have a Start Character (one for server one for client) so the other end knows its a real message, then a message ID, then a Message Length. I send binary messages to save some space, so I have to use length to find the end of the message in the stream of characters.

The In and Out threads do there job like this.

Out has a que of messages, Message packager classes take what the client needs to send to the server puts it into a string with minimal compression (like using characters for numbers 1-255) and attaches it to the out threads send que.

In thread has a list of message handler classes with their message's ID it reads the first couple characters to fill the header, finds the length, reads the rest, and passes it to the appropriate Message Handler class to be parsed and use on the client side database moving people's characters or changing the clients character in some way.

The Graphics thread runs in a circle just rendering what the client database has. The client side predictions thread handles moving characters client side along their know paths to hide the latency.

This whole process allows me to simply create a new class for a message and not have to edit the actual network code! But its also for an RPG...

PS. I use TCP
__________________
Legends of Alterion - Under Development

toast lands butter down, cats land on their feet, what happens when u strap toast to a cat?.....
Math indicates they will hover in quatom indecision...(yet to be tested)

Last edited by Tocs1001; 05-28-2006 at 01:43 PM.
Tocs1001 is offline  
Old 05-28-2006, 04:03 PM   #4 (permalink)
Orc's Breathmint
 
Join Date: May 2006
Location: In the annex of creation...
Posts: 113
Reputation: 10
Send a message via MSN to MisterPoppet Send a message via Yahoo to MisterPoppet
Default

Cool. Thanks, all! This is a big step in the right direction for me.

-Bryan-
MisterPoppet is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:24 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0
OnRPG, Copyright ©2003-2011, Game Entertainment Enterprises