Gnet.Sync() problem with Flip(0)

BlitzMax Forums/BlitzMax Programming/Gnet.Sync() problem with Flip(0)

Scaremonger(Posted 2008) [#1]
I've been messing around trying to interface GNET to my own game framework. I was getting a problem where GNET_CREATED messages were not being received, and therefore objects were not getting co-ordinated.

In the end I wrote a small game to test GNET and I didn't get the same problem. I've spent days cross referencing it, and now I've identified the source of the error.

My Game framework uses FLIP(0), and the game used FLIP().

Take a look at this code:


Run it twice on your PC, and host the first. Now watch both windows carefully. Press tab repeatedly (to create bullets), and you will see that some of them do not get created on the other window... (THE BUG).

Now change the code in "Listing1", replacing the speed constants (cos flip(0) is faster) and Flipmode variable. Repeat the same again...

'##########
Const SPEED_MOVE	:Float	 = 1.00
Const SPEED_ROTATE	:Float	 = 5.00
Const SPEED_BULLET	:Float	 = 1.20
Const FLIPMODE		:Int	 = -1		'# DEFAULT
'##########


Any idea why this happens? Have I simply missed something?


Dreamora(Posted 2008) [#2]
yupp.
you forgot regular latency assumptions. you can surely not push the network each frame!
As well, gnet is not realtime targeted, use Pub.ENet if you need realtime.
GNet is targeted at a slower pace due to the massive amount of data (32slots on the gnet objects) it will syncronize


Scaremonger(Posted 2008) [#3]
Cheers Dremora, Obvious now you've said it...