.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Air Assault Task Force- Save $8.00
Bronze- Save $10.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

Reply
 
Thread Tools Display Modes
  #1  
Old September 30th, 2006, 12:56 AM

Neophyte Neophyte is offline
Private
 
Join Date: Nov 2005
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Neophyte is on a distinguished road
Default Re: Linux Admining

Does the IP address need to be specified (in the script) if one is IP forwarding through a firewall? If so, the address needs to be the address that remote clients will be using, correct? I hope I got the terminology right.

Thank's!
Reply With Quote
  #2  
Old September 30th, 2006, 12:01 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Linux Admining

I understand your question but Im afraid that I dont know the answer. I dont know of any way to tell the game which IP to run on. I think that when hosting, the game only concerns itself with port. So if the clients address hits the firewall, and the firewall forwards it to the right machine, things should be transparent to the user. But Im afraid thats just guesswork on my part.

By the way, Dom3 handles both IP or domain name for the server. Thats something I have tested quite abit. So Im able to send people to either 63.199.8.158 OR dom3minions.com for a game. (also 63.199.8.157 host.dom3minions.com which I use for blitz games)
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #3  
Old September 30th, 2006, 03:07 PM

Neophyte Neophyte is offline
Private
 
Join Date: Nov 2005
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Neophyte is on a distinguished road
Default Re: Linux Admining

Upon reflection, the whole IP thing is probably a switch issue not a computer issue anyhow - i.e. addyXZ internally is in all ways equivalent to addyYZ externally with IP forwarding setup. Should have thought of this last night, but it was late, and my networking knowledge is sporadic.

Thank's for the reply - I'll test out your scripts once Dom3 shows up hopefully next week.
Reply With Quote
  #4  
Old October 14th, 2006, 12:08 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Linux Admining

PbEM scripting has been ironed out. The key is two switches which will start a game hosting automatically. The thread where this was discussed fully is at
http://www.shrapnelcommunity.com/thr...270&Forum=f187

The switches are:
--uploadtime
--uploadmaxp
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #5  
Old October 17th, 2006, 03:22 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Linux Admining

Im rather proud of this altho it will make others cringe at its ugliness. I wanted a way for people to check which games need players. Doing an "ls" of the game directory from a CGI was easy enough but I realized that instead of using "ls" of the directorys as fact that the game exists, I should use the "ps". Then starting a game will automatically cause it to show, and if a game finishes or crashes then it will automatically not appear. I also arranged for it to pull the port from the ps display and show that.
http://host.dom3minions.com/bin/blitz_chk.cgi

Code:

#!/bin/bash
echo "Content-type: text/html"
echo -e "\n\n"

echo "<H2><b>Dominions 3 Blitz games</b></H2>"
echo "These are 2-player games on tiny maps<br>"
echo '<a href="http://host.dom3minions.com/how-to.html">how to join a game</a><b
r><br>'


cd /home/dom3/dominions3/savedgames
ps ax |grep dom3|grep bl_ | \
while read n n n n n n game n port n n n n n n n n era n
do
echo "era $era game <b>$game</b> on port <b>$port</b><br>"
cd $game
for fyle in `ls -1 *.2h`
do
echo $fyle "<br>"
done
cd /home/dom3/dominions3/savedgames
echo "<br>"
done

__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #6  
Old November 28th, 2006, 07:14 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Linux Admining

Not much reaction to the fancy stuff. Maybe I shoud move the other direction...

Here is the simplest way to start a game in linux text mode so that you can be the server....

dom3 -STq
(take note that is a Q as in quick, not a G like in game)
it will ask you what port to use..
it will ask you to name the game..
it will ask you what era the game should be for
it will then wait for people to join and tell you each time someone does

When one of the players hits the "start game" then it will stop to show you a list of all the maps on your machine numbered, then ask you to type in the number of the map you want to use.

What it will NOT do is tell the machine to keep running the game in the background if you hang up your connection. I will cover that next.

Gandalf Parker
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #7  
Old November 28th, 2006, 07:37 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Linux Admining

The simplest way to start a game in text mode on a linux server for continual running.. well there isnt one. The problem is that telling it to run continual and background tends to cut off your ability to answer the questions. I havent been able to get the answers to work coming from a text file with something like <input.txt. So you will need to provide the answers on one line.

The simplest line I can come up with is..
nohup dom3 -STq fastgame --port 9999 --mapfile eye.map --era 1 &
(again thats a Q not a G)
Of course you can change "fastgame" to any name you want, and 9999 to any port, eye.map to the map file for any map you have in the maps directory, and era to 1 2 or 3.

If you want to play with adding other settings then type
dom3 -h
which will give you a text screen of all the switches.

Gandalf Parker
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
Reply

Bookmarks

Tags
admin, automation, command line, hosting, linux, script, server, switches


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 On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 09:34 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.