Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed May 23, 2018 11:13 am

All times are UTC




Post new topic  Reply to topic  [ 60 posts ]  Go to page Previous 1 2 3
Author Message
PostPosted: Fri Apr 04, 2014 7:28 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
Patch updated, version 9 (for OpenTTD r26405/1.4.X).
- removed the double-click-ends-line feature

_dp_ wrote:
when I place segment with autorail and then can't remove it with polyrail (in one click). It just jumps from one end to other
You can use drag-dropping to deal with this kind of problems, that's the point of this feature.
Firstly select proper snap point and line direction by moving mouse pointer (not clicking yet). Then press mouse button down and adjust length of the line by dragging.

_________________
:] don't worry, be happy and checkout my patches


Top
   
PostPosted: Wed Sep 03, 2014 8:41 am 
Offline
Engineer
Engineer

Joined: Wed Sep 03, 2014 8:34 am
Posts: 1
http://i.imgur.com/C5PS4Pd.png

This happens very often when doing diagonal lines. 90 degree poly turns when most servers doesnt accept 90 degree turns. Could there be an option or something to disable 90 degree poly turns?

//Saber @ Novapolis.net


Top
   
PostPosted: Mon Oct 13, 2014 7:46 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
Forbid 90-degree turns? What about 135 and 180 turns? Forbid too? The tool lets you to create any layout, even "impossible" one and making any restrictions is not a good idea.

You can:
- use drag-dropping (hover to choose right angle, press mouse button down and drag-drop to adjust line length)
- place the turn in two steps (firstly place few tracks of the first 45-degree turn, then place the rest)

_________________
:] don't worry, be happy and checkout my patches


Top
   
PostPosted: Sun Jan 18, 2015 3:33 am 
Offline
Director
Director
User avatar

Joined: Wed Dec 10, 2008 4:08 pm
Posts: 549
Location: tile 0x0000
Here a suggestion to give the thing a more natural feel.;-)
Polyline behavior stops when deleting track.
+
A click on existing track stops the polyline behavior.
See if you like it.


Attachments:
Stop_polyline_r27117.patch [1.29 KiB]
Downloaded 44 times

_________________
Chunnel , Distance between ships , Playing with Heightmaps , Signals tunnel , Waypoint air , Everest , Tunnel end
Top
   
PostPosted: Mon Jan 19, 2015 5:10 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
HackaLittleBit wrote:
to give the thing a more natural feel.;-)
That's quite laconic explanation. Could you give some rationale? What's the actual problem? What can we gain? Because I'm not getting it.

For now I can say that disabling polyline while removing tracks is not a good idea at all. With polyline you can easily remove tracks. No matter if a track is bended many times - removing it is just few clicks, without need of precise pointing.

_________________
:] don't worry, be happy and checkout my patches


Top
   
PostPosted: Tue Jan 20, 2015 4:22 pm 
Offline
Director
Director
User avatar

Joined: Wed Dec 10, 2008 4:08 pm
Posts: 549
Location: tile 0x0000
Ok here we go.
You are right I should have explained better.
I was trying your patch and I had some difficulties.
In order to explain better I needed some time to ponder.
I just show you in the picture one of the problems I encountered.

Image

I used the polyline tool (from now on PLT) to delete a piece of track.
After that I wanted to continue the line, as you can see in the second picture.
I was not able to do this immediately.
I first have to choose an other track building tool to tell the PLT were to start.
Even when I want to start at a random place the PLT keeps on insisting to start from the last ending point.
Sometimes painting half a map with polyline.;-)
This is just one example.

For me this is not desired behavior.
A noob to which I include myself should not get in panic when using the tool.
The tool is imposing too much its behavior on the player.

My patch stops the polyline when rail is removed or overbuild.
It was to show you a more gentile behavior.
A better way in my opinion is the moment an other track building tool is chosen or more explicit when the button
of the PLT goes up or disappears it should forget were it was.
It is not much effort to start a new round of polylining from a new, or from the last starting point.
Also the PLT could easily replace the autorail button.
It does the job much better.....

Hope this helps

Regards.


Attachments:
poly.png [87.94 KiB]
Downloaded 6 times

_________________
Chunnel , Distance between ships , Playing with Heightmaps , Signals tunnel , Waypoint air , Everest , Tunnel end
Top
   
PostPosted: Tue Jan 20, 2015 5:44 pm 
Offline
Engineer
Engineer

Joined: Sun Aug 29, 2010 10:29 am
Posts: 109
HackaLittleBit's suggestions make sense.

From my experience, when I connect track with PLT, I want it to ended. So currently I have to cancel it and launch it again. If it ended and became immidiatelly ready for new placement, it could be improvement I guess. This is also natural feature of printed circuit board routing programs.

As for delete, in some cases it would be good too, but sometimes I want to remove like one rail badly placed and continue from the removed position. If the tool ended, it would be unwanted. It's hard to distinguish which action players wants, so one direction has to be choosed and I think it's more logical the way it is.

I don't really agree that PLT imposes too much on the player. It is intuitive and easy to use. After laying one track, you will love it and never want to route rails the old way :-)


Top
   
PostPosted: Sat Feb 07, 2015 11:13 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
New version released.

HackaLittleBit wrote:
Even when I want to start at a random place the PLT keeps on insisting to start from the last ending point...
So it's all about making easier to decide whether to start a new line or to continue from previous one. I realize about the problem but I was not sure about how to design a "natural" algorithm that would cover all cases so I was sticking to a minimalistic solution. There are some goals I made:
- traditional autorail tool should be available as always was
- polyline tool should be available without messing in settings
- you should be always allowed to start a polyline from the point of the last placement
- you should be always allowed to start a new polyline
The last one was not well covered, yet. Lastly I figured out how to properly use double-clicking without troubles I had previously. This let me to move on and I designed a hopefully good system. From now on:
  • [01-improve-polyline-shape-computation]
    More natural shape computation (minor fix).
  • [02-move-polyline-snap-point-when-overbuilding]
    Polyline will follow overbuilt tracks too.
  • [03-pick-a-tile-to-snap-to-when-starting-new-polyline]
    When placing a new polyline, firstly you pick a tile to snap to (previously you had to place a track and the line was snapped to this track).
  • [04-start-new-polyline-when-double-clicking]
    When polyline tool is opened, double-clicking on a white-highlighted tile (not on a blue-highlighted tile) starts new polyline.
  • [05-choose-if-to-start-new-polyline-when-opening-the-tool]
    Allows to choose, while opening polyline tool, whether to start completely new line or connect to a previously built track. Start new line when clicking on the button or by CTRL+SHIFT+A. Connect when ctrl-clicking on the button or by CTRL+A.

Single diff having everything is available at the first page.
Patch queue with the changes is available below:


Attachments:
polyline_track_tool_v10_ottd_r27095-mq.zip [29.44 KiB]
Downloaded 39 times

_________________
:] don't worry, be happy and checkout my patches
Top
   
PostPosted: Sun Feb 08, 2015 4:57 pm 
Offline
Director
Director
User avatar

Joined: Wed Dec 10, 2008 4:08 pm
Posts: 549
Location: tile 0x0000
Ok, starts to look smooth.
Attached two small patches.
one is a proposal to for better behavior.(
adf88 wrote:
When placing a new polyline, firstly you pick a tile to snap to (previously you had to place a track and the line was snapped to this track).
Isn't that counter intuitive?
)
With that patch applied all rail buttons build rail when location is chosen, and button is pressed down and up.
For the PLT it will continue from there on.

Then I have a small bug for you.
Click polyline tool button, build small section and try to close the polyline tool button.
You have to click twice to do so.
Also have a check when game is in paused mode.
I don't think the tool should be activated when user is not allowed to build during pause mode.

Somewhere there is a tiny bug when single clicking white line that make the tool stop.
I was not able to reproduce however.
I need to play more with this awesome tool.;-)


Attachments:
trunk_3.zip [1.81 KiB]
Downloaded 36 times

_________________
Chunnel , Distance between ships , Playing with Heightmaps , Signals tunnel , Waypoint air , Everest , Tunnel end
Top
   
PostPosted: Sun Feb 15, 2015 5:24 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
New version (10a) is released.

HackaLittleBit wrote:
adf88 wrote:
When placing a new polyline, firstly you pick a tile to snap to (previously you had to place a track and the line was snapped to this track).
Isn't that counter intuitive?
Counter intuitive? No. But maybe not the best idea indeed. I changed the behaviour. Clicking now works like in earlier versions. Drag-dropping first line now has "polyline" style.

HackaLittleBit wrote:
Then I have a small bug for you.
Click polyline tool button, build small section and try to close the polyline tool button.
You have to click twice to do so.
It was somehow intended behaviour, this first click was starting a new line. However, it feels odd at least. I changed button/hotkey handling:
  • button clicking - open the tool in non-snapping mode (new line), close the tool if it is opened
  • button ctrl-clicking - switch between snapping and non-snapping modes, open the tool in non-snapping mode if it is closed
  • CTRL+A hotkey - activate polyline tool in snapping mode, close the tool if snapping mode is already active
  • CTRL+SHIFT+A hotkey - activate polyline tool in non-snapping (new line) mode, close the tool if non-snapping mode is already active

There was also another bug. When placement was failing (e.g. out of money) polyline snap point was moved anyway. It's fixed now.

HackaLittleBit wrote:
Also have a check when game is in paused mode.
I don't think the tool should be activated when user is not allowed to build during pause mode.
Why should PLT be treated in different way then other tools?


Single diff having everything is available at the first page.
Patch queue with the changes is available below:


Attachments:
polyline_track_tool_v10a_ottd_r27095-mq.zip [35.8 KiB]
Downloaded 37 times

_________________
:] don't worry, be happy and checkout my patches
Top
   
PostPosted: Mon Feb 16, 2015 2:56 pm 
Offline
Director
Director
User avatar

Joined: Wed Dec 10, 2008 4:08 pm
Posts: 549
Location: tile 0x0000
Quote:
Why should PLT be treated in different way then other tools?

It shouldn't and it doesn't.;-)

I can't find things to complain anymore.
Very nice and smooth now.

Below is small patch to rectify some punctuations etc.

Regards.


Attachments:
Minor style changes r27135.patch [12.72 KiB]
Downloaded 40 times

_________________
Chunnel , Distance between ships , Playing with Heightmaps , Signals tunnel , Waypoint air , Everest , Tunnel end
Top
   
PostPosted: Thu Feb 26, 2015 8:02 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
New version (10b) is released.

Just a single bug fix. While dragging to a point where no line is highlighted and releasing mouse button in that moment, no line should be placed but some arbitrary line was being placed anyway. Now it's fixed (12-don-t-place-track-when-none-highlighted).

As usual, single diff having everything is available at the first page.
Patch queue with the latest changes is available below:


Attachments:
polyline_track_tool_v10b_ottd_r27095-mq.zip [36.34 KiB]
Downloaded 55 times

_________________
:] don't worry, be happy and checkout my patches
Top
   
PostPosted: Wed Jan 04, 2017 5:31 pm 
Offline
Engineer
Engineer

Joined: Wed Dec 18, 2013 12:32 pm
Posts: 80
Let's move it to polyline topic :) (in reply to https://www.tt-forums.net/viewtopic.php?p=1180890#p1180890)

adf88 wrote:
Besides this idea is independent of the Polyline patch, I think it's impossible to conclude a behavior that would suit everyone. Moreover, some (most?) people are against aggressive/automatic thermoforming and this kind of change would never get into the trunk because of philosophical reasons. Or I misunderstood you, please explain then.

You're right, but I still think it will be a very useful feature. Like right now I can't even set servers to anything but "very flat" (or "flat" with some extra shenanigans) because it takes way too much time to build rails on hills. As for behavior I think making it so that track keeps the height if, say, Alt is pressed would be a good starting point.

adf88 wrote:
_dp_ wrote:
smarter handling of slopes
No idea what you mean, totally.

Mostly this thing: http://imgur.com/a/bnTkZ. Makes no sense whatsoever.

adf88 wrote:
_dp_ wrote:
support for bridges/tunnels
There is support for bridges/tunnels already..

Very basic, it doesn't even move snapping point if bridge is already there. But I'd like to be able to do smth like this in one click: http://imgur.com/a/kyEZg

adf88 wrote:
_dp_ wrote:
some alignment to other tracks
There is some alignment to other tracks already - following track will be aligned to previous track. Perhaps you thought of alignment to other tracks - HOW? I don't see how could it be done, how could it be useful.

Well, yeah, this one is a bit vague, but I usually build track from both sides at the same time so I often find myself in a situation when I want to connect to other track that's not on a screen yet (I usually am zoomed in a lot when I build). And I'd like to have some indication where should I end my track to connect with that rail.


Top
   
PostPosted: Sun Jan 08, 2017 3:16 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
New version is released (v11).

Two new features:
  • After building a rail station you can snap new rail track to it (CTRL-click the polyline button or press CTRL+A).
  • After placing a rail track at tunnel/bridge/station entrance, snapping will be carried over, up to the other end.

_dp_: I'll answer later. Still thinking ;)

_________________
:] don't worry, be happy and checkout my patches


Top
   
PostPosted: Tue Jan 17, 2017 7:57 am 
Offline
Engineer
Engineer

Joined: Mon Oct 24, 2011 8:42 pm
Posts: 23
Found that assertions in GetTileOwner (called by IsTileOwner) could fail. Following fix works, but please check if it looks okay:

Code:
diff --git a/src/viewport.cpp b/src/viewport.cpp
index cc3d3b3..71723da 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -3668,7 +3668,7 @@ static LineSnapPoint LineSnapPointAtRailTrackEndpoint(TileIndex tile, DiagDirect
 
        /* Check whether to extend the snap point over a tunnel/bridge/station etc. */
        tile = TileAddByDiagDir(tile, exit_dir);
-       if (extended != NULL && IsTileOwner(tile, _local_company) && !IsTileType(tile, MP_RAILWAY) && !IsTileType(tile, MP_ROAD) &&
+       if (extended != NULL && !IsTileType(tile, MP_HOUSE) && !IsTileType(tile, MP_INDUSTRY) && IsTileOwner(tile, _local_company) && !IsTileType(tile, MP_RAILWAY) && !IsTileType(tile, MP_ROAD) &&
                        TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, INVALID_DIAGDIR)) == AxisToTrackBits(DiagDirToAxis(exit_dir))) {
                /* Check if this is a bridge and move the tile to the other end if so. */
                if (IsTileType(tile, MP_TUNNELBRIDGE)) tile = GetOtherTunnelBridgeEnd(tile);


Top
   
PostPosted: Tue Jan 17, 2017 10:20 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
Thanks. Patch updated.

_________________
:] don't worry, be happy and checkout my patches


Top
   
PostPosted: Wed Apr 12, 2017 12:22 am 
Offline
Engineer
Engineer

Joined: Wed Dec 18, 2013 12:32 pm
Posts: 80
New version doesn't show error if there is not enough money, just moves snap point around.

P.S. Still thinking? ;)


Top
   
PostPosted: Thu Apr 27, 2017 7:02 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
New version (11b) is released.

Two bugs were fixed:
  • the "money limit" error was not shown on money shortage
  • snapping to non-rail bridges was possible

_dp_ wrote:
adf88 wrote:
_dp_ wrote:
smarter handling of slopes (...) Mostly this thing: http://imgur.com/a/bnTkZ. Makes no sense whatsoever.
Actually this makes sense. While automatic terraforming rather won't happen, automatic fitting tracks to the landscape got my attention.

_dp_ wrote:
I'd like to be able to do smth like this in one click: http://imgur.com/a/kyEZg
This could be handy. Got may attention 2. Although bridge type would have to be automatic (like when CTRL-clicking when placing bridges).

_dp_ wrote:
some alignment to other tracks (...) Well, yeah, this one is a bit vague, but I usually build track from both sides at the same time so I often find myself in a situation when I want to connect to other track that's not on a screen yet (I usually am zoomed in a lot when I build). And I'd like to have some indication where should I end my track to connect with that rail.
Use the blue guideline - make sure it hits the other end. It has to be visible, sorry, no other way. Maybe open an extra viewport?

_________________
:] don't worry, be happy and checkout my patches


Top
   
PostPosted: Thu Apr 27, 2017 11:13 am 
Offline
Engineer
Engineer

Joined: Wed Dec 18, 2013 12:32 pm
Posts: 80
I started my own branch to make polyrail to work better on hills, you can keep track here if you want: https://bitbucket.org/citymania/cmclien ... r-polyrail
Though I'm mostly just experimenting for now, it's still far from being of any practical use.


Top
   
PostPosted: Mon Dec 18, 2017 11:03 pm 
Offline
Engineer
Engineer

Joined: Wed Apr 07, 2010 12:32 pm
Posts: 13
It surprises me how few people appretiate this amazing tool. Most of the problems people have with it can be solved by just using autorail.

Big thanks for creating the plugin and all the updates!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 60 posts ]  Go to page Previous 1 2 3

All times are UTC


Who is online

Users browsing this forum: Vetteman06 and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.