The International Simutrans Forum

Community => Community Discussion => Randomness Lounge => Topic started by: Nathan Samson on June 14, 2009, 10:43:48 AM

Poll
Question: Are you going to use simutrans collaborative game website?
Option 1: Yes, and I want to beta test it too votes: 7
Option 2: Yes votes: 9
Option 3: No votes: 2
Option 4: Maybe votes: 18
Title: Collaborative game site
Post by: Nathan Samson on June 14, 2009, 10:43:48 AM
Hi all,

I was thinking to create a collaborative game site, where people can play collaborative games. All such games were previously played by on this forum (or even by email), which was not very handy to manage and was cluttering the forum (or your inbox). My idea would be to give you a simple interface were each game participant can checkout the game, and from that moment nobody could download the savegame anymore until he checks back in.

Other possible features:
* Include a tracking system were people can negotiate about line connections, ask the game admin to add public stations, ...
* Open the save file and check for the date, so that one is printed too (and if it the timespan the player played is longer than a defined maximum the game is rejected)
* Open the save file and extract statistics (the one you can see now in the money window) so people can browse their (and others) stats until > 12 game months back

I want to write this system (if their is any need for it, because it has been a long time since collaborative game was played) in Ruby on rails, so if anyone wants to join in he/she is welcome. The problem is that it is hard to find any not to expensive hosting for it.

Any comments?

(External vote removed) (I couldn't  see how to add a poll to this post, maybe I'm not allowed to)
Title: Re: Collaborative game site
Post by: VS on June 14, 2009, 10:52:10 AM
Added the poll for you. Yes, only higher powers can call upon the wonders of democracy ;)

The idea is good. I am looking forward to this...
Title: Re: Collaborative game site
Post by: vilvoh on June 14, 2009, 11:07:25 AM
I support it. It's a good way to interchange experiencies and create community. About the hosting, perhaps we might host it at community servers..
Title: Re: Collaborative game site
Post by: LeifInge on June 14, 2009, 11:57:16 AM
Hi, this idea sounds cool! And I would love to participate!

My only concern is that it would be better to somehow connect (or even better: integrate!) this to the forum. The comunity isn't bigger than that we should try to stay in one place.

There is allready to much development discussions compared to gameplay discussion on this forum. For many new players the forum is the most important place to get information, and therefore I think gameplay discussions is important to recruit more players! The developement discussions is important, I'm not saying they are wrong in any way, the problem is the lack of gameplay discussion. I've tried to do something with it with my story and challenge, but i would love to see even more gameplay discussion on the forum!

A collabrative game, where the discussion takes place on this forum - but with the features you describe to solve the challenges on distributing the savegames etc., could be an important contribution to have more gameplay discussions!

I hope you see what I'm saying! I don't want to talk bad about your project, it sounds great, but I would love to see a good connection to the forum.
Title: Re: Collaborative game site
Post by: Isaac Eiland-Hall on June 14, 2009, 08:29:36 PM
I'm pretty sure this is the type of thing we'd like to officially host... although since hosting is not just my baby anymore, I can't be the final authority... ;-)

Ah... but as I have a decent server again (I"ve been hesitatnt to point this out after all the trouble I caused-- but I really was in dire straits when the crisis happened; now that I'm doing internships, I'm not poor anymore -- well, not AS poor...).... long story short -- if it doesn't work out on the official Simutrans server, I can see if I can host it on mine -- I host [ simutrans [dot] us (site down, do not visit) ] currently...

Not sure about Ruby on Rails -- what's needed server-side for support? I assume that's server-side -- I know PHP and Python, haven't played with RoR...

I'm excited to hear about the custom-written idea -- it truly was a bit kludgy on the forum -- mainly a pain for those *not* involved, I think...

If the custom thing doesn't end up working out (though I hope it does) -- perhaps a separate forum installation would serve... but the custom-written software idea sounds better :)
Title: Re: Collaborative game site
Post by: VS on June 14, 2009, 08:54:06 PM
The site suggests that Rails talk to server through CGI... I haven't ever touched that stuff and can't tell you anything else.

I'm looking forward to the finished app! :)
Title: Re: Collaborative game site
Post by: Isaac Eiland-Hall on June 14, 2009, 08:59:31 PM
Ah... I hate CGI. But then again, I won't be having to deal with it. hehehe

But CGI still implies server support -- but IIRC, it's easier to set up - instead of apache having to handle it, apache lets the system handle it... heh. Much easier...
Title: Re: Collaborative game site
Post by: Nathan Samson on June 14, 2009, 09:19:29 PM
Preferred way for hosting Ruby on rails is by Phusion passenger (aka mod_rails) so its just an apache extension to setup. Depending on the distro of the server it could be easy or slightly less easy ;)

@LeifInge: So what you suggest is (as I understand correctly) is that that story of the collaborative game should be posted on the forum? Of course this could be done very easily.
As you pointed out the hard stuff to manage a collaborative game (checking out etc) could be done by the website, and the fun stuff (also for others) can be done by the forum.
Title: Re: Collaborative game site
Post by: LeifInge on June 14, 2009, 10:21:17 PM
Yes, the story and most of the discussions should be posted on the forum, IMHO. I think this looks very interesting!
Title: Re: Collaborative game site
Post by: prissi on June 15, 2009, 09:45:17 AM
A collaborative version of simutrans is very simple, since the loading/saving routines over the network work already. Just some usermanagement is needed and it would be read. Probably less than a week to work.
Title: Re: Collaborative game site
Post by: Nathan Samson on June 15, 2009, 12:53:20 PM
Quote from: prissi on June 15, 2009, 09:45:17 AM
A collaborative version of simutrans is very simple, since the loading/saving routines over the network work already. Just some usermanagement is needed and it would be read. Probably less than a week to work.

You are thinking to improve the ingame user interface to play network games? If it is only that easy to do it is very well possible, but then their is no real need to do a complete site for it is it?
Title: Re: Collaborative game site
Post by: VS on June 15, 2009, 01:00:56 PM
What prissi speaks about is most likely only network i/o instead of disk.
Title: Re: Collaborative game site
Post by: Isaac Eiland-Hall on June 15, 2009, 01:18:11 PM
Right - "network" game would be multiple simultaneous players.

"Collaborative game (with networking support)" would load from, and save to, network. :)

Reason for terminology is remembering back to Windows 95, then Windows 95 with Networking Support... hehe... so network games would be the equivalent of XP? Analogy breaks down..
Title: Re: Collaborative game site
Post by: vilvoh on June 15, 2009, 01:47:20 PM
Well, the optimal way play a collaborative game would using could computing approach. That would be great! can you imagine it? ;D
Title: Re: Collaborative game site
Post by: Nathan Samson on June 15, 2009, 04:45:11 PM
But what can the in-game network feature do? It just loads the file from the network/internet instead of from the HD?

So it could just be another frontend for the site or not (with the site having more features like "ticket" system, ...)?
Title: Re: Collaborative game site
Post by: IgorEliezer on June 15, 2009, 04:52:42 PM
Ban me if I deserve:

I think it's a good moment to do the first tests of multiplayer mode.

*runs*
Title: Re: Collaborative game site
Post by: VS on June 15, 2009, 07:49:35 PM
First there must be some. Prissi did some preliminary work, iirc enabling rdwr() for sockets, so that means Simutrans internal objects can be transferred from network (?). That alone would be actually a very important prerequisite for anything else...
Title: Re: Collaborative game site
Post by: prissi on June 15, 2009, 08:55:47 PM
It is only saving from server to client, as the effort for collaborative game is nearly identical to that of real network games. In such a way also the server would handle all password, without tricks to hide them from clients.

For anybody who wanted to have a go: I updated the network patch.
Title: Re: Collaborative game site
Post by: IgorEliezer on June 15, 2009, 09:58:17 PM
When I said:

Quote from: IgorTekton on June 15, 2009, 04:52:42 PM
I think it's a good moment to do the first tests of multiplayer mode.

I was not speaking of "a fully supportable multiplayer mode" but about "some multiplayer features could be tested, ones that can be tested".
Title: Re: Collaborative game site
Post by: jamespetts on June 15, 2009, 10:46:10 PM
For things such as the network patch, there are great advantages to using Git over SVN...
Title: Re: Collaborative game site
Post by: Severous on June 16, 2009, 10:22:07 AM
Hi

I'm not interested in multiplayer. I like to spend hours on my games and hate the thought of real time fast and furious gaming on-line to timetable.

Very interested in collaborative/competitive play.  A game/scenario we save and swap around, using email if necessary.  Discussion and screenshots on the forum.  Did a lot of that a few years ago in a game called 'Locomotion' (plus several other games including RRT2, RTW, Tropico etc)

So yes I may use a collaborate game site..no not a multiplayer site.

If we were to use the German simutrans file hosting for save games and images we could let them know and invite them to participate.  Niche games like this need all the game players they can get to make collaborative games work.

Its a set of 'fair rules' the community will play to that we need more than a special web site.

sev
Title: Re: Collaborative game site
Post by: jamespetts on June 16, 2009, 10:48:48 AM
Ahh, a real-time online multiplayer version of Simutrans need not be "fast and furious": given the relatively sedate pace of Simutrans, it could easily be done in such a way as not to require short intensive timetabled bursts.

The reason for that is that, given the pace of Simutrans, not all players need to be active at the same time, even if they could be. There are two possible ways of doing it, both variations on the same theme. The first is that the server would run the game constantly, but automatically pause it whenever there were 0 players logged in. Players could then tend to their transport network at leisure in a world in which other players could log in and log out at will. Provided that the map is big enough to give all players a chance to build a network of their own to start with without direct competition from other players (the public service player might enforce a zones rule to limit initial competition as I have noticed from previous collaborative games), there will be no great problem caused by a player's company being left alone without being tended over a period of time.

The other variation would be that players would agree a time range in which they are most likely to be active (e.g., 1800 - 2300 GMT), and the server would unpause the game at that time, and pause it at other times (and perhaps prevent players from building anything outside those times). The advantage of that method is that it would make time progress at a predictable rate (thus evening out any big differences in the total time that different people play to some extent), but it would be less flexible than the above approach.

In either version, any player who loses interest could simply allow another player to take over her/his network; alternatively, two or more players could share a single transport company, and log in in rotation. The game might even be altered to allow two people to be operative as the same player at once in such cases. Furthermore, in the case of any abandoned players, the public service player (administrator) might have the power to allow a new player to take over the inactive player's transport network. Players who go bankrupt might be liquidated or taken over by the public service player (or some combination of the both), and new players might be allowed to join the game and found a new transport company long after the game has started (with interesting possibilities for shaking up established and possibly complacent operators - just as in reality ;-) ).

A possible future development of that system would be to allow players, when inactive, to appoint an AI manager to undertake the mundane maintenance tasks, but not the building of new infrastructure. Depending on settings, the AI manager could suspend unprofitable services, or reduce the number of convoys serving unprofitable services, increase the number of convoys serving overcrowded lines, and adjust the wait time/minimum load at stations. The code for this AI could be adapted from the main AI code, with added constraints.

All of those measures combined would allow people to play multiplayer online games of Simutrans in much the same, slow paced style as works well with the current single player system, and would enable very long timescale games (e.g., 1800 - 2050 at 19 ticks per month) to take place smoothly without the problems that often occur with timescales or player entropy. In addition, I do not imagine that they would take any particularly difficult work to implement in the code, compared to the effort required to implement multiplayer itself.

This idea of having a multiplayer game as something that sits in the background progressing at its own slow pace with people able to dip in and out of it at will is something being developed by MonteCristo in their pioneering Cities XL (http://www.citiesxl.com/) game, due for release this autumn, and has much to recommend it.

Edit: Returning to the original topic of the thread, it would indeed be very useful to have a multiplayer hub for simutrans (perhaps http://multiplayer.simutrans.com ?). All currently open games could be listed, along with the address of the server and information on how to join a game, and people could have profiles and post pictures of their transport networks in the multiplayer games. Perhaps there could even be a way automatically to export screenshots and/or statistical data from ongoing saved games (which would be archived when they eventually finish) onto a part of that website; perhaps people could log into the website, for example, when on holiday to find out how their transport network was doing when left in the hands of an AI manager, or if deputised to somebody else for a week. This idea, too, incidentally, comes from Cities XL, and again should not require a great deal of technical sophistication to implement at a basic level.
Title: Re: Collaborative game site
Post by: gerw on June 16, 2009, 06:22:36 PM
Quote from: prissi on June 15, 2009, 08:55:47 PM
For anybody who wanted to have a go: I updated the network patch.
Ärm, network.cc is missing.

Edit: I've tried the network.{cc,h} from the previous commit but it doesn't work. When loading a game via network it ends up in network_check_activity with return INVALID_SOCKET.
Title: Re: Collaborative game site
Post by: Matthi205 on June 21, 2009, 10:50:24 AM
Why don't you just make the forum idea?It's much easier to realize and it does not take the hosting money for another server. ;)
Title: Re: Collaborative game site
Post by: Isaac Eiland-Hall on June 21, 2009, 08:05:49 PM
There would be no hosting money for another server; either of the existing servers would work fine.
Title: Re: Collaborative game site
Post by: Matthi205 on June 22, 2009, 03:07:49 AM
Okay,but I sense that there is a lot of work to be done till this multipalayer-server is up and running and simutrans is optimized for it,so please make a correct subforum for multiplayer games for normal players (who don't speak C++ every day)
Title: Re: Collaborative game site
Post by: Isaac Eiland-Hall on June 22, 2009, 04:45:12 AM
No, I will not do so. As you might gather from earlier in this thread, one was created previously, but it was bothersome to the forum at large, so that was not recreated when the forum was moved. Further, this thread is all about creating an alternative to that solution, which was previously tried and discarded as unworkable.

Also, in regard to 'normal players (who don't speak c++) -- nobody is expecting or asking players to write code... so I'm not sure what you're getting at there. Sorry if I misunderstand. :)

(For the record, I think I was the main one behind creating a board for collaborative games -- I have a well-deserved reputation for supporting more boards - I like the organization thereof. But others don't -- and let me state that I don't have a problem with that. It's all about compromise, and trying to create the best environment for the larger community :) )
Title: Re: Collaborative game site
Post by: Nathan Samson on June 24, 2009, 02:23:18 PM
Isaac you are saying: "Further, this thread is all about creating an alternative to that solution which was previously tried and discarded as unworkable."

So you seem not all that positive about the idea? (Or maybe the previous try-out was just not planned/executed very well?) - BTW I did not know about this idea could you point me to its discussion (if it still exists?)

jamespetts: Your idea is creating a concurrent collaborative simutrans (users playing at the same time if possible): Although I think this is a nice idea I don't think it will be done in the next coming year(s), since it will add a lot of new problems to the simutrans code (What if 2 players build something at the same place, the server has to "merge" this and sent changes to both clients, ...)


So I would like to work-out my idea a little more (to get some feedback):

Use-case

  • Users subscribe to a game
  • Once all slots are filled the collaborative game starts
  • Typical game-flow:

    • Player one checks out, others cant checkout the game anymore
    • Player one checks back in, others can checkout now
    • Player two checks out, ...
    • Player two checks in again...
    • Player three checks out
    • He decides that he had doen some bad moves and he don't want to checking, he checks back in without uploading, others can checkout again
  • Once a goal is reached (number-of years played, one has a net-wealth of X, all other players are bankrupt, ...) the game ends

The checking out could be done on two places:
* from the main site (the user should put the receiverd .sve file in his simutrans directory) (simple to implement)
* From within simutrans itself: simutrans connects to the site with HTTP, and receives some sort of computer readable file (XML?) if he is able to checkout, and when and by whom it was checked out. (slightly harder to implement, maybe more practical in use)

Similar checking back in could be done from these 2 places.

I think this can be finished in 1 or 2 weeks, more advanced features like "ticket tracking, extracting statistics, creating rules who can cheking/checkout, ..."

I'll explain this last feature:
I want to add some rules about who can checkin/checkout on a given moment. Some rules can be:
* Player 1 was the last player to Check in, he can not checkout anymore until he waits X hours
* One has to checkin again within X hours (real-live) and within X months (game time)
* If one player is in debt, and loosing money (negative operating profit) others can not checkout
* The first X checkouts a player can not checkout more than one time (where X is the number of players)
* Insert your crazy (or not so crazy) idea here

It is obvious that for some of this rules data should be extracted from the game.
Title: Re: Collaborative game site
Post by: Isaac Eiland-Hall on June 24, 2009, 02:32:49 PM
Quote from: Matthi205 on June 22, 2009, 03:07:49 AM
please make a correct subforum for multiplayer games for normal players (who don't speak C++ every day)
Quote from: Isaac.Eiland-Hall on June 22, 2009, 04:45:12 AM
No, I will not do so.

I didn't quote because my post was directly under his.

This topic is all about creating an alternative to posting on a board. :)

Meanwhile, what you laid out sounds great. I suggest two possibilities (although I might have misread, so forgive me if so):
- Possibility to start a game and have players be added later (i.e. don't have to wait until all slots filled, optionally)
- Open-ended gameplay (again, a possibility in addition to number of years, financial goals, etc)

This all sounds really sweet :D
Title: Re: Collaborative game site
Post by: Nathan Samson on June 24, 2009, 02:54:50 PM
Open-ended game play: I thought to add this but I don't think it is realistic, since after X years a (collaborative) game tends to be boring, but ofc if people really want it we can do that.

Free-start: I didn't think about this, but yeah it sounds ok, still a game has to have a starting condition (like minimum 2 players)
Title: Re: Collaborative game site
Post by: prissi on June 24, 2009, 07:58:19 PM
Internally, an online version is planed within the game for a long time. Still some tools are missing, but nearly everything can be transferred to a server, and any important command will be executed only after recieved from the server. If two people built at the same time, the second will just recieve the boing for failure. Not too likely to happen though.
Title: Re: Collaborative game site
Post by: Nathan Samson on July 06, 2009, 04:24:21 PM
A very rough first version is ready

* I still don't have some server access => Isaac you wanted to help out?
* The layout is very basic so if some webdesigner could help me out with this (I can code the CSS, bug I'm not a designer...)
* I'm still wondering what license to use:

AGPL (Affero GPL => users of the site should be able to download the source: the site is opensource, but if anyone forks it he is obliged to release the source too:
I don't know if any other licenses have the same protection...
Title: Re: Collaborative game site
Post by: Isaac Eiland-Hall on July 06, 2009, 04:31:16 PM
Whhops. I'm in that mode where I miss things sometimes... Will PM you with details shortly. Sorry about that! :|
Title: Re: Collaborative game site
Post by: prissi on July 06, 2009, 08:56:58 PM
Actually also the network mode is progressing nicely. Im am close to have both in sync and allowing building at the same time.
Title: Re: Collaborative game site
Post by: jamespetts on July 06, 2009, 09:12:26 PM
Promising! Tell me - have you any idea how easy that it would be to make Simutrans-Experimental work with the network mode? How much does the network mode depend on the particular implementation of things as they are at present - or does it just depend on what information is loaded/saved in the rdwr() routines?
Title: Re: Collaborative game site
Post by: prissi on July 06, 2009, 09:27:31 PM
Since only same versions (that most likely will include same release number!) would be compatible on network games. Otherwise convois will be arriving in different order and so on. But same versions of SE could work too, if you have not used the random counter in the worng places ...
Title: Re: Collaborative game site
Post by: jamespetts on July 06, 2009, 09:40:27 PM
Ahh, yes, I realise that people playing Simutrans-Experimental could not join a game of people playing Simutrans-Standard, and vice versa. Where would be the wrong places to use the random number counter, may I ask? Simutrans-Experimental does use it in one or two places (mainly relating to passenger routing in the step_passiagere() method in simcity.cc) where it is not used in Simutrans-Standard.
Title: Re: Collaborative game site
Post by: gerw on July 07, 2009, 06:36:29 AM
It should be save, to use the random counter in the step-functions, but not in the sync_steps.
Title: Re: Collaborative game site
Post by: jamespetts on July 07, 2009, 08:06:08 AM
Gerw,

thank you very much for that advice :-) Should be all right, then.
Title: Re: Collaborative game site
Post by: prissi on July 07, 2009, 09:28:35 PM
It will be also save to use it in the sync_step, since otherwise city cars could not drive around ...
Title: Re: Collaborative game site
Post by: jamespetts on July 07, 2009, 10:25:55 PM
Ah, thank you. Where should I avoid using it?
Title: Re: Collaborative game site
Post by: prissi on July 08, 2009, 11:16:27 AM
You should avoid any call to a time function in the program. Only use int_check and the cooperative mechanism will do fine. It will run similar to fast forward mode, i.e. with a predefined time per sync_step, no matter waht actual time was spend. If you have routines, that take very long, it will block the progress of the program during that time. (THus I fear this will have problems when constantly schedule updates are needed, because ten people simulataniously update their networks.)

But I would actually wait for the implementation of that. Currently synchronising is not working yet.
Title: Re: Collaborative game site
Post by: gerw on July 08, 2009, 11:35:22 AM
Quote from: prissi on July 08, 2009, 11:16:27 AM
THus I fear this will have problems when constantly schedule updates are needed, because ten people simulataniously update their networks.
For this one could maybe use distributed computing. So every player reroutes only his goods and the information is distributed afterwards (=> higher network traffic but less computation time). This could also work for the routing of convoys. But this is maybe difficult to implement.
Title: Re: Collaborative game site
Post by: jamespetts on July 08, 2009, 08:05:33 PM
Prissi,

what do you mean by "time functions" here? Do you mean functions that get a time value? Simutrans-Experimetnal does use those functions to determine how long that goods/passengers have been waiting, and also to measure average speed. Would this go wrong with the network mode? Would it be possible for the method to check the time from the server? If so, how would that be affected by ping times? (Would one, perhaps, call the time from the server, then ping the server thrice, and deduct the average of the three pings from the time - or would that put too much strain on the network?) I should very much appreciate views on how to make the time-related functions in Simutrans-Experimental network compatible.
Title: Re: Collaborative game site
Post by: prissi on July 08, 2009, 08:23:09 PM
I would always use ticks. THose are save. All other means will fail when speeding a game up or so.
Title: Re: Collaborative game site
Post by: jamespetts on July 08, 2009, 08:25:58 PM
Ahh, I use ticks in any case. Thank you for the information :-)
Title: Re: Collaborative game site
Post by: Matthi205 on July 09, 2009, 01:27:16 PM
Thank you,Igor!You made what I wanted!(In some way you don't understand) ;D