News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Semplar pak64 EN r7248 server: y1908

Started by Semplar, June 02, 2014, 05:22:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Semplar

Thanks to "How to set up a Simutrans server" guide here:
http://cheesehead-techblog.blogspot.com/2012/01/starting-simutrans-server.html

..., I've set up 24/7 server:
Machine: low-end Debian VPS @ semplar.net, located in Frankfurt, Germany
Simutrans: version 120, pak64 w/o addons
Map 1: generated 512x512, ~70% uniformly distributed dry land, max 4 trees/square
Timeline: 22 month bits, start year is 1900
Autosave: disabled (currently working on auto-saving & backuping script)
Pay for distance: 2 (no money cheating)
Separated halt capacities, Avoid overcrowding, No routing over overcrowded
Cost for landscaping: x10 (changes & slopes)
Initial money: $500,000
Other game settings are set to default.

Client download link & Server info page: http://semplar.net/simt/simple/infopage.html



Nice players are welcome.

By the way.. one question. How to change start screen position for 1st player (the "Spectator")?

edson

Quote from: Semplar on June 02, 2014, 05:22:56 PM
[...]
Simutrans: version 120, pak64 w/o addons
[...]


Sorry, your server have the 112-3 version. (Yes, poor english, but I think you understand xD)

Semplar

Quote from: edson on June 02, 2014, 11:43:06 PM

Sorry, your server have the 112-3 version. (Yes, poor english, but I think you understand xD)
Idk, I used nightly build:
semplar@semplar:~/simutrans$ ./simd120 --help

---------------------------------------
  Simutrans 120.0.1 Nightly
  released Jun  2 2014
  developed
  by the Simutrans team.

  Send feedback and questions to:
  <markus@pristovsek.de>

  Based on Simutrans 0.84.21.2
  by Hansj▒rg Malthaner et. al.
---------------------------------------
command line parameters available:
-addons             loads also addons (with -objects)
-async              asynchronous images, only for SDL
-use_hw             hardware double buffering, only for SDL
-debug NUM          enables debugging (1..5)
-freeplay           play with endless money
-fullscreen         starts simutrans in fullscreen mode
-fps COUNT          framerate (from 5 to 100)
-h | -help | --help displays this help
-lang CODE          starts with specified language
-load FILE[.sve]    loads game in file 'save/FILE.sve'
-log                enables logging to file 'simu.log'
-noaddons           does not load any addon (default)
-nomidi             turns off background music
-nosound            turns off ambient sounds
-objects DIR_NAME/  load the pakset in specified directory
-pause              starts game with paused after loading
-res N              starts in specified resolution:
                      1=640x480, 2=800x600, 3=1024x768, 4=1280x1024
-screensize WxH     set screensize to width W and height H
-server [PORT]      starts program as server (for network game)
                     without port specified uses 13353
-announce           Enable server announcements
-server_dns FQDN/IP FQDN or IP address of server for announcements
-server_name NAME   Name of server for announcements
-server_admin_pw PW password for server administration
-singleuser         Save everything in program directory (portable version)
-sizes              Show current size of some structures
-startyear N        start in year N
-theme N            user directory containing theme files
-timeline           enables timeline
-times              does some simple profiling
-until MONTH        quits when MONTH = (month*12+year-1) starts
-use_workdir        use current dir as basedir
semplar@semplar:~/simutrans$


Maybe it's network protocol's version 112.3 (it says so in "Play Online" menu), or developers just didn't changed it yet, but it's definitely v120.
Anyway, thank you for notice!

Semplar

#3
Reporting.

Previous game went into /dev/null. I feel very bad about it and want to say HUGE I AM SORRY to guy who played as "Trikky Transport" and spend much of time to build rails & networks. Game was going to be interesting, but I've screwed it up when was simply restarting server with hands.

Explanation: Usually, when I start server via "./sim120 -server 13353 ...blahblah arguments ..blahblah -load savegame.sve", it loads savegame.sve file and start running that game, giving remote access. I had to run it with -load argument only once, but i didn't knew it. Server usually stores savegame file (to continue from) as network-savegame13353.sve in simutrans/ directory, but it continues only if i don't use -load parameter. But i did. So it took savegame.sve (initial map, w/o anything on it!) and overwrites latest savegame, thus deleting it permanently. I didn't read instructions deeply, so I'm such a douche. Again. I am sorry, I cann't recover game at all. It's not like file was deleted and I could undelete it with e2undelete utility or similar. It was overridden by another data and completely lost (I guess).

So what i'm working with. I work on multi-instance server managing script working as init.d service. I'll have simutrans directories at
"simutrans/runs/", each of which contains everything about server instances: server configuration, init savegame, running savegame, backup(!) savegames, maybe some auto-generated info pages automatically hosted by apache2 webserver (it's for server_info parameter containing info url), pak data, initial map, etc etc etc. Currently it's still nothing, but i'm putting together basic config parameters.

Having 2 server maps on Debian64, it looks like this (still in develop):
Code (bash) Select
semplar@semplar.net:~/simutrans$ sudo service simuserver status
[info] Simuserver: pak64-2... Not running.
[info] Simuserver: pak64.japan-1... Not running.
semplar@semplar.net:~/simutrans$


Possible states: No game data (place initial map, please), Ready to begin, Game stopped, Running.
Possible actions: start (makes sure server is running + starts cron watchdog to re-run it on crash), stop (stops server and watchdog), restart (stop+start), status (state+status info for each server). Watchdog also looks at savegame changes and makes backups every 2 minutes; it will keep backups in cascade manner: all 2min backups within a hour, all 20min backups within a day, all 2hour backups within a week and so on. I don't know exactly if it's safe to just copy savegame while game is running, so i'll have to find it out before doing such stuff.

When it'll be done, i gonna share that init.d script for people who will want to run it, too. Idk, gonna take some time.
Again, with paying more attention properties like pause_server_no_clients, which I used to set to "0". Server up ETA is 1-2 weeks, I surely need to test it first for savegame backup-ing stuff to not allow lose game data like I did few days ago.

Cheers.

Semplar

#4
Thanks to fast reply of "Trikky Transport" player and his link to network savegame file (usually saved on client), I've recovered server.

I also fixed few problems:
changed pause_server_no_clients to 0, so it will not pause if no one sits online.
changed autosave to 1 month in simuconf.tab, but I am still not sure if it will work, because in-game config, auto-save is set to once per year.
fixed revision: now it's r7175 (set up manually), source i've used is simutrans-120.0-src.zip from sf.net
right now, server is running bare pak64 with no addons (at least, client with foodchain addons being loaded complains about pack differences)

UPD: put server offline due to station overload bug (fixed by commit "FIX: convoi loading max waiting time"). Tried to use newer versions, but it ends up with 5-second desync. Developers! Your client<->server way of version check by revision is awful and doesn't work at all!

UPD2: server is online now and using r7248 version. Server info page: http://semplar.net/simt/simple/infopage.html , there are mirrors links for client binaries (nightly builds), hosted @ semplar.net. So you may need to download that binaries to get connected.

UPD3: as I see, there's no intermediary stations money hack is possible, so i'll work on disabling `avoid_overcrowded' option to make life easier.

UPD4: now `avoid_overcrowded' is set to 0, so your economy will not be paralyzed just because of one or few bottlenecks.

prissi

autosave is useless for servers. The game autosaves every time a client joins. Forcing a save will rather desync the game on the clients.

Semplar

#6
Anyway, i think it needs to be auto-saved periodically in some way, because there may be a case when count of connected clients will remain the same for some long period of time, and server will eventually go down in a hard way, like a power spike or issue. Whole game progress of that time period will be lost.

UPD1: server experienced non-scheduled shutdown. Idk why, but because there was no auto-restart script, server was down for some time. Sorry, now running with logging being enabled.

MobileRod

Will the server come back?
I started playing - seemed like I was the only active player then - and after some hours it has stopped...

DrSuperGood

Both the version used and pak set version used were non-standard as well as the rules. As such I do not think many people were interested in playing it. Especially since Fifty had some pretty good servers up until recently which had more fun rule set and less obscure pakset and client versions.

At this stage I would recommend he restart his server game if he plans to run a server at all, just so that new people can get into it.