gnet problems/issues I should be aware off?

BlitzMax Forums/BlitzMax Beginners Area/gnet problems/issues I should be aware off?

gameproducer(Posted 2010) [#1]
If you've done stuff with gnet, care to share if there's any issues/problems/stuff I should be aware of?

I read about some topic (4 years back ;)) about "connection drops" and just thought to ask if you guys still experienced something like this with gnet? (I assume that since gnet is nowaday enet based, this "connection drop" is not in the list anymore :))

The thing looks good to me, but just thought to ask before diving too deep into these waters.

And I'm talking about this gnet:
http://www.blitzmax.com/bmdocs/command.php?name=gnet&ref=goto


Drackbolt(Posted 2010) [#2]
I tried to use it quite a while back. The biggest issue in coding I ran into is that you need to initialize a GNetObject's slots right after it is created and before it is read, which creates awful timing issues and compromises. Otherwise, if you use a GetGNetInt for example on a remote GNetObject's slot right after it's been created, it will crash. The end result is that you can't do wonderful things like detecting if a unit was created on the other side and just immediately assimilate it into your game.

The main reason I gave it up eventually was that I was mistakenly trying to use it for object sync in an RTS game. So, needless to say it was disconnecting left and right due to traffic. A good network setup needs to be as atomic as possible and GNet is a blunt force tool. I've considered revisiting it in a more conservative way but I haven't heard about it necessarily being improved in the past few years. I switched in development over to TNet (TruploNET) which was easy to use at least, but now I'm looking into RakNet or something more reliable.


Czar Flavius(Posted 2010) [#3]
I can vouch that RakNet is awesome. Fast and reliable.


BLaBZ(Posted 2010) [#4]
Has someone made a RakNet wrapper? I saw one for blitz awhile ago but it seemed like it may have been out of date


Czar Flavius(Posted 2010) [#5]
Brucey has. You need to get it using that stupid SVN thing though.


Drackbolt(Posted 2010) [#6]
Sigh... Another night to spend searching the forums trying to figure out one thing just to find out if another will work... %)

Finding a working, stable, usable network wrapper has been a real challenge. Most of the code around here is bugged or outdated (or GNet). I hope I can get my head around SVN quickly and get my hands on Brucey's mod, because I know next to nothing about development outside of Blitzmax.


Dreamora(Posted 2010) [#7]
instead of gnet just use its base which is super fast and well known: ENet - its in pub.enet


Drackbolt(Posted 2010) [#8]
Thanks for the advice. You're probably right... I've shied away from it because it was a bit beyond my networking knowledge, but it's probably time to just dive in.


Czar Flavius(Posted 2010) [#9]
SVN is annoying (perhaps ask Brucey for a download?) and Raknet takes a bit of getting used to, but it's very reliable.


Drackbolt(Posted 2010) [#10]
I've heard that, but it's a bit daunting because I have no real experience with C or other development outside of Blitzmax. I wish there was a tutorial for ENet because it seems like it will get the job done. I just need to figure out how the wrapper is supposed to be used.


Czar Flavius(Posted 2010) [#11]
You don't need to program in C++ to use Raknet, but as most tutorials are in C++ it is a bit daunting, I agree. Brucey does include some sample Blitzmax code that covers the basics.