1

i've been developing a cross-platform 3D multiplayer game with Ogre3D engine. by using C's own (send/sentto/recvfrom etc.) networking functions, I've created my own network structure. it supports both udp and tcp transport protocols. the game uses the client-server architecture.

The problem I'm having is that although the application works on debug mode (players connect to server, transfer their files, send and receive transform updates properly etc.), if I switch to release mode, some of the networking capabilities do not work. for instance, one of the computers does not receive even 1 transform update at all, but, if I restart the application, sometimes it does. In addition, some of the tcp messages are not getting captured by the application and so on. I'm having strange networking operations in Ubuntu on release mode, also.

what do you think could be the problem?

Note: should I try windows' own network functions (WSASend etc.) ?

Alican
  • 286
  • 1
  • 8
  • Actually those aren't see functions. Besides, Winsock offers a layer of functions compatible with the BSD socket implementation (as this is where it originated). – 0xC0000022L Apr 19 '12 at 23:22
  • @sarnold: my assumption was Debug vs. Release (build) mode (or rather "configuration") – 0xC0000022L Apr 19 '12 at 23:25
  • 1
    If this is a compiler-dependent behavior perhaps you should also tag the compiler that you're using. – sarnold Apr 19 '12 at 23:28
  • 1
    Looks like a race condition. Sometimes it helps to do old-style debugging with lots of prints. Either you find the offending code by looking at the output or the prints change the timing such that it works again. For the latter case be prepared to keep track of all intermediate changes. – bjhend Apr 19 '12 at 23:57
  • If you change the settings for release mode to build without optimizations, does it help? Adding debug information? If you can add debug information without solving the problem, then you can at least use the debugger to step through the code around where you think the problem is. – Some programmer dude Apr 20 '12 at 06:05

0 Answers0