GNet question

Blitz3D Forums/Blitz3D Programming/GNet question

GIB3D(Posted 2009) [#1]
Is GNet ok to use in a commercial game?


Chroma(Posted 2009) [#2]
I'm going to say yes since it was created by Mark for use with Blitz products.

I've never really checked out GNet but I'm guessing it's a lobby system so people can find servers right? I hate taking coding breaks because if I don't code for >6 months I dump all this info and have to relearn it. :(


BlitzSupport(Posted 2009) [#3]
You can use it, but it would be best not to rely solely on this site's server, since nobody can promise it will always be available. (See here.)

It's best to upload a copy of the PHP code, found below, to your own web server (needs PHP and MySQL)...

http://www.blitzbasic.com/toolbox/toolbox.php?tool=61

I set it up once without too much difficulty (knowing nothing about such matters), but I did have to follow a tutorial someone else posted... here it is.


BlitzSupport(Posted 2009) [#4]
I just set it up on my server through loads of trial and error...

Using the Gnet archive from the Toolbox section of the site, you can modify gnet_inc.bb so that the top three lines read:

Const GNET_HOST$="www.hi-toro.com"
Const GNET_PORT=80
Const GNET_GET$="/gnet.php"


Saving it and then running gnet_test.bb should connect to my hosted Gnet lobby and show the results 'in-game' (there's no publicly displayed list)...

Some more information for anyone (including me in future) who wants to set it up on their own MySQL/PHP-enabled web server. I had to:

1) Create a database (I used the MySQL Database Wizard in my provider's cPanelX control panel), and a username/password that will be specified in the PHP script;

2) I also pasted Techlord's PHP code from this post into phpMyAdmin to set things up (click the database name, then the SQL tab, paste into big box and click 'Go');

3) I had to delete the reference to the 'PRIMARY' key afterwards, as it complained about this conflicting with the 'UNIQUE' key. No idea what that's about.

4) I had to modify the script a little, as below. Note that the login details need to be changed (scroll down to "MODIFY THESE TWO LINES WITH YOUR DATABASE/USER DETAILS!")...



... and here's how my gnet_servers table looks. Dunno if it's right, but it seems to work! Beyond this, I've no idea what I'm doing...