Mark! GNet Question!

BlitzMax Forums/BlitzMax Programming/Mark! GNet Question!

Ked(Posted 2009) [#1]
Is the gnetdemo.bmx in the samples folder a good representation of how to use GNetSync()? Is it safe to call it every frame like that? If not, how many times should I call it? Once every five frames or something? I would prefer not to have noticeable lag though.

Also, does GNetSync() only send objects that were modified or all objects no matter what?

Thanks!


marksibly(Posted 2009) [#2]
Hi,

GNetSync is used to update GNET object states - if you don't call it, no GNET objects are updated. It only sends modifications.

It's up to you how often you want to call it, and therefore how 'smoothly' things (can) run. Much like graphics FPS, this will depend on your target audience, their net capabilities etc. eg: for a LAN game, GNetSync at 60FPS might be just dandy - but it certainly wont be for dial-up internet.


Ked(Posted 2009) [#3]
It only sends modifications.

OK, good to know, thanks!

... for a LAN game, GNetSync at 60FPS might be just dandy ...

Very good to know! I was going for a LAN game because I can't do anything outside my network (thank you ISP).

Thanks, Mark, for your reply! It's greatly appreciated.