Page 8 of 16

Posted: Mon Jun 15, 2009 6:45 am
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!

Posted: Thu Sep 03, 2009 6:07 pm
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??

Posted: Fri Sep 04, 2009 2:57 am
by BlindSide
The compile warnings are unrelated.

The connection error is probably because of a firewall.

Posted: Fri Sep 04, 2009 8:57 am
by dipi
problem found.

Irrini gives a wrong value when compiled as release -> strange.

Posted: Fri Sep 04, 2009 2:38 pm
by BlindSide
What is irrini? This is irrNet. Does that mean you fixed the connection problem? For future reference, what was the cause?

Posted: Sun Oct 04, 2009 2:53 am
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?

Posted: Sun Oct 04, 2009 3:07 am
by crosel
Never mind me,

I downloaded the latest version of eNet and linked and seems all good now :)

Posted: Sat Oct 10, 2009 5:45 pm
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.

Posted: Sun Oct 11, 2009 1:58 pm
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

Posted: Mon Oct 12, 2009 8:04 pm
by pankajnagarkoti86
IMHO the name is a bit wrong, should be : enetUtils, enetPacketBuilder

Posted: Mon Oct 12, 2009 8:58 pm
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

Posted: Tue Nov 03, 2009 9:59 pm
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

Posted: Wed Nov 04, 2009 12:16 am
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

Posted: Wed Nov 04, 2009 2:33 pm
by devsh
is there any function to show latency???

Posted: Thu Nov 05, 2009 12:30 am
by BlindSide
Yes clients can do "netManager->getPing()" to get the latency to the server.

Does that mean your previous error was fixed?