Jump to content

gnet


Josh
 Share

Recommended Posts

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.

  • Upvote 2

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...