News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Network suggestion - Automatic savegame naming

Started by Ashley, January 02, 2011, 12:33:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ashley

Currently in network mode (e.g. running Simutrans as a server) the game is automatically saved to a file called "server-network.sve" in the main Simutrans folder. This means that you can't run more than one server instance from the same set of files, which is kind of annoying if you want to run multiple server maps (e.g. one for pak64, one for pak128) without duplicating all the files. Would it be possible to either:

a) allow the location of this file to be specified on the command line, e.g. -savefile
b) Prepend the name of the base savefile from the -load command to the name of the network autosave file, e.g. if you use the -load flag with a file called "network1.sve" the autosave will be called "network1-server-network.sve"

I'd swing more in favour of the slightly more automatic option b, since in cases where the game isn't already saved you can use the behaviour as it is now.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

jonasbb

You can run at least two servers.

You have to start one normal and the other with -singleuser

Then they use different save files and locations.
Maybe you can run with this method as many servers as you can, if you start all with -singleuser because all should save the file in their exe folder.

Ashley

That's what I'm doing at the moment, but it requires having multiple copies of the game in order to run multiple servers, which is a bit of a headache for maintenance (not to mention being quite untidy).
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi

Imho, using the port number (which must be unique) seems most sensible. This would also work with automatic recovering after crashes, as the port number will staty the same.

Ashley

I just noticed that this has been implemented, very useful change and will simplify server maintenance a lot, thanks Prissi :)
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.