networking engine
networking engine
Hello,
I want to create a simple MP game. The goal is that you and another person can run in a world around and u see the other.
I tried it with winsock but its not so good for it. Do know a good networking engine?
Cheers
I want to create a simple MP game. The goal is that you and another person can run in a world around and u see the other.
I tried it with winsock but its not so good for it. Do know a good networking engine?
Cheers
You know about the Search function?
winsock is absolutly perfect for it
However using a highlevel eingine like RakNet would be simpler.
I never tried myself but IrrNet does already integrate network with irrlicht. Maybe you should give it a try.
winsock is absolutly perfect for it
However using a highlevel eingine like RakNet would be simpler.
I never tried myself but IrrNet does already integrate network with irrlicht. Maybe you should give it a try.
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
you should know the theory behind networking before implementing it.
recv() is a blocking function. You can either use threads or use non-blocking functions. All this should be covered in tutorials about socket programming.
recv() is a blocking function. You can either use threads or use non-blocking functions. All this should be covered in tutorials about socket programming.
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Check out irrNetLite V2.
Some comments from users:
Some comments from users:
ya that was what i looking for !!!
the status is irrNetLite2beta but its fn amazing stuff. thanks to BlindSide yet again
I had been trying to compile this for about 15h, what a relief!
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Thanks , but the problem is that i can't use OOP things. It needs to be procedural. Its a school project and it musn't instance classes. This is why i need a simple non-blocking socket.
edit://
Got it ^_^
iMode '0'= blocking mode, '!=' = nonblocking mode
edit://
Got it ^_^
Code: Select all
u_long iMode = 1;
ioctlsocket(connectedSocket, FIONBIO, &iMode);
rc=recv(connectedSocket,buf,256,0);
cout << buf << endl;
Well here some problems you have to concern with:
-there is no guarantee that you will recieve the complete packet at once
-with blocking your client can block if the other side does not call recv and you try to send a datas whichs fills your sendbuffer up
-with nonblocking the datas can not be sent in this case
-you have a delay with network
-you have to care about concurrence of actions (time and place)
-there is no guarantee that you will recieve the complete packet at once
-with blocking your client can block if the other side does not call recv and you try to send a datas whichs fills your sendbuffer up
-with nonblocking the datas can not be sent in this case
-you have a delay with network
-you have to care about concurrence of actions (time and place)
Forget Winsock. Why reinvent the wheel (except for learning purposes)?
I used my own socket class for almost 6 years. But this time I used BlindSides IrrNetLite, because it builds the packets for me and handles player (dis-)connects etc. and I can only recommend it.
However, it will remain a very tough task.
Especially interpolation makes me sick!
I used my own socket class for almost 6 years. But this time I used BlindSides IrrNetLite, because it builds the packets for me and handles player (dis-)connects etc. and I can only recommend it.
However, it will remain a very tough task.
Especially interpolation makes me sick!
Generated Documentation for BlindSide's irrNetLite.
"When I heard birds chirping, I knew I didn't have much time left before my mind would go." - clinko
"When I heard birds chirping, I knew I didn't have much time left before my mind would go." - clinko