Infrastructure sharing 2.1.1

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Hirundo
Transport Coordinator
Transport Coordinator
Posts: 298
Joined: 27 Jan 2008 13:02

Infrastructure sharing 2.1.1

Post by Hirundo »

30-12-2009: Release of IS2.1.1

Version 2.1 contained some fatal bugs, caused both by an issue in trunk and several issues in IS. To address these problems we release IS 2.1.1.

Binaries for all platforms are available at http://bundles.openttdcoop.org/is2/IS2.1.1/, thanks to the magic of the compile farm.

Changes in 2.1:
  • It is no longer possible to set individual settings.
  • Code rewritten and simplified.
Changes in beta 5: Lots of bugfixes, see http://www.tt-forums.net/viewtopic.php? ... 40#p831297.
Changes in beta 3:
  • More GUI rewriting, the sharing settings window is now using nested widgets only! Consider it a small step for a man, but a giant leap for widget-kind. To the user, the most noticeable effect is that the columns resize a bit more nicely.
  • The settings 'Enable IS' and 'Allow individual settings' have been merged into a single three-state setting.
  • Make it possible to prevent companies in debt from paying sharing fees. This blocks the most important form of possible MP exploitation.
  • You can now access station tracks, even when sharing of stations is not allowed. (suggested by JamieLei)
  • Some advanced YAPF hacking (tm) which should prevent PF-related desyncs (differences between client and server caches)
  • Many bug/style fixes and updates to stay compatible with the ever-changing trunk. beta 3 is synced op to svn r16532
Changes in beta 2:
  • Total rewrite of the sharing settings window. It is now able to scroll, resize, nest its widgets, adjust to font height and it requires much less screen area.
  • When sharing is enabled, the 'routes' tab of the small map window shows accessible and non-accessible railway tracks in a different colour.
  • Buying vehicles in others' depots is now possible if your vehicles can enter the depot.
  • Plenty of bugs / style fixes and improvements.
A patch file is attached below. You can also checkout the source using mercurial. The repository URL is http://mz.openttdcoop.org/hg/is2/. If you want to get the source of beta 2 instead of the 'IS trunk', use the tag 'IS2.0-beta2' Binaries are available at http://mz.openttdcoop.org/is2/bundles/. They have been built using the compile farm, which TrueBrain generously allowed us to use.

Enjoy playing and testing, and don't forget to join the OpenTTDCoop dev server!

Original post:

After many hours of coding, testing and bugfixing we are pleased to announce the release of Infrastructure Sharing 2.0 beta 1 This is a milestone in the history of this patch, and we considered it a good enough reason to open a new topic about it :D

Main features and changes:
- A total code rewrite. You may hardly notice it while playing, but basically the patch was rebuilt from the ground up. This resulted in much better, cleaner code.
- If a company is removed, goes bankrupt or disables sharing, all vehicles on its infrastructure will be sold.
- Buying and selling vehicles in others' depots is not possible, although autoreplace will work. Only trains have a separate switch to control depot access. For other vehicle types this was not deemed necessary and depot and station access are combined. (note: internally depot and station access are separate flags, so this behaviour can easily be changed)

A test server is running at mz.openttdcoop.org:3981. The corresponding IRC channel is [url=irc://irc.oftc.net/#openttdcoop.dev]#openttdcoop.dev[/url]. For discussions regarding the code, the [url=irc://irc.oftc.net/#openttdcoop.devzone]#openttdcoop.devzone[/url] channel is available.

We think this new patch has better chances of getting into trunk at some point. This will be very unlikely before the release of 0.7.0, though. We do hope that this patch will be reviewed in the not-too-distant future, so we can make improvements and fixes where needed. Then, when trunk inclusion becomes a more serious option, we plan to split the patch into separate, smaller parts to facilitate a more thorough review.

The patch file can be found here, in both svn and hg format:
http://bundles.openttdcoop.org/is2/trunk-patches/
Last edited by Hirundo on 31 Dec 2009 00:35, edited 14 times in total.
Create your own NewGRF? Check out this tutorial!
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infratructure sharing 2.0 beta 1

Post by planetmaker »

Following up on this, I compiled a bundle for Mac Intel OS-X Tiger (10.4) which can be used to play on our dev server:
Attachments
OpenTTD-IS2.0beta1.tar.gz
gziped tar archive of the OpenTTD bundle
(3.77 MiB) Downloaded 947 times
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Infratructure sharing 2.0 beta 1

Post by Aali »

Win32 bundle
Attachments
openttd-is2.0beta1-win32.zip
(1.86 MiB) Downloaded 1288 times
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Infratructure sharing 2.0 beta 1

Post by Ammler »

Image

Edit: old content cleaned
Last edited by Ammler on 09 Oct 2009 00:41, edited 9 times in total.
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Infratructure sharing 2.0 beta 1

Post by Conditional Zenith »

Swallow wrote: - If a company is removed, goes bankrupt or disables sharing, all vehicles on its infrastructure will be sold.
That seems an obvious vector for abuse. A lets B use their track, and then at an annoying time disables sharing meaning B now has to rebuy lots of trains. Has teleporting the trains to the owner's nearest depot been considered?
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Infratructure sharing 2.0 beta 1

Post by Aali »

Have you considered how much you can abuse someone elses infrastructure in this patch even with the proposed change?

We'd rather have people trusting each other than a bunch of technical solutions.
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Infratructure sharing 2.0 beta 1

Post by Conditional Zenith »

I have somewhat. All cases of the vehicle owner abusing the track owner's network should be solvable by disabling sharing (am I missing something?). If the track owner abuses the vehicle owner's vehicles (for example deliberately getting them stuck), that is harder to solve, I agree (maybe sharing can be ended by either party).

Anyway, you speak about trust and technical measures as though they are mutually exclusive. If people trust each other, then none of this matters. If people don't trust each other then technical solutions usually help. I can understand if you would rather spend coding effort on other areas (I would too if I was coding this), but it would be a shame to see this feature become something that is only safe to enable on a server with your trusted friends.
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Infratructure sharing 2.0 beta 1

Post by Aali »

Well, it is certainly safe to enable even if you don't trust everyone.

You do have a lot of control already with individual settings turned on, and we do implement technical solutions where it doesn't make things more complicated than they have to be. (Teleporting vehicles is not a standard feature in OTTD, we have to implement that, selling on the other hand is trivial)
dihedral
Tycoon
Tycoon
Posts: 1053
Joined: 14 Feb 2007 17:48

Re: Infratructure sharing 2.0 beta 1

Post by dihedral »

how about just forbidding foreign trains from entering the tracks, and forbidding goto orders.
then those foreign trains already on the companies tracks can continue their journey until they have reached their own tracks again.
the company that disables sharing while foreign trains are on its tracks can of course build tracks to 'force' trains to leave sooner.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infratructure sharing 2.0 beta 1

Post by planetmaker »

dihedral wrote:how about just forbidding foreign trains from entering the tracks, and forbidding goto orders.
then those foreign trains already on the companies tracks can continue their journey until they have reached their own tracks again.
the company that disables sharing while foreign trains are on its tracks can of course build tracks to 'force' trains to leave sooner.
That's no solution as there might be no reachable own tracks. And in the light of non-complex solution (and re-using existing code, keeping the patch lean and small), we decided to sell them. Players have a (by default) two months notification period.
deepblue2k8
Engineer
Engineer
Posts: 44
Joined: 06 Sep 2008 12:41
Location: Hamburg, Germany

Re: Infratructure sharing 2.0 beta 1

Post by deepblue2k8 »

Can teleporting not be archieved by cloning the trains in a nearby depot and selling them afterwards? This shouldn't need any special implementation and the money loss for cloning and selling can be seen as a penalty fee for not moving your trains off the competitors tracks :-)
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Infratructure sharing 2.0 beta 1

Post by Aali »

Sure but we don't want to force this on the player. If you want to clone your trains, you have atleast 2 months (default settings) to do it before they get sold.
Nimugp
Engineer
Engineer
Posts: 29
Joined: 08 Mar 2007 13:37

Re: Infratructure sharing 2.0 beta 1

Post by Nimugp »

Aali wrote:Win32 bundle
it doesn't work for me :| I can see the sharing options and all, and the game plays fine, but for some reason I can't select my trains to go the opponent stations (PS: And I DID check that the opponent and me allowed sharing)

I tried it both offline, trying to get to the station of admiralAI (but when pressing 'go to' on their station, nothing happend) and also tried it online on the openttdcoop..... on the openttdcoop I noticed some companies that were sharing their tracks and stations, but for me the same problem, I just couldn't select the opponents station.....

I used the Win32 bundle you posted, and didn't change a thing, so am I doing something wrong, or doesn't it work properly?????



Never Mind, I missed the fact that you will have to allow the companies as well, just spotted it :wink:
deepblue2k8
Engineer
Engineer
Posts: 44
Joined: 06 Sep 2008 12:41
Location: Hamburg, Germany

Re: Infratructure sharing 2.0 beta 1

Post by deepblue2k8 »

Aali wrote:Sure but we don't want to force this on the player. If you want to clone your trains, you have atleast 2 months (default settings) to do it before they get sold.
Yes, so if a player decides to stop track sharing, do I have to order my trains to a depot, hope that all trains will get to a depot of my company (how do I avoid that they will end up in a depot of a competitor anyway?) in time and let them wait there the remaining time until the disabled tracksharing is in effect so they don't accidently get on the competitors track again?
I just dont want to get a heart attack, because I have to check if any of my e.g. 200+ trains are on any wrong track in 2 month :-).

So in my opinion a safety net like automatically cloning those trains would be a nice additional option for the tracksharing dialog?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infratructure sharing 2.0 beta 1

Post by planetmaker »

deepblue2k8 wrote:So in my opinion a safety net like automatically cloning those trains would be a nice additional option for the tracksharing dialog?
I think that poses more problems than it solves. First, if you trains have to leave some tracks due to discontinued cooperation - then you need to give them new orders at least, and they usually become obsolete. Further, cloning them, may cost A LOT of money - more than you may have, thus it may fail or send you into bancruptcy, especially as those trains won't find a valid route anymore. So... personally I don't see a use in those trains anyway. Getting fresh new ones for another task is in most cases simpler.
deepblue2k8
Engineer
Engineer
Posts: 44
Joined: 06 Sep 2008 12:41
Location: Hamburg, Germany

Re: Infratructure sharing 2.0 beta 1

Post by deepblue2k8 »

Ok good point, I did not think of trains, that have stations of competitors in their order list. But trains that only use my stations and the competitors tracks aren't affected of that. I would only have to rebuild some (or a lot of) rail to get them running again.
But there was another question hidden in my message:-). In the event that I want to keep my trains by sending them to a depot, how do I get my trains to go to _my_ depots only instead of anybody else's?
Hirundo
Transport Coordinator
Transport Coordinator
Posts: 298
Joined: 27 Jan 2008 13:02

Re: Infratructure sharing 2.0 beta 1

Post by Hirundo »

deepblue2k8 wrote:But there was another question hidden in my message:-). In the event that I want to keep my trains by sending them to a depot, how do I get my trains to go to _my_ depots only instead of anybody else's?
Personally, I always keep a service to depot order in my order lists, which normally services trains in one of my own depots. Should I have to get all trains back in a hurry, I can change the order quickly to a 'stop in depot' order and all trains will stop there. In case you don't need or don't want the service order, you could even use a conditional order to skip it.

For your information, the default notification period is 12 months. You can change this to anything between 0 and 120.

Of course, if you play with people you trust, none of this really matters.
Create your own NewGRF? Check out this tutorial!
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Infratructure sharing 2.0 beta 1

Post by Aali »

deepblue2k8 wrote:Yes, so if a player decides to stop track sharing, do I have to order my trains to a depot, hope that all trains will get to a depot of my company (how do I avoid that they will end up in a depot of a competitor anyway?) in time and let them wait there the remaining time until the disabled tracksharing is in effect so they don't accidently get on the competitors track again?
You don't have to send your trains to a depot to clone them.
Eddi
Tycoon
Tycoon
Posts: 8254
Joined: 17 Jan 2007 00:14

Re: Infratructure sharing 2.0 beta 1

Post by Eddi »

i want to throw a question in here, why is selling competitors's trains on bankrupcy a favourable solution over making the tracks "owner none" instead (unifying this with the behaviour of roads)
deepblue2k8
Engineer
Engineer
Posts: 44
Joined: 06 Sep 2008 12:41
Location: Hamburg, Germany

Re: Infratructure sharing 2.0 beta 1

Post by deepblue2k8 »

Aali wrote:You don't have to send your trains to a depot to clone them.
Of course, I know that. I just want my trains somethere put, if the tracksharing is discontinued. If they are safe there, I dont need to replace/clone them.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 7 guests