[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Dedicated servers, listen servers

Dedicated servers, listen servers

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Dedicated servers, listen servers

Postby toneddu2000 » Mon Jul 13, 2015 12:12 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Dedicated servers, listen servers

Postby Spike » Mon Jul 13, 2015 1:19 pm

localcmd("sv_clientslots 255; deathmatch 1; coop 0; setrenderer sv; map dm4\n");

connecting to a friend's server requires that their firewall/nat forwards the packets to the server. the master server stuff requires that the server's NAT/router is reconfigured to have a static public/private port mapping, and that it does not act as a firewall on that port.



It is generally still possible to get a game going even if you're firewalled (so long as you NAT doesn't randomize ports), and without reconfiguring your NAT, by using fte's xmpp plugin. This requires that both users log into an xmpp account (which will automatically log in next time you start up the game, so beware of that). Once you're both logged in, there should be an option to join/invite your friends to your game (as well as enable voip without necessarily connecting to any server). Note that this isn't suitable for unattended dedicated servers.

By using an xmpp server as a relay, the two clients can share information and punch holes in both user's NATs. Typically at least one of you will have a NAT that opens up and lets the other through - its not guarenteed though, as I didn't get around to providing any support for proxies using this.

(I really ought to integrate this stuff into the irc plugin too so that this stuff doesn't need passwords)
if you both a gmail accounts, then you can use that. however, you will generally both need to disable 2-factor authentication. Strictly speaking its possible to connect using google's oauth2, but frankly its a nightmare to do - the only way to make this vaugely user friendly is to send your login details to a server under my control (instead of your client), which is utterly absurd, yay for snooping on everyone's accounts! Naturally this is something I refuse to do.



the dpmaster protocol (of which those three masters that you listed use), permits support for custom protocol names (master servers are sort of like a telephone directory service - they don't provide any actual games, they just tell you about other servers).
they will return ONLY the servers with a matching 'com_protocolname' cvar. There should be no spaces in it or anything (use hypens or underscores if needed).
If its set to the default value, FTE will also utilise quakeworld master server as well as a few NQ ones (which will not only list said servers but also expose your server to people looking for games via said qw master servers).

you can set sv_public 0 to disable the heartbeats, but it can take a while for the master and any clients to realise that your server is meant to be private.



you can implement your own server browser via some menuqc builtins to query the client's database.



so the answers to your two actual questions are:

'setrenderer sv' switches the renderer to the dedicated server. this will also disconnect the local client if you're currently running a map. 'setrenderer gl' can be used to switch back to gl. you might want to create an alias for that or something, so it has a more memorable name.

setting com_protocolname to the same value in both your client and server will make the client's server browser list display ONLY that server (assuming its unique, might need to restart the engine in order to ensure caches are fully purged).
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Dedicated servers, listen servers

Postby toneddu2000 » Mon Jul 13, 2015 3:43 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Dedicated servers, listen servers

Postby Spike » Mon Jul 13, 2015 4:08 pm

if sv_public is set, and the master servers are configured properly, and its multiplayer, the server will periodically send heartbeats to the master servers.
the master servers will see these heartbeats and add the sender's ip:port to a list (per protocol name). if a server stops sending heartbeats, the server is removed from the list again.

when the user goes into the server browser, the client sends a message to those master servers, asking for a copy of those lists.
when the client receives the addresses, it sends a ping to each game server in turn (to the same public port that the master server saw). this not only discovers the ping to said game server, but also reveals the server's player counts, hostname, and other rules to the client.

local servers can be found by the server browser by using broadcast pings. this means everything still works fine on a closed lan - you can still get a game going.

Its quite disturbing that we don't have any real standard for NQ master servers, but that's a different topic.


its sv_playerslots. which specifies the absolute maximum number of players or spectators on the server (including zombies). it defaults to 32 if deathmatch or coop is enabled, thus ensuring compat with more QW clients. you can set it to 16 if you want to play host to nq clients without bugging them out. any changes will wait until the next map change, however.
maxclients limits the number of players who may join at any one time. it can be changed dynamically, and does not limit spectators.
maxspectators limits spectators but not players. again, dynamic limit.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Dedicated servers, listen servers

Postby toneddu2000 » Mon Jul 13, 2015 4:53 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Dedicated servers, listen servers

Postby toneddu2000 » Mon Jul 13, 2015 8:59 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Dedicated servers, listen servers

Postby Spike » Tue Jul 14, 2015 8:07 am

search the builtins for *hostcache* (both with different prefixes and postfixes, to make life easy...)

you can find a lame example menuqc/csqc server menu here: http://triptohell.info/moodles/junk/aft ... enusrc.zip (menu/servers.qc)
I ought to put those files onto fte's svn some time.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Dedicated servers, listen servers

Postby toneddu2000 » Tue Jul 14, 2015 10:29 am

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Dedicated servers, listen servers

Postby toneddu2000 » Thu Jul 16, 2015 4:18 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests