LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices


Reply
  Search this Thread
Old 02-26-2014, 03:44 PM   #1
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Rep: Reputation: 167Reputation: 167
HOWTO: Run a dedicated BosWars server


I don't know how popular boswars is, but my nephews and I sometimes play it over the LAN and we've quite enjoyed it. But there's no support yet built in to run it as a dedicated server. According to their FAQ:
Quote:
Q: Does Bos Wars support a game server, meta server, lobby or anything like that ?
A: Not yet, but this is a planned feature.
It can be played over the Internet of course, but all players must know when the server will start and the host name for connection.

I thought this might be done using a program like xmacro and cron.

It's fairly straightforward, with a few minor variables (as far as I can tell so far).

1. A cron job starts boswars every 2 hours. (5:50,7:50,9:50, etc)
2. A customized script similar to the one below is called.
Code:
#!/bin/sh
# start the boswars server 10 minutes before the
# next round begins
echo "MotionNotify 957 444" | /usr/bin/xmacroplay :0
echo "ButtonPress 1" | /usr/bin/xmacroplay :0
echo "ButtonRelease 1" | /usr/bin/xmacroplay :0
sleep 2s
echo "MotionNotify 853 427" | /usr/bin/xmacroplay :0
echo "ButtonPress 1" | /usr/bin/xmacroplay :0
echo "ButtonRelease 1" | /usr/bin/xmacroplay :0
sleep 2s
echo "MotionNotify 935 493" | /usr/bin/xmacroplay :0
echo "ButtonPress 1" | /usr/bin/xmacroplay :0
echo "ButtonRelease 1" | /usr/bin/xmacroplay :0
sleep 2s
echo "MotionNotify 976 367" | /usr/bin/xmacroplay :0
echo "ButtonPress 1" | /usr/bin/xmacroplay :0
echo "ButtonRelease 1" | /usr/bin/xmacroplay :0
sleep 2s
echo "MotionNotify 1115 631" | /usr/bin/xmacroplay :0
echo "ButtonPress 1" | /usr/bin/xmacroplay :0
echo "ButtonRelease 1" | /usr/bin/xmacroplay :0
echo "MotionNotify 1125 617" | /usr/bin/xmacroplay :0
# sleep for 10 minutes, allow people to join
sleep 10m #Game will start a a few seconds after the top of the hour
# automate click to start game after players have joined
echo "ButtonPress 1" | /usr/bin/xmacroplay :0
echo "ButtonRelease 1" | /usr/bin/xmacroplay :0
3. cron job kills any instance of boswars every 2 hours (5:45, 7:45, 9:45,etc)

So the minor variables which have to be considered:

The positions of the boswars window for the x and y coordinates

Any known or unknown security exploits in network play

The server "player" will be neutral or inactive, unless he happens to be at the computer at time the server starts and desires to play.

By the way, the example above starts the server with the 4-player "hospitality" map with the default options on version 2.6

Last edited by Andy Alt; 02-28-2014 at 02:42 PM.
 
Old 03-01-2014, 01:53 AM   #2
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Original Poster
Rep: Reputation: 167Reputation: 167
Quote:
Server is currently NOT RUNNING (boswars v2.6.1)
I've enabled a test server. The host is srvbos.servegame.com
The schedule is every 2 hours (even numbered hours, UTC/GMT 0,2,4,6,etc).
Connections can be made within 10 minutes BEFORE the start of each game. If connections are made AFTER the top of the hour, the server will not start the game.

If a game in progress is still running 15 minutes before the start of the next round, the server will be killed. It's using the antarticum map, so finishing a round in under 1h 45m shouldn't be a problem.

There's no trees on that map. Don't forget to build a power plant right away.

Last edited by Andy Alt; 03-06-2014 at 12:45 AM. Reason: noting version number, adding and changing details
 
Old 05-14-2014, 08:21 AM   #3
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Original Poster
Rep: Reputation: 167Reputation: 167
This host has expired from my noip account 1.5 hours ago. I no longer have control of it.

! DO NOT USE IT !
srvbos.servegame.com

Last edited by Andy Alt; 05-14-2014 at 08:35 AM.
 
Old 01-04-2016, 10:43 AM   #4
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Original Poster
Rep: Reputation: 167Reputation: 167
Because boswars doesn't have a multi-player lobby yet, a simpler solution might be to find a player in a boswars chat room, such as ##boswars-lobby on the Freenode IRC network.

Last edited by Andy Alt; 01-04-2016 at 11:06 AM. Reason: add link to IRC channel
 
Old 01-08-2016, 01:04 AM   #5
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Original Poster
Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by Andy Alkaline View Post
Code:
#!/bin/sh
# start the boswars server 10 minutes before the
# next round begins
echo "MotionNotify 957 444" | /usr/bin/xmacroplay :0
echo "ButtonPress 1" | /usr/bin/xmacroplay :0
echo "ButtonRelease 1" | /usr/bin/xmacroplay :0
sleep 2s
echo "MotionNotify 853 427" | /usr/bin/xmacroplay :0
The numbers after MotionNotify can be figured out easily using the 'xmacrorec' or 'xmacrorec2' program that's included with the xmacro package.

Run the xmacro record program from a GUI terminal, then set up a BosWars multi-player network game as you normally would. All the values you need for the script will be shown to you from the console
 
  


Reply

Tags
boswars, games, script, server



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
run windows server 2003 with KVM on slackware 13.1, two dedicated IP slackcode Linux - Networking 2 02-13-2011 10:20 PM
How to run quake 1 - TF dedicated server on linux console? stormrider_may Linux - Games 2 01-18-2007 02:07 AM
Wanted: CounterStrike 1.6 Dedicated Server Howto. Jorek Linux - Networking 2 03-28-2006 10:10 AM
Dedicated Server Run Terminal all the time stuartmunro Linux - Newbie 6 07-24-2005 03:38 PM
Trying to run a half-life dedicated server Trd79 Linux - Software 0 01-08-2003 07:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games

All times are GMT -5. The time now is 07:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration