Poll: Is it any good?
You do not have permission to vote in this poll.
Yeah
62.50%
15 62.50%
No
8.33%
2 8.33%
A little
29.17%
7 29.17%
Total 24 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Socket for Movement - Completed
#26
William Wrote:You changed your opinion fast xD

When I talked to bhenur about this, he told me it wasn't really neccessary to add this for more than movement.

Another thing that would be great though would be to add a new socket for the chat, and setup a 2nd server for that. Even better would be to set that chat server at your friends house if you dont have a good connection.

I didn't read your tutorial, I was going off of what other's were saying. So I didn't know you had two subs for that. Anyways..

I've added other things, and would prolly benefit from adding more than just one more socket. We'll see, I'll test it out later.
Reply
#27
Yeah, if you don't have byte packets. I strongly suggest that you add enum for the packet names, if you don't know how it works just contact me, it's really easy.
Reply
#28
William Wrote:Yeah, if you don't have byte packets. I strongly suggest that you add enum for the packet names, if you don't know how it works just contact me, it's really easy.

Yeah, I dunno what you're talking about. Lol.

I don't have byte packets yet, Verrigan is possed to start it so I can finish it soon, but as busy as he is, he rarely gets a day off to help with the game.

I might contact you about it, but not right now. Finishing up a feature for the game today hopefully.
Reply
#29
Actually I could just throw together a tutorial for it.
Reply
#30
William Wrote:Actually I could just throw together a tutorial for it.

Go for it. More tuts, the better. ^_^
Reply
#31
If different subs can be ran at the same time each sending different packets simultaniously, this has huge implications and could very well be the answer to 'why are we running a 2d game with minimal stuffs but it am lagzorz ;
Reply
#32
It doesn't work like that though.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#33
It is possible, you just have to use threads. I'm not sure if it is possible with VB6.0(probly it is, but I never used it in VB6.0). I used it is C++, actualy I was working with this a few hours ago. I'm making a winsocket Class for C++, using C's winsock2.h. To handle all the connections from all the sockets the server may have, you need to use a thread just to keep listening to the port, and an other one for each connection you are online, listening to the packets they send to you. I think it can be done with VB6.0, just google it ^^
Reply
#34
I think the benefits massively outweigh the drawbacks.. untill you have a bug ;D
Reply
#35
I know this is an old thread but I am going to reply anyways to shed some light on this...

VB6 runs as a single thread. So everything has to wait on everything to complete before being processed. So there is no real benefit to this. 2 things cant happen at the same time currenting in MS current design.
Reply
#36
Actually, it is a bit more complicated than that. Although VB6 applications are single-threaded, this does not mean VB6 applications use one thread. A send operation is like a file write - you only need to know that it will be written, not that it is written. I am not saying this is how it is done - I am not sure exactly - but it would not be surprising if a Winsock send is completed upon not the data being sent but the data being written to the socket output buffer. In fact, it is likely this is the case, or close to it, since the socket will queue packets if Nagling is enabled without blocking the process until they are sent. The socket wont be able to be written to directly after you finish your last write, it still may have extra processing to do on the packet which could increase the block time on the next send if it is still in this "finalizing" state.

So using multiple sockets, you can basically get a very cheap, very poor usage of the system thread pool to output very minimal work to foreign threads. Though, theres probably next to no benefit of doing this when it can be all thrown into the same control since it just gives the OS the more work in the end unless the sockets are bound to different addresses or using different protocols.
Reply
#37
So, is it good or not. lol
Reply
#38
I highly doubt it. Only thing I could see helping is if you turned off Nagling just for the movement socket and left it on for the other, but then thats just a very lazy excuse for adding your own buffering system which I am pretty sure there is already a guide for.

Quote:For a practical example check out the plugin for Firefox called DownThemAll at http://www.downthemall.net/. This plugin accelerates your downloads by breaking files into 5 parts - each on different TCP connections.

For downloading from web servers, the limitation is often on the client-side. The server can dish out more, the client is just not requesting enough due to packet delays. With multiple packets coming at once, though, theres the ability for a lot more going in and out. Segmented downloading is quite heavily used to increase download rates. The difference between a game server and web server, though, is that a web server doesn't suffer from taking a bunch of excessive stress anywhere near as much as a game. A game that stalls for a few seconds often results in tons of people completely ****ed. A web server stalling just means a slightly longer loading time and no one really cares in the end.
Reply
#39
I Currently have this setup in my Genesis Source:

Socket 1. Main Data Socket (Loging into server ingame data & text) - No Buffer
Socket 2. Movement Data Socket (Player & NPC Movement) - With Player buffer & disabled Winsock nag
Socket 3. Admin Editor (Used for NPC Editor, Map Editor, Spell Editor Ect Ect) - No buffer

It's alot faster, i mean alot faster. Even when editing maps other players wont suffer the server lag when updating as it wont use the main socket. Same princible as Movement Socket. I am thinging about taking out the player buffer and adding it to the Main Socket as this is were is likly needed.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)