The International Simutrans Forum

 

Poll

Are you going to use simutrans collaborative game website?

Yes, and I want to beta test it too
7 (19.4%)
Yes
9 (25%)
No
2 (5.6%)
Maybe
18 (50%)

Total Members Voted: 34

Voting closed: July 14, 2009, 10:51:04 AM

Author Topic: Collaborative game site  (Read 8218 times)

0 Members and 1 Guest are viewing this topic.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Collaborative game site
« Reply #35 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 ...

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18581
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Collaborative game site
« Reply #36 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.

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: Collaborative game site
« Reply #37 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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18581
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Collaborative game site
« Reply #38 on: July 07, 2009, 08:06:08 AM »
Gerw,

thank you very much for that advice :-) Should be all right, then.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Collaborative game site
« Reply #39 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 ...

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18581
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Collaborative game site
« Reply #40 on: July 07, 2009, 10:25:55 PM »
Ah, thank you. Where should I avoid using it?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Collaborative game site
« Reply #41 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.

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: Collaborative game site
« Reply #42 on: July 08, 2009, 11:35:22 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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18581
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Collaborative game site
« Reply #43 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Collaborative game site
« Reply #44 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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18581
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Collaborative game site
« Reply #45 on: July 08, 2009, 08:25:58 PM »
Ahh, I use ticks in any case. Thank you for the information :-)

Offline Matthi205

  • *
  • Posts: 107
  • Elvish Marshal of the human Wesnothian Army
Re: Collaborative game site
« Reply #46 on: July 09, 2009, 01:27:16 PM »
Thank you,Igor!You made what I wanted!(In some way you don't understand) ;D