IrrNet - Irrlicht Network Framework 0.36 (Now Windows/Linux)
...
BlindSide, before you add anymore features you need to write documentation. Not only on existing features, but planned features, design principals, and data structures as well.
Core2Duo E8400 3.0ghz - 2048mb DDR2 800 - geForce 9600 - Slackware12.1
Word-image-symbol programming limits, controls, and imprisons the individual.
Smash the control images, smash the control machine.
Word-image-symbol programming limits, controls, and imprisons the individual.
Smash the control images, smash the control machine.
Hey xhrit
Haha your the guy with the eyeball, ive seen that thing around
Anyway your right about all that. I think Ive managed to squeeze some of the overall picture in the individual function documentation, but it does lack an actual overall design thing like you said. Ill get that done sometime...
Haha your the guy with the eyeball, ive seen that thing around
Anyway your right about all that. I think Ive managed to squeeze some of the overall picture in the individual function documentation, but it does lack an actual overall design thing like you said. Ill get that done sometime...
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact:
http://www.ultimate-ownage.com/irrNet.zip
It's the newest version of IrrNet with an IrrNet.A and a bit of modified source code to work with Dev-Cpp in case anyone was having problems.
It's the newest version of IrrNet with an IrrNet.A and a bit of modified source code to work with Dev-Cpp in case anyone was having problems.
(question edited)
is the a precompiled .lib (for msvc)?
greets,
halan
is the a precompiled .lib (for msvc)?
greets,
halan
My Blog: http://www.freakybytes.org
if you tell me where i can find the enet sdk i can
edit: okay compiled it but ive still one question. is this code causing memory leaks?
greets,
halan
edit: okay compiled it but ive still one question. is this code causing memory leaks?
Code: Select all
//Setup the Network Stuff
netmgr->setUpClient();
if(!netmgr->getEstablished())
{
isServer = true;
netmgr->setUpServer();
}
halan
My Blog: http://www.freakybytes.org
Hey there,
@Midnight, what IDE are you using? Try the custom linux version as it works for stuff like Dev-C++. If you mean everything is working but you cannot handle your own "char" packets, I think the custom packet handler supports standard string input, Ill have to double check. Look at the API documentation for more info about setting up a custom packet handler.
@Halan, ONLY set up client OR server. Not both. A server is already a client that hosts for all the other clients too, so you dont need to set up a client seperately. Cheers.
Please look at examples for suggestions thanks.
Also "getEstablished" will not be true until a few frames later. Because it requires several connection packets to be exchanged. Testing it right away will almost always yeild false. (Also "getEstablished" is only useful for clients, a server is technically always "established" (Or maybe established is true for server when the first client connects, Ill have to check this too))
About the precompiled lib, you most likely don't need one. Just add the enet files and irrNet files to your project, make sure all the headers are in your include path, and define WIN32 (or UNIX) in your precompiler definitions. This is all explained in the docs if you need more info.
Cheers guys, keep the questions comin im happy to help anyone out as much as they need.
- BSide
@Midnight, what IDE are you using? Try the custom linux version as it works for stuff like Dev-C++. If you mean everything is working but you cannot handle your own "char" packets, I think the custom packet handler supports standard string input, Ill have to double check. Look at the API documentation for more info about setting up a custom packet handler.
@Halan, ONLY set up client OR server. Not both. A server is already a client that hosts for all the other clients too, so you dont need to set up a client seperately. Cheers.
Please look at examples for suggestions thanks.
Also "getEstablished" will not be true until a few frames later. Because it requires several connection packets to be exchanged. Testing it right away will almost always yeild false. (Also "getEstablished" is only useful for clients, a server is technically always "established" (Or maybe established is true for server when the first client connects, Ill have to check this too))
About the precompiled lib, you most likely don't need one. Just add the enet files and irrNet files to your project, make sure all the headers are in your include path, and define WIN32 (or UNIX) in your precompiler definitions. This is all explained in the docs if you need more info.
Cheers guys, keep the questions comin im happy to help anyone out as much as they need.
- BSide
well thing is i want to make a client and check if a game is allready running if not i want to make the client server...
greets,
halan
greets,
halan
My Blog: http://www.freakybytes.org
only way is to feed it a single ip thats intended to be server and they have to run it first to ensure that a connection is made otherwise a server is setup instead.Halan wrote:well thing is i want to make a client and check if a game is allready running if not i want to make the client server...
greets,
halan
EDIT: after further testing this code I realised that the client doesn't initialize properly.. figuare it out from here if ya want.
anyways here is how...
change...
// Comment/Uncomment this to define if this is a client or server.
#define CLIENT
to...
Code: Select all
bool isServer = false;
Code: Select all
netmgr->setUpClient();
if(!netmgr->getEstablished())
{
netmgr->setUpServer();
isServer = true;
}
Code: Select all
if(isServer)
{
netmgr->updateClient();
}
else
{
netmgr->updateServer();
}
edit whoa I just wrote yer code without knowing it lol
great minds think alike i suppose.
BTW I tested this while monitoring my ram IDK if that constitutes as a memory leak test but it seemed to work perfectly to me.
Ok then I recommend using a different instance of netmgr, using the same one as a client AND server is not recommended. Make a client, wait a few seconds for it then check if its established. If its not then delete that netmgr and make a new one with a server.Halan wrote:well thing is i want to make a client and check if a game is allready running if not i want to make the client server...
greets,
halan
@MidNight, yeah changing it to a bool would be ok, but like I said you need a new netmgr for the server. I originally used bools but I figured a DEFINE would look cleaner and also use less resources while running. But for his purpose its required.
actually it makes the server fine.
only reason for a bool is the "if statement"
problem is it won't make a client... maybe cause I didn't wait long enough for it to connect.
personally I'm working on two thing with irrnet atm
first a chat system which with the only function an "char" and all of irrlicht being designed using "wchar_t" I'm having one hell of a time making that possible so I suggest you remedy that for me.
and next I'm working on a server that doesn't actually render... a dedicated server model to increase efficiancy and reduce load on a dedicated server system... same thing as dedicated game servers I just want a renderless server to track and only clients to connect I feel it's a better overall server client model.. more fair considering a server is the only person with direct control of the updated statistics...
a good example would be like the reason a gas station attendent can not buy lottery tickets from his own store. difference being its the lag that kills you here and not the mob.
only reason for a bool is the "if statement"
problem is it won't make a client... maybe cause I didn't wait long enough for it to connect.
personally I'm working on two thing with irrnet atm
first a chat system which with the only function an "char" and all of irrlicht being designed using "wchar_t" I'm having one hell of a time making that possible so I suggest you remedy that for me.
and next I'm working on a server that doesn't actually render... a dedicated server model to increase efficiancy and reduce load on a dedicated server system... same thing as dedicated game servers I just want a renderless server to track and only clients to connect I feel it's a better overall server client model.. more fair considering a server is the only person with direct control of the updated statistics...
a good example would be like the reason a gas station attendent can not buy lottery tickets from his own store. difference being its the lag that kills you here and not the mob.
it would be cool if some kind of lan broadcast were implented andd so you dont have to know the ip of the server
My Blog: http://www.freakybytes.org
Thats true, I will look into making a lan broadcast...
@Midnight, im sure using a (wchat_t*) typecast would work in most cases. Also sticking an "L" just before pushing a paremeter works eg. message(L"My char value"); So im gessing message(L(mychararray[100])); should work too..but probably not
About the dedicated server, this *could* possibly be used using that new feature with the X11 independant rendering. For windows maybe a null device works? Or for a really hacky option a software driver with a 1x1 display area lol... A chat program is the easiest thing to make using a network lib, look into the Enet api maybe that will help, probably not though because all network packets are actually char arrays, this is because a char is not just a list of characters, but actually a general block of memory. If typecasting doesnt work ill look into implementing wchar sending...
I recommend just not displaying anything manually somehow and using the irrlicht window to display stats/output info about the server.
@Midnight, im sure using a (wchat_t*) typecast would work in most cases. Also sticking an "L" just before pushing a paremeter works eg. message(L"My char value"); So im gessing message(L(mychararray[100])); should work too..but probably not
About the dedicated server, this *could* possibly be used using that new feature with the X11 independant rendering. For windows maybe a null device works? Or for a really hacky option a software driver with a 1x1 display area lol... A chat program is the easiest thing to make using a network lib, look into the Enet api maybe that will help, probably not though because all network packets are actually char arrays, this is because a char is not just a list of characters, but actually a general block of memory. If typecasting doesnt work ill look into implementing wchar sending...
I recommend just not displaying anything manually somehow and using the irrlicht window to display stats/output info about the server.