IrrNet - Irrlicht Network Framework 0.36 (Now Windows/Linux)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
troll
Posts: 4
Joined: Mon Feb 12, 2007 8:03 pm

Post by troll »

hi everybody :)

@BlindSide: i´m trying to compile your "example2" with Dev C++ but getting this error message:

main_net.cpp: In function `int main()':
main_net.cpp:172: error: no matching function for call to `irr::net::INetManager::addNetSceneNode(int, irr::core::vector3df, irr::core::vector3df, irr::core::vector3df)'
D:/project_x/irrlicht-1.2/include/NetManager.h:589: note: candidates are: irr::scene::IAnimatedMeshSceneNode* irr::net::INetManager::addNetSceneNode(irr::u16, irr::core::vector3df&, irr::core::vector3df&, irr::core::vector3df&)
main_net.cpp:182: error: no matching function for call to `CSceneNodeAnimator3PCamera::CSceneNodeAnimator3PCamera(irr::scene::ISceneManager*&, irr::gui::ICursorControl*&, irr::scene::IAnimatedMeshSceneNode*&, int, int, int, irr::core::vector3df)'
D:/project_x/irrlicht-1.2/include/Animators.h:18: note: candidates are: CSceneNodeAnimator3PCamera::CSceneNodeAnimator3PCamera(const CSceneNodeAnimator3PCamera&)
D:/project_x/irrlicht-1.2/include/Animators.h:44: note: CSceneNodeAnimator3PCamera::CSceneNodeAnimator3PCamera(irr::scene::ISceneManager*, irr::gui::ICursorControl*, irr::scene::ISceneNode*, irr::f32, irr::f32, irr::f32, irr::core::vector3df&, irr::f32, irr::f32, irr::f32, irr::f32, irr::f32, irr::f32, irr::f32)

make.exe: *** [main_net.o] Error 1

-----

i´m not a great programmer, so absolutely clueless ^^
can anybody give me a hint? :)
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

you have to add animators.cpp and .h to the project.

also the enet and irrnet includes aswell as the source.
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

so when are you gonna update this sucker with chat support blindside lol

im having a bitch of a time here.
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

You should do something about sending custom packets too :D

I can send the packet to the server but I don't know how to handle it once it gets to the server. Please post some code or something.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

@midnight, you can make a "stringw", and use mystring.c_str() to retrieve a char value. Then you can just do "mystring = char value" on the recieving end. Have a look at the irrlicht examples, the part where they set the window caption to display fps. They make a temporary char buffer and use it set the caption. I hope that is off some use. Aside from that i will look into adding something. Have a look at my new irrIRC project for a lil example about handling strings and stuff. (When i have time to post its source.)

@monkey, damn I thought you figured it out already. Well I will write something up. Have a look at the first example source code also for some good tips. Remember to disable default handling if your gonna use packet ids between 0-20 (Or not gonna use packet ids at all)...
troll
Posts: 4
Joined: Mon Feb 12, 2007 8:03 pm

Post by troll »

@midnight: thanks for your answer! everything was included as i got that error. with code::blocks the problem does not occur. must be some problem with dev c++, or better said: something i do wrong ;)
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

sorry troll I don't know how to fix it since I don't use dev++ its a piece of poop IMO because it requires code unlike any of the other IDE/compilers and the interface is far inferior to an IDE such as C::B or MSVC X05.

these days I use so many acronyms to describe the net stuff I do I wonder if anyone understands me AND gets laid in the same week.

@blindside... that IRC thing is awsome I can't wait for the source as I was planning on creating something like that myself for the game I'm working on.

also with a brief lesson since I sadly knew nothing about "char's" lol

I was able to discover the string.c_str() function.... however none of it seems to be working all I'm getting is blank packets and sometimes the odd integer as though my data was converted....

but something you mentioned there gives me an idea.



thing is though I thought the idea of this project was to make game networking and enet a snap to use providing chat, node, element networking functions in a nice little free box with a blue ribbon.

now I realise that this takes time and I see you have been busy with the irc thing which is awsome but doesn't a chat interface kinda fall in that catagory?

also you never answered the question someone asked about if the irc thing was built using irrnet.... personally I think all of this should be integrated and I know I'm certainly trying my best to include something to this project myself even though I'm not sure thats going to be possible.

phew... 8)
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Sadly, the IRC thing does not use irrNet or even Enet for that matter. It just uses plain TCP sockets, so I doubt it can be integrated that well. I will however, upon your request, look into integrating some chat stuff into irrNet. Cheers. (Maybe a 3rd example with chat is coming soon...ish :P...)
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

ok this is bullshit I'm starting to think its the packets themselves I'm not sending right... grr I'll just wait for the example thing before I burst a vessel on this thing. :evil:
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

Blindside I never seem to catch you on IRC anymore so I'll just ask here.


When do you think there will be an example for the custom packets and handling inpackets and such?

Also,
Is IrrNet UDP or TCP
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

irrnet isn't a network engine enet is.
irrnet is a ?wrapper? to use with irrlicht.

enet is UDP.

look at the time stamp once in awhile he just mentioned a demo a few hours ago.


well with a bit more debugging I figured out whats not working.. its strings..stringw stringc... stringw.c_str() seemingly returns nothing..
at least when I use it in a packet conversion..

also when I feed it a direct char and display it in console i see the data...also I see it's using packet id 8...wtf? then it prints 8 to my listbox...wtf??wtf??

ok wait.. why was wchar_t never implemented on a multilingual forum?
especially considering irrlicht is laced with the damn things.

well I'm gonna find where the flaw is damn it I'm not letting this redundent thing beat me.
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

I know that IrrNet is a wrapper for eNet which is a networking library. I was indirectly asking if eNet was UDP or TCP pretty much. But thanks for the answer midnight :D
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

ok I know whats wrong now .. sorta

I'm using the custom handler anyways...

I'm sending strings obviously char's and what not... now if I understand correctly when custom handling is used then the higher functions ergo "packet conversion" "sendautosomething" are disabled....

yet somehow it's printing out the char and then converting it using the packet id that corrosponds to the amount of letters in the string...

a 8 letter word = packetid 8 supposedly

I have no idea why this is happening I thought maybe I could change the packetid but can't seem to figuare out how thats done exactly.

and no matter what when I display the data (even though I can see it in console) it always shows an integer rather then charactors.

something is really not right here. guess now I'm grounded completely.
anyone else get it working at all??
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Midnight, I was just about to point out. You have to either use a c8 at the start of the packet as a packet id (But it must not be between 0-30 ish) OR manually disable default packet handling, using the irr::net::INetManager::setDefaultHandling function. Search for it in the documentation.

@monkey, Enet is practically a UDP implementation of TCP. Its Tcp's reliability and stuff but without the headaches that make it unsuitable for games (Yeah some games use it but its a headache!). Anyway, heres a short write up for the inpacket class:

(myinpacket = yourinpacket ...lol)

myinpacket->getNextItem(variablegoesinhere)

basically, if you use an int as the variable, then it will take out the correct amount of data for an int, and set the int as the value. eg.

Code: Select all


// Lets say I am recieving a packet that I added a c8 as a packet identifier, a vector as a position, and a float as an angle to.

// So i recieve the inpacket in my custom handler, and here I process it:


c8 packetid;
InPacket->getNextItem(packetid);

// Lets say packet id 2 means a position vector3df followed by an a float angle.
if(packetid == 2)
{

vector3df position;
InPacket->getNextItem(position);

f32 angle;
InPacket->getNextItem(angle);

// You may set the nodes position or rotation or whatever you want here...and thats it!

}
Hehe I kinda nicked that straight from the doco, but I couldn't find an easier way of explaining it really. I will however, do a proper working examples sometime, for sure.
troll
Posts: 4
Joined: Mon Feb 12, 2007 8:03 pm

Post by troll »

i don´t know why, but i´m getting strange error messages.
can you tell me which compilers / versions you use? i´m trying around for many hours but can´t get it to work. under dev c++ it can´t find the functions in the headers, c::b spits out other strange errors.
i just need a running compiler for IrrNet, cant wait to see another player jumping around in my level xD
Post Reply