there are hundreds of open source projects and demos out there....untill u add it I'll make them my self, but if you make one before me....all the Irrlicht uses would be greatful...maybe you'red get torque users as well
feature request: IrrSockets
feature request: IrrSockets
this game engine has everything, even AI from the forum...except Sockets....all we need is a TCP/IP and a UDP Socket and its the best on the market 
there are hundreds of open source projects and demos out there....untill u add it I'll make them my self, but if you make one before me....all the Irrlicht uses would be greatful...maybe you'red get torque users as well
there are hundreds of open source projects and demos out there....untill u add it I'll make them my self, but if you make one before me....all the Irrlicht uses would be greatful...maybe you'red get torque users as well
pushpork
-
Guest
well maybe I will...
for now I'll use a GPL one, but mark my word...YOU HAVEN'T SEEN THE LAST OF JPulham
(or his sockets he wont shut up about
) on a serious key I'll work on it with my mate...I'm trying to get a project done which is pretty large AND do my GCSE's at the moment 
pushpork
Sockets
Just sending streams of chars via a IStream or something. the indy project has a good set of sockets but it only works for Borland C++ builder
....which I dont use anymore for compatability issues. The stream should havea Read(void* buf,int size); method...I'll work on it... but see my last post
pushpork
the problem is, without a hell of a lot of work it will only be any good for turn based games.
Also, UDP would be better than TCP sockets, and then you might as well use Raknet and spend your time working on the hard stuff like (as Spintz mentioned in another post) dead reckoning, occlusion culling, LOD culling, etc etc rather than reinventing the wheel doing the easy stuff like opening connections and sending slow streams of characters back and forth.
It would be a shame to make a whole networking side project but it not be able to support anything but 2 player Tetris
Also, UDP would be better than TCP sockets, and then you might as well use Raknet and spend your time working on the hard stuff like (as Spintz mentioned in another post) dead reckoning, occlusion culling, LOD culling, etc etc rather than reinventing the wheel doing the easy stuff like opening connections and sending slow streams of characters back and forth.
It would be a shame to make a whole networking side project but it not be able to support anything but 2 player Tetris
i got it working
I had an OnRead() Method and just read off the right stuff, i.e, first 4 bytes = 1 float ect, and the first 12 bytes are the X, Y and Z pos, along with speed milliseconds and other params
pushpork
why not wrap NSPR (Netscape Portable Runtime in C) since its already cross-platform (used in Mozilla/Firefox/Thunderbird/Evolution), reasonable stable since ages (remember Netscape Navigator 2 ?) and comes with a nice multiple licence model (NPL/MPL/GPL/LGPL).
if you need security too, just put NSS (Network Security Services aka. SSL) on top.
if you need security too, just put NSS (Network Security Services aka. SSL) on top.
terefang
nVidia 7800GT/256, AMD64-X2 4k2, Latest Fedora/CentOS
nVidia 7800GT/256, AMD64-X2 4k2, Latest Fedora/CentOS
hard to make generic sockets truly work
trouble is, you need to stream different kinds of data for different kinds of games. also there are other more ethereal issues to consider. how to you handle object creation/destruction over a network, how to uniquely identify an instance of some networked object, how to send data like animation states or spell/attack/whatever actions without a lot of lag, who calculates the hits? client or server (server we hope)
sure most of the time we just want to synchronize maybe the position and orientation of things; and maybe with a basic cross-platform UDP driver you could make an Irrlicht Animator to do that. but even then you still have to consider the creation/destruction problems, and so forth.
This is something ive thought about a lot, but I still haven't come up with a really good way to provide something more useful that just basic socket functionality and make it generic enough of flexible enough that you wouldnt have to almost totally rewrite it for a different sort of game.
sure most of the time we just want to synchronize maybe the position and orientation of things; and maybe with a basic cross-platform UDP driver you could make an Irrlicht Animator to do that. but even then you still have to consider the creation/destruction problems, and so forth.
This is something ive thought about a lot, but I still haven't come up with a really good way to provide something more useful that just basic socket functionality and make it generic enough of flexible enough that you wouldnt have to almost totally rewrite it for a different sort of game.
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
almost...
I found some stuff...you could have an async socket handle in the WndProc that calls the user function... i.e.
I dont know what the wParam would hold...it might be something else.
the user can then create a class...like IEventReceiver is used and define OnRead() ect.
Code: Select all
#define IRR_SOCKET_MSG WM_USER + 100
...
class socket
{
public:
virtual bool OnRead(void* buf, int type); //just a simple idea
virtual bool OnWrite(void* buf, int type); //just a simple idea
};
...
//the WndProc
case IRR_SOCKET_MSG:
switch (WSAGETSELECTEVENT(lParam))
{
case FD_READ:
OnRead(HIWORD(wParam),LOWORD(wParam));
break;
case FD_WRITE:
OnWrite(HIWORD(wParam),LOWORD(wParam));
break;
case FD_CONNECT:
break;
case ...
break;
}
break;
the user can then create a class...like IEventReceiver is used and define OnRead() ect.
pushpork
I'm sorry bitplane but TCP/IP is perfectly good for very large scale real time games. A lot of really large mmorpg use tcp/ip, my day job is doing maintenance on a mmorpg that's purely tcp/ip based.
We're not doing any magic optimixation with TCP/IP, writting the generic socket class for the client took a whole hour. We're just pushing bytes in a stream and receiving them.
We're not doing any magic optimixation with TCP/IP, writting the generic socket class for the client took a whole hour. We're just pushing bytes in a stream and receiving them.
