Dedicated Server script Alpha

Status
Not open for further replies.

Eidolon

Developer
Sonic Team Junior
Kart Krew™️
I have built a small autoexec.cfg script for dedicated servers. Copy and paste this into your autoexec.cfg file:

Code:
alias start_match "map map90 -gametype match -force"
alias start_ctf "map map80 -gametype ctf -force"
alias start_coop "map map01 -gametype coop -force"
alias start_race "map map01 -gametype race -force"
alias start_tag "map map90 -gametype tag -force"
bind [ "say server shutting down at end map"
bind ] "say server shutting down"
bind \ "say using the server code designed by furyhunter600"
alias pmatch "say get ready for match!"
alias pctf "say get ready for capture the flag!"
alias pcoop "say get ready for cooperation!"
alias prace "say get ready for race!"
alias ptag "say get ready for tag!"
bind ' "pause; say pause toggled"
alias kickblaster "say /me is loading kickblaster"

For those of you who can't understand the code, here are some instructions:
  • To change game modes, type "start_*typename*" in the console, where as *typename* is replaced with either match, ctf, coop, race or tag.
  • To tell the people in your server to prepare for a mode, type "p*" in the console, where * is replaced with match, ctf, coop, race or tag.
  • To tell people that the server will shutdown on next map, press the [ key.
  • To tell people that the server is shutting down, press the ] key.
  • To tell people that the server is running on my code, press the \ key. You must do this upon server shutdown as to give credit.
  • To pause the game, press the ' key.
  • To warn someone that they could get kicked, type "kickblaster" in the console.

Just a little quicky code I made. It's in early alpha, so it's of course VERY simple. Try it sometime.
 
You may want to consider also setting a password for remote administration.
 
JJames19119 said:
Great, now give us a dedicated server to use it with! :P
I suppose anyone with spare bandwidth could run the normal EXE as a background process, achieving the desired effect. I made some modifications to 1.08 that introduced support for some useful related stuff (toggling the renderer at runtime, MOTD, admin propagation); I'll implement them again in 1.09 if anyone's interested.

One thought on the matter: The biggest problem I found when running semi-dedicated servers is that people aren't willing to hang around very long for an opponent after joining a server. Renderer-toggling could help, if the server has the time to play for a while (i.e. until two others arrive) before leaving and turning off the renderer.
 
Anyone with a spare machine could turn that box into a dedicated SRB2 server. I mean, why not write an SRB2 Dedicated Server Operating System? Someone could modify the Linux kernel and impliment background server-er-izing... er...

With a dedicated server OS, one could do it this way:
1. When the player joins the server, the player and a bot named SYSTEM could be teleported to a map with little doors marked 1 through 9 or so. These doors are 'subervers', or games with other people in other maps doing other gametypes. You'd go inside... oh, say door 3, for example, and then it'd teleport you to the map that subserver 3 is currently on, and all the players in subserver 3 would be 'in the game' for you to play with. If you want to get back to the adventure room, you would use the console command 'SAYTO SYSTEM /!subserverlist' and it'd take all the other players 'out of the game' for you and teleport to the adventure room. Meanwhile, all the other players in the game would see 'Player has left the game' even though he's at the adventure room, and... Aw, this is too complex for words. I can't really explain it, but it'd be cool.

OASN: In the SRB2 netplay code, can the server modify the floor/ceiling height of FOFs? I mean, when a player joins the game, it has to send the FOF floor/ceiling height or when the player steps on an FOF, he'll get a sigsev. Can it send it mid-game, or does it always have to be the start of a game?
 
Going through all that trouble, why not have a dedicated server like those seen in Gunbound and Gunz? As in, players join a server, create rooms where players play games and such. It would give people the same control over SRB2 as if they were the host yet the server would be in a different spot.
 
SRB2's netcode barely allows people to host an 8 player game without lag, hosting multiple games on one server just wouldn't work.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 2, Members: 0, Guests: 2)

Back
Top