irrNetLite 2.1 [BETA]

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Ion Dune
Posts: 453
Joined: Mon Nov 12, 2007 8:29 pm
Location: California, USA
Contact:

Post by Ion Dune »

Thanks for your explanation. I'm still having a bit of trouble, but I can see now its not related to IrrNetLite. My project is a 2D physics simulation run on the host which updates the clients of any changes. I can't combine the two packets which are causing me problems, though. The packet sent from OnConnect(...) describe all of the entities on the host computer to the client so that they can be recreated by the client. The next packets aren't always sent right away, they are just updates of the positions/states of entities on the host. So the problem only occurs when a client connects right when a change occurs with an entity on the host, and it receives information about entities which don't exist in its memory yet.

However, based on what you have said, it appears it is a problem related to my implementation, as it seems impossible that the network is messing up the order seeing as these are the first packets received by the client and the problem occurs even when the host has just started sending packets (so I don't think it's an issue of overflowing the buffers). Unless, is it possible that packets can be sent to a client from a host before OnConnect(...) is called by that host?

Either way, I'm going to adjust my network system so that it just ignores packets relating to entities that don't exist yet, as in the long run they are pretty much irrelevant.

Thanks again for the help!
dipi
Posts: 10
Joined: Tue Feb 26, 2008 6:16 pm

Post by dipi »

I made a dll file from irrnetlite.
It compiles without problems.
Now I had made an smal multiplayer game. I compiled it on vc++ as debug, then everythings works but when I compile it as release it can connect to the server
error sending outgoing packets: no error
irrnetlite: error: connection time out.connection failed
When I compile it as release it gives 3 warnings:
c:\users\marijn\documents\visual studio 2008\projects\ping pong\irrini\source\irrini\cirrinistub.cpp(454) : warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
c:\users\marijn\documents\visual studio 2008\projects\ping pong\irrini\source\irrini\cirrinistub.cpp(447) : warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
c:\users\marijn\documents\visual studio 2008\projects\ping pong\irrini\source\irrini\cirrinistub.cpp(435) : warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
do someone know the solution for this problem??
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

The compile warnings are unrelated.

The connection error is probably because of a firewall.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
dipi
Posts: 10
Joined: Tue Feb 26, 2008 6:16 pm

Post by dipi »

problem found.

Irrini gives a wrong value when compiled as release -> strange.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

What is irrini? This is irrNet. Does that mean you fixed the connection problem? For future reference, what was the cause?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
crosel
Posts: 11
Joined: Fri May 29, 2009 6:53 am

Post by crosel »

Hey,

Im trying to build the tutorial and im getting some weird linking error:

Code: Select all

1>irrNetLite.lib(CNetManager.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Vector_val<struct irr::net::CNetManager::SPeerData *,class std::allocator<struct irr::net::CNetManager::SPeerData *> >::~_Vector_val<struct irr::net::CNetManager::SPeerData *,class std::allocator<struct irr::net::CNetManager::SPeerData *> >(void)" (??1?$_Vector_val@PAUSPeerData@CNetManager@net@irr@@V?$allocator@PAUSPeerData@CNetManager@net@irr@@@std@@@std@@QAE@XZ)
1>irrNetLite.lib(CNetManager.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) referenced in function "protected: void __thiscall std::vector<struct irr::net::CNetManager::SPeerData *,class std::allocator<struct irr::net::CNetManager::SPeerData *> >::_Tidy(void)" (?_Tidy@?$vector@PAUSPeerData@CNetManager@net@irr@@V?$allocator@PAUSPeerData@CNetManager@net@irr@@@std@@@std@@IAEXXZ)
1>irrNetLite.lib(CNetManager.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Vector_val<struct irr::net::CNetManager::SPeerData *,class std::allocator<struct irr::net::CNetManager::SPeerData *> >::_Vector_val<struct irr::net::CNetManager::SPeerData *,class std::allocator<struct irr::net::CNetManager::SPeerData *> >(class std::allocator<struct irr::net::CNetManager::SPeerData *>)" (??0?$_Vector_val@PAUSPeerData@CNetManager@net@irr@@V?$allocator@PAUSPeerData@CNetManager@net@irr@@@std@@@std@@IAE@V?$allocator@PAUSPeerData@CNetManager@net@irr@@@1@@Z)
1>C:\Users\Cal\Desktop\Server\Debug\Server.exe : fatal error LNK1120: 3 unresolved externals

Any idea whats going? Do i need to download enet or something?

I tried using the precompiled headers that u provided, but then it triggers a breakpoint in crtlib.c :S

I think its something to do with the MSVCr90.dll?
crosel
Posts: 11
Joined: Fri May 29, 2009 6:53 am

Post by crosel »

Never mind me,

I downloaded the latest version of eNet and linked and seems all good now :)
Tannz0rz
Posts: 35
Joined: Fri May 08, 2009 12:25 am
Location: Orlando FL, USA

Post by Tannz0rz »

Got this error:

Code: Select all

error C2259: 'ServerNetCallback' : cannot instantiate abstract class
1>        due to following members:
1>        'void irr::net::INetCallback::handlePacket(irr::net::SInPacket &)' : is abstract
1>        c:\program files\microsoft visual studio 9.0\vc\include\inetmanager.h(84) : see declaration of 'irr::net::INetCallback::handlePacket'
|
v

Code: Select all

net::INetManager* netServerManager = net::createIrrNetServer(0);
		ServerNetCallback* serverCallback = new ServerNetCallback(netServerManager);
Took it directly from Example 2.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Learn C++ before using this wrapper please!

That error means that you did not override the pure virtual function "handlePacket" in your inherited class.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
pankajnagarkoti86
Posts: 2
Joined: Mon Oct 12, 2009 8:02 pm
Contact:

Post by pankajnagarkoti86 »

IMHO the name is a bit wrong, should be : enetUtils, enetPacketBuilder
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

pankajnagarkoti86 wrote:IMHO the name is a bit wrong, should be : enetUtils, enetPacketBuilder
Wtf, this seems to be a bot that copies something that someone already said in the thread.

See:
stef_ wrote:IMHO the name is a bit wrong, should be : enetUtils, enetPacketBuilder.

A wrapper should add something a bit more consistent, otherwise I prefer to use
enet directly :)

Bye
Pretty interesting marketing strategy. :P
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

I cant seem to get it to work with 1.6 irrlicht (when i include the header and run in client mode it crashes)

its all because of irrArray.h it has been changed

but i dunno what to do
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Download the new Beta version (2.1) from here: http://irrlichtirc.g0dsoft.com/BlindSid ... .1Beta.zip

Now if you want to compile with Irrlicht you can define "COMPILE_WITH_IRRLICHT" and it will use the Irrlicht librarys instead.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

is there any function to show latency???
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Yes clients can do "netManager->getPing()" to get the latency to the server.

Does that mean your previous error was fixed?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply