News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

[ENDED GAME] Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)

Started by jamespetts, December 05, 2017, 09:03:46 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

CK

Quote from: jamespetts on January 09, 2020, 06:44:43 PM
That is useful to know. May I ask what the performance is like once you do manage to login?
Sluggish, to summarise.

jamespetts

Quote from: CK on January 09, 2020, 07:11:20 PM
Sluggish, to summarise.

Thank you. Are you able to elaborate on this; is it unresponsive to commands; is the speed inconsistent; are there regular pauses? The particular type of sluggishness can help to narrow down how best to deal with a high load.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

CK

Quote from: jamespetts on January 09, 2020, 07:55:19 PM
Thank you. Are you able to elaborate on this; is it unresponsive to commands; is the speed inconsistent; are there regular pauses? The particular type of sluggishness can help to narrow down how best to deal with a high load.
The speed appears to be consistent, but the pauses are regular, and the game is occasionally unresponsive to commands.

jamespetts

Quote from: CK on January 09, 2020, 08:28:32 PM
The speed appears to be consistent, but the pauses are regular, and the game is occasionally unresponsive to commands.

Interesting - thank you for letting me know.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

freddyhayward

Is there anywhere I can view the autosave logic for this server?

jamespetts

The logic is here:


root@438242:~# cat rotate-backup.sh
# Rotation and backup script for the Simutrans-Experimental server
# Written by James E. Petts, December 2012
# Modified September 2018 to add thd date/time

# This script is designed to:
# (1) check whether the saved game has been modified in the last hour;
# (2) if it has not, run the force-sync command;
# (3) check again whether the saved game has been modified in the last hour
# (the force-sync command might or might not modify it depending on whether -
# (a) Simutrans-Experimental is running; and
# (b) there are any players connected); and
# (4) if it has, rotate the saved games using the rotate.sh script.

echo
echo "******"
echo
echo "Running the backup and rotation script..."
echo
echo "The current date and time is"
date
echo
SAVEGAME="/usr/share/games/simutrans-extended/server13353-network.sve"

# Check that the server saved game exists at all
if [ ! -e $SAVEGAME ]
then
echo "Error: saved game not found at $SAVEGAME"
echo
exit 1
fi

# Check the current time and the last modification time of the saved game file
# Use Unix time (seconds since 1 Jan. 1970)
NOWTIME=$(date +%s)
NOWTIME_FRIENDLY=date

SAVEMODTIME=$(stat -c %Y $SAVEGAME)
SAVEMODTIME_FRIENDLY="stat -c %y $SAVEGAME"

HOURAGO=$(expr $NOWTIME - 3600)
HALFHOURAGO=$(expr $NOWTIME - 1800)

echo "Current time:"
$NOWTIME_FRIENDLY
echo
echo "Game last saved:"
$SAVEMODTIME_FRIENDLY
echo

# Check whether the saved game was modified more than an hour ago
if [ $HALFHOURAGO -gt $SAVEMODTIME ]
then
echo "The game was last saved more than half an hour ago. Run a force sync."
echo
/root/force-sync.sh

# Check again whether the saved game was modified more than an hour ago.
# But first, wait two minutes, as it might take a while to execute the
# force-sync command.
sleep 120
else
echo "The game was last saved within half an hour - do not run a force sync."
echo
fi

NEWSAVEMODTIME=$(stat -c %Y $SAVEGAME)

if [ $HOURAGO -gt $NEWSAVEMODTIME ]
then
echo "The game was not updated with a force-sync. Either the server is not running, or no clients are connected."
echo
exit 2
else
echo "The saved game has been updated in the last hour. Rotate the backups."
echo
/root/rotate.sh
fi
sync


The above is a shell script set to run once every minute on the server.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.


jamespetts

Here it is:


# Shell script to run a force-sync on the running Simutrans-Experimental server
# Written by James E. Petts, December 2012
# Modified September 2018 to add the date/time for logging purposes

echo "Running a force-sync..."
date
echo

/usr/share/games/simutrans-extended/nettool -s bridgewater-brunel.me.uk -p [PASSWORD REDACTED] clients

echo

/usr/share/games/simutrans-extended/nettool -s bridgewater-brunel.me.uk -p [PASSWORD REDACTED] -q force-sync

sleep 3m
sync

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

freddyhayward

Thanks. From what I can tell, this uses code from network_cmd_ingame.cc, which goes ahead with autosaves even when no clients are connected. Perhaps this is contributing to the server's connection difficulties?

jamespetts

The difficulty, I think, is that the time that it takes to save is equal to or greater than the designated interval between saves.  From what I can deduce from looking at memory allocation, most of the data are player routes.

I notice from the code that, although the comments refer to hourly saving, it was changed at some point to half-hourly saving. I can re-increase it to hourly saving and see whether that helps for the time being; but the ultimate issue is that the saved game is too demanding for the server.

Edit: I have now made this modification.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

DrSuperGood

I think at this point people mostly want a new server game. I have not been able to play for over a month because every time I try to join it fails...

At times I want to join for 5-15 minutes and maintain my stuff or do part of a new route. But currently it is taking over 30 minutes to join which is counter productive to this play style. Instead of repeatedly trying to rejoin once it fails I rather let people who want to play for 2-3 hours play uninterrupted.

freddyhayward

While we all wait for either a technical fix or a new savegame, I thought I'd share a rail network map I created for fun based on the Bay region of the server. The map does not include operators other than the Bay Transport Group nor any of the many Bay Metro underground lines.

Sirius

Uhm "for fun" does not imply a broken image I guess?
For some reason I can see the thumbmail but I cannot open the image itself. "unsupported file format"

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Matthew

The map looks very professional, freddyhayward! I've never seen the Bridgewater-Brunel game, but it looks like this corner of the rail network has an authentic feel.  :)

BTW I can see the map by right-clicking on the attachment and downloading it. I guess that the preview is affected by the forum's ongoing troubles.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Ves

I also could only see it by downloading and open in GIMP (my normal picture viewer could also not open it)!
Nice looking map you made!  :D


VOLVO

Quote from: freddyhayward on February 01, 2020, 10:51:04 PM
Hopefully this link works:
Wow, haven't been able to do anything to the company for a very long time due to hardware unable to cope, almost forgot how the network looks like.

The Circular line hardly see any passengers since the opening of the underground lines. Blandinglow line is even worse, but that's what they call community service I guess.

freddyhayward

Quote from: VOLVO on May 14, 2020, 04:21:44 AM
Wow, haven't been able to do anything to the company for a very long time due to hardware unable to cope, almost forgot how the network looks like.

The Circular line hardly see any passengers since the opening of the underground lines. Blandinglow line is even worse, but that's what they call community service I guess.
Out of interest, how do you know this? were you a player on the server, perhaps the founder of the BTG? did you open a downloaded save, or is this from memory? what time period was this?

VOLVO

Quote from: freddyhayward on May 14, 2020, 06:17:47 AM
Out of interest, how do you know this? were you a player on the server, perhaps the founder of the BTG? did you open a downloaded save, or is this from memory? what time period was this?
The company founder is nuhgl, who has disappeared for a very long time, then I took over the company in 190x I think, then until 195x I couldn't connect to the server reliably anymore.

Also the company has become a bit too big to manage. The modernisation of using modern signal boxes and signal systems, modern rolling stock and high speed tracks has took me ages.
I don't have a local save copy anymore unfortunately.

freddyhayward

Quote from: VOLVO on May 14, 2020, 01:57:08 PM
The company founder is nuhgl, who has disappeared for a very long time, then I took over the company in 190x I think, then until 195x I couldn't connect to the server reliably anymore.

Also the company has become a bit too big to manage. The modernisation of using modern signal boxes and signal systems, modern rolling stock and high speed tracks has took me ages.
I don't have a local save copy anymore unfortunately.
Well, the save progressed to about 2004 before becoming impossible to run without crashing, even offline. By this time, most of the regional network had been electrified and slow curves eliminated. Most services ran at 160kph.

jamespetts

This game has now been terminated and replaced with a new game on this server, starting in 1750 and with plenty of industry.

The save for this game in its final, May 2004 state can be downloaded here.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

VOLVO

Quote from: jamespetts on May 16, 2020, 10:38:27 AM
This game has now been terminated and replaced with a new game on this server, starting in 1750 and with plenty of industry.

The save for this game in its final, May 2004 state can be downloaded here.
1.3GB of savegame. No wonder I couldn't connect.

jamespetts

Quote from: VOLVO on May 17, 2020, 03:23:35 AM
1.3GB of savegame. No wonder I couldn't connect.

The new map has been made with considerably fewer towns, so hopefully the saved game size should remain manageable.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

VOLVO

Quote from: jamespetts on May 17, 2020, 11:27:11 AM
The new map has been made with considerably fewer towns, so hopefully the saved game size should remain manageable.
I also see town growth disabled? (or reduced so significantly we don't get a single population increase for a year?)

Sirius

I cannot confirm this.
Some of the towns I serve grew quite a lot already.