Josh Posted May 26, 2017 Share Posted May 26, 2017 This is a simple system, written in Blitz Basic, that stores a list of game servers to connect to:http://www.blitzbasic.com/toolbox/toolbox.php?tool=61 Here it is in action:http://www.blitzmax.com/gnet/gnet_servers.php Your server "publishes" the game on the main server, then clients that are looking for a game to play can select your game and join. Now if this were modified so that the PHP script detects the server's apparent IP address, then that is basically NAT punch-through. This code will get the IP address of the connected machine: $_SERVER["REMOTE_ADDR"] Leadwerks actually does have networking commands, and it is super simple. Your game is either a client or a server. Clients connect to servers by IP address. Clients only talk to the server, and the server can talk to all clients. If you look at the header files it is pretty obvious. I have uploaded the gnet script on our server here with a new database so you can access this:https://www.leadwerks.com/gnet.php So all the pieces are there to make networked games pretty easily. 2 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Ma-Shell Posted May 26, 2017 Share Posted May 26, 2017 4 hours ago, Josh said: I have uploaded the gnet script on our server here with a new database so you can access this:https://www.leadwerks.com/gnet.php This shows only "ERROR"... Quote Link to comment Share on other sites More sharing options...
Josh Posted May 26, 2017 Author Share Posted May 26, 2017 25 minutes ago, Ma-Shell said: This shows only "ERROR"... It is working on the blitz server: http://www.blitzmax.com/gnet/gnet.php?opt=list http://www.blitzmax.com/gnet/gnet.php?opt=add&game=Leadwerks&ip=1234 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted May 26, 2017 Author Share Posted May 26, 2017 It looks like the script does not work with newer versions of PHP. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted May 30, 2017 Author Share Posted May 30, 2017 Alright, it's working now. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.