vbGore Free Online RPG Engine

Revolutionizing Visual Basic ORPG Development
It is currently Thu May 23, 2013 10:18 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: .NET Stuffs
PostPosted: Wed Mar 14, 2007 12:12 pm 
Newbie

Joined: Mon Feb 26, 2007 6:50 am
Posts: 5
So yeah, I've been working for a little while now on a sort of side project away from my other endeavors that involves C#. I am not fully sure how I want to execute the graphical portion of the client/server setup, but I do know that making sure the network is absolute is going to be key in order for it to turn out well. I already have a base system set up using asynchronous socket communication from client to server, but I need some guidance on the ideals of keeping packets small whilst including encryption and what not. It is very hard to find good tutorials for .NET sockets, so most of the code has been made from scratch. Any good advice on how to keep packets small? I want to make sure that this engine is network oriented to the last.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 12:22 pm 
Arithmophobia

Joined: Wed Sep 20, 2006 4:00 pm
Posts: 335
this is visual basic 6.0 not .net

differnt language, try another forum


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 1:17 pm 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
zidsal wrote:
this is visual basic 6.0 not .net

differnt language, try another forum


Can't blame him for asking - even though this engine is VB, doesn't mean everyone only knows VB. A lot of us are programmers. :wink:

I haven't ever used C#, so I can't help you there. Though packet conservation is right up my ally. If you donate or participate in the form skin graphic design thing in the announcements, you can get a copy of the ORPG Design / Theory article, which is heavily aimed towards packets, and encrypting them. If not, I can try and help you out a bit. Do you know what packets headers are? How large the headers are? How to buffer packets? Prioritize packet buffers? Create binary packets? Use bit-wise operators and bit flags? These are all part of vbGORE, though with how much vbGORE has in it, could be very hard to find what you want, so just tell me what you need help with and I can give it a try. [promotion] Though, the article you get for donating would probably be much more helpful since it contains many days worth of writing of text on exactly what your looking for. [/promotion] :P


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 1:20 pm 
Newbie

Joined: Mon Feb 26, 2007 6:50 am
Posts: 5
I know what forum this is and I wasn't asking a language based question... I was asking about general algorithms, best practices, etc... that could help me out. BTW, isn't this an off topic forum?

Spodi: I do not quite understand how packet headers and prioritization works exactly. I just know that I send it and it works for now, lol. As a disclaimer I am from the ORE generation of network programming, that by itself should say it all.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 1:41 pm 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
Zeriku wrote:
As a disclaimer I am from the ORE generation of network programming, that by itself should say it all.


Eep! :P

I'll try to give you a quick run-through right now.

Headers: Every packet has a header that is added onto it to tell the networks it passes through where it is going. For TCP, that is 20 bytes. For UDP, 8, and for IPv4 (currently only IP used internet wise, will eventually be upgraded to IPv6 which is 40 bytes), 20. IPv4 is required for both TCP and UDP, so a TCP protocol requires 40 bytes per packet, UDP 28. This is for every packet sent to the client from server, or vise versa. This does not mean every time you use .SendData, though, since the Nagle Algorithm is often in play by default (won't go over that right now).

Packet buffering: The practice of combining packets together and sending them all at once. Combined with packet prioritizing (not sure how professional engines do this, but the method in vbGORE is the best I could come up with and it works great), you can hold packets for X amount of milliseconds before sending it to reduce header overhead, which means less CPU usage and bandwidth. You have to be careful, though, since holding it too long is going to cause quite a bit of delays, otherwise known as "lag".

Everything is covered in much more detail, along with more stuff, in the article. :P


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group