Battlezone II Raknet Proxy (checks multiple servers)

Moderators: GSH, VSMIT, Red Devil, Commando

Post Reply
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Battlezone II Raknet Proxy (checks multiple servers)

Post by Nielk1 »

I've released a Raknet proxy. This should help the current situation, though if the NatNeg server is down you'll need your ports open or for UPNP to open them. Sadly, NatNeg is not a simple thing and everyone needs to be talking to the same NatPunch server for it to work. The code for this proxy is simple and fully open source on an Unlicense license.

By default it does GETs to my IonDriver server first, which might timeout as I've not optimized it yet, but it lists games from all 3 servers if it can reach them.

https://github.com/Nielk1/RaknetProxy/r ... ag/1.1.0.0

Feel free to fork the code and make changes. You are under no obligation to provide your code changes or even attribute me as this is under the Unlicense, but I would appreciate pull requests or code changes be provided to me so I can update this main repository.

You must run this on your local machine you are playing BZ2 on. The program talks to the remote Raknet servers as if it was BZ2, so the IP of the machine it is running on is what will be provided to those servers. (Technically you can run it on any machine in your local network behind the same external IP, but it's easier to just say "run it on the same computer as your game.")

Image
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Battlezone II Raknet Proxy (checks multiple servers)

Post by Nielk1 »

Updated to version 1.1.0.0 which has correct DELETE handling. I should have known something was wrong when GSH's server was replying with 500.
User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

Re: Battlezone II Raknet Proxy (checks multiple servers)

Post by Red Devil »

trying it; this when configured, this gets the list of games up from your proxy, right?
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

Re: Battlezone II Raknet Proxy (checks multiple servers)

Post by Red Devil »

i see that it's using the file name of the maps instead of missionName inside the map's .inf file. possible to change that?
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Battlezone II Raknet Proxy (checks multiple servers)

Post by Nielk1 »

It shouldn't act any differently than BZ2 currently does.

By default configuration the proxy will try to get a game list from IonDriver, failing that MatesFamily, and failing that KebbzNet.
By default configuration the proxy will try to post a game to MatesFamily, and failing that KebbzNet, and failing that IonDriver.

IonDriver's list will contain games from MatesFamily and KebbzNet if it could access them fast enough, which is why it's the default for getting a game list with the proxy. The only thing IonDriver does to games from those remote lists is give them random negative rowIDs so they don't conflict with IonDriver's own real games and if they are of the ip 0.0.0.0 make sure their ports are different so dummy games don't eat each other in BZ2.

Just as usual, if you have a map in your game it *should* be converting that map to it's name. If it's not I will need to dig into what's gone wrong.
Commando
Flying Mauler
Posts: 2176
Joined: Fri Feb 18, 2011 6:41 pm

Re: Battlezone II Raknet Proxy (checks multiple servers)

Post by Commando »

It would be nice if bz2 could register with multiple servers, for servers, then clients query multiple servers.

The servers being specified in gameprefs.

I could set up a server if the port setting worked in addition to the server page code being available.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Battlezone II Raknet Proxy (checks multiple servers)

Post by Nielk1 »

A big note is that everyone has to use the same NatPunchthrough server or NatNeg won't work. Matchmaking though, that's a lot more flexible. I need to rewrite IonDriver's rewrite though so instead of timing out remote calls it does them off the request thread so they're there for the next GET.
Commando
Flying Mauler
Posts: 2176
Joined: Fri Feb 18, 2011 6:41 pm

Re: Battlezone II Raknet Proxy (checks multiple servers)

Post by Commando »

I forward ports so my sessions don't rely on NatNeg.

On top of that, NatNeg is unreliable.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Battlezone II Raknet Proxy (checks multiple servers)

Post by Nielk1 »

In an optimal system NatNeg would be what you use and UPNP is the fallback, but in our situation it seems UPNP is the more reliable element.

I've wanted BZ2 to support multiple servers for some time. Back when we were on gamespy I did inquire about plugin/dll support, but that would have been a doosy. Now that we've got a REST based system it's more reasonable.

(Of course, if we manage to push for and get a BZ2 redux a lot of stuff would change. 1.3 would be finalized and the redux would use BZNet or something like the BZ98 Redux.)
Post Reply