The International Simutrans Forum

 

Author Topic: [patch] new cursor movement  (Read 23929 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
[patch] new cursor movement
« on: April 17, 2009, 07:19:43 PM »
with this patch it is possible to select any ground on the map (bridges etc..)

the patch contains only the changed cursor movement, I did not touch any tools yet. So expect weird result when clicking around.

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: [patch] new cursor movement
« Reply #1 on: April 18, 2009, 07:16:46 AM »
Very nice patch!

It is intended, that, while pointing on a bridge, both kartenboden and bridge are highlighted?

I'm looking forward to use full 3d coordinates in the tools.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #2 on: April 18, 2009, 08:36:50 AM »
Very nice patch!

It is intended, that, while pointing on a bridge, both kartenboden and bridge are highlighted?

thank you :)

Yes this is intended to give a hint about the height of the cursor. In fact, all levels between cursor and ground are highlighted. But on the not-marked tiles only the front part of the cursor ist shown.

Any other ideas how to indicate the 3rd coordinate visually are welcome! The method used in the old isometric game "xcom ufo defense" is my personal favourite ;)

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: [patch] new cursor movement
« Reply #3 on: April 18, 2009, 08:49:57 AM »
Any other ideas how to indicate the 3rd coordinate visually are welcome! The method used in the old isometric game "xcom ufo defense" is my personal favourite ;)

I think it is a good idea. Therefore we need a new cursor, where the front vertical edge is highlighted.

For those, who don't know XCom: http://cache.kotaku.com/assets/images/kotaku/2008/09/xcom_ufo_defense.jpg

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [patch] new cursor movement
« Reply #4 on: April 18, 2009, 09:11:22 AM »
Interesting.
Doesn't cursor move to on the sea yet ?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9556
  • Languages: De,EN,JP
Re: [patch] new cursor movement
« Reply #5 on: April 18, 2009, 08:33:24 PM »
I though of drawing the ground with blue (yellow?) transparent color.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #6 on: April 19, 2009, 02:36:01 PM »
I though of drawing the ground with blue (yellow?) transparent color.

could you provide more details? which ground should be transparent? the marked one? all above? all below?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9556
  • Languages: De,EN,JP
Re: [patch] new cursor movement
« Reply #7 on: April 19, 2009, 07:30:18 PM »
I mean draw a colorful overlay (orange like the marker) with the ground graphics, just like the reserved ways or stop areas on the tile the cursour actually is on.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #8 on: April 20, 2009, 05:09:27 AM »
Doesn't cursor move to on the sea yet ?

The termination criterion of one loop was false, I will update the patch this week.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #9 on: April 21, 2009, 08:27:27 PM »
New patch file. Now all tools should work (but unexpected behaviour can be expected at some points).

Please test! :)
« Last Edit: April 22, 2009, 07:22:07 PM by Dwachs »

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [patch] new cursor movement
« Reply #10 on: April 22, 2009, 03:53:55 PM »
Some impressions

- Underground mode: Can't move to empty tile. So, can't build new road/track.
- Underground mode: Too many markers with stop building tool and hard to look.
- Upgrading road/track and downgrading road/track don't use 3d coordinate.

Offline sojo

  • Devotees (Inactive)
  • *
  • Posts: 851
  • Maintainer pak96.comic
    • German home of Simutrans
Re: [patch] new cursor movement
« Reply #11 on: April 22, 2009, 05:51:12 PM »
This is a little bit confusing. Can it drawn in difficult colors?

F.e. From (top to bottom) red to green. So you have on top a dark red and you go to a dark green over orange or yellow. But I'm not sure if this is possible.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9556
  • Languages: De,EN,JP
Re: [patch] new cursor movement
« Reply #12 on: April 22, 2009, 06:11:22 PM »
Differen colors is not possible. And 3D coordinates are not yet used, this is just preview for the changes to come to simwerkz.cc needed.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #13 on: April 22, 2009, 07:27:33 PM »
Some impressions
- Underground mode: Can't move to empty tile. So, can't build new road/track.
- Upgrading road/track and downgrading road/track don't use 3d coordinate.
This should be solved now.

- Underground mode: Too many markers with stop building tool and hard to look.
I changed the 'helper' marker to the grid graphics, which yield a more moderate look. Is it better?

This is a little bit confusing. Can it drawn in difficult colors?
I used the marker and border graphics as defined in each pakset. At a later stage one can change this.

And 3D coordinates are not yet used, this is just preview for the changes to come to simwerkz.cc needed.
The patch file contains all necessary changes, everything should be working with 3d-coordinates :o

I will ask wernieman to cross-compile the patch.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: [patch] new cursor movement
« Reply #14 on: April 22, 2009, 08:21:29 PM »

knightly

  • Guest
Re: [patch] new cursor movement
« Reply #15 on: April 22, 2009, 08:57:58 PM »
First of all, thanks a lot for your great work, Dwachs. ;)

I tried the SDL/Mingw version compiled by Wernieman, and it seems that the cursor does not highlight the bridge surface at the slope end of the bridge. Is it the intended behaviour?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #16 on: April 23, 2009, 05:10:16 AM »
@wernieman: Thank you very matsch!

@Knightly: At least this behaviour is known. It is not easy to fix. I will try to do so this evening.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [patch] new cursor movement
« Reply #17 on: April 23, 2009, 06:40:18 AM »
- Underground mode: Too many markers with stop building tool and hard to look.
It looks better, thank you.
- Underground mode: Can't move to empty tile. So, can't build new road/track.

It works, thank you. Is it difficult to mark the same height tile ?
Currently, starting cursor popsition is on the road, but ending cursor position is on the ground. This is a little difficult to recognize.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [patch] new cursor movement
« Reply #18 on: April 23, 2009, 06:42:50 AM »
- Upgrading road/track and downgrading road/track don't use 3d coordinate.
I think this still not work correctly. Can you upgrad/downgrade topmost ways ?
And also, elevated monorail could be ugpgrated to normal monorail graphics, this should not happen.

knightly

  • Guest
Re: [patch] new cursor movement
« Reply #19 on: April 23, 2009, 06:53:51 AM »
Regarding image ug03.png posted by z9999 above :

Would it be better if, on the ground surface, the squares above the road will also be highlighted? Those squares also fall within the coverage area of the stop.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #20 on: April 23, 2009, 07:08:36 AM »
Is it difficult to mark the same height tile ?
Currently, starting cursor popsition is on the road, but ending cursor position is on the ground. This is a little difficult to recognize.
yes, it is difficult. If the underground tile that should be marked is empty, there is nothing to put the cursor on.

I try to fix up- and downgrading today evening.

Regarding image ug03.png posted by z9999 above :

Would it be better if, on the ground surface, the squares above the road will also be highlighted? Those squares also fall within the coverage area of the stop.
The problem here is, that simutrans uses the same method to mark the ground where the cursor is and create the preview of the catchment area. Your proposal means that more tiles are marked, which is IMHO not a good idea. See the screenshots of z9999 above.

These difficulties in the underground view were the main motivation for me to develop the new underground view ...

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #21 on: April 23, 2009, 07:56:07 PM »
I think this still not work correctly. Can you upgrad/downgrade topmost ways ?

Here is a new patch file, which fixes your observations. Thank you for testing!

I included also the possibility to build elevated ways on top of elevated ways without cheating ;) Dont know whether prissi likes that or not :o

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: [patch] new cursor movement
« Reply #22 on: April 24, 2009, 06:59:42 AM »
New Compiler run with the new-patch

See: http://patches.simutrans-germany.com/

But I delete there the old one (3433)

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #23 on: April 24, 2009, 08:31:32 AM »
Thank you!

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [patch] new cursor movement
« Reply #24 on: April 24, 2009, 11:48:26 AM »
I included also the possibility to build elevated ways on top of elevated ways without cheating ;)
Thank you. It's great, and I understand now why upgrading/downgrading topmost way didn't work.
Dont know whether prissi likes that or not :o
Maybe... not ?  :'(

So, this cursor feature will come with height-cut mode ?
If not, there is no way to select ground tiles under bridges.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #25 on: April 24, 2009, 12:08:17 PM »
After integration of this cursor patch, the new underground mode will come in trunk too. We decided to first complete this patch here, the new underground mode can use all the reworked tools.

So, this cursor feature will come with height-cut mode ?
If not, there is no way to select ground tiles under bridges.

I can add support of the ctrl-key: that means ctrl+click selects the ground. What do you think? The ctrl-key is not used anymore with the cursor-patch.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: [patch] new cursor movement
« Reply #26 on: April 24, 2009, 12:23:15 PM »
Will there be a new patch-Version this weekend or did you work for the trunk?

When you will make a new patch-version, then I must plan a new compilerrun ... so there will be enough tests befor you programm for the trunk.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [patch] new cursor movement
« Reply #27 on: April 24, 2009, 02:00:14 PM »
I can add support of the ctrl-key: that means ctrl+click selects the ground. What do you think? The ctrl-key is not used anymore with the cursor-patch.

Well, I'm not sure which way is good, but easy way to access to behind tiles or objects would be needed for any construction tools, I think.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9556
  • Languages: De,EN,JP
Re: [patch] new cursor movement
« Reply #28 on: April 24, 2009, 05:21:03 PM »
Maybe CNTRL should glue the cursor to the ground in the mouse movement routine ... that was also my suggestion when I first discussed with Daniel about this. But then of course there will be the slice mode in future.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #29 on: April 24, 2009, 06:28:32 PM »
new patch.

ctrl-key now selects ground. But you have to move the mouse after pressing/releasing the ctrl-key to toggle the right beaviour. I.e. simply pressing ctrl-key does not move the pointer.
« Last Edit: April 26, 2009, 11:56:06 AM by Dwachs »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9556
  • Languages: De,EN,JP
Re: [patch] new cursor movement
« Reply #30 on: April 24, 2009, 07:19:28 PM »
Why does some tools use get_grund? Especially the schedule tool should it fall back?

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [patch] new cursor movement
« Reply #31 on: April 24, 2009, 11:45:36 PM »
I tested the lastest version, but this version doesn't work well.

It always points ground tiles without CTRL key.
Only the magnifier icon moves up and down, but orange cursor doesn't move and always points ground tiles.

[edit]
If there are 3 height on one tile, I can select low and middle but can't select topmost height.
If there are only 2 height on one tile, I can select ground  but can't select upper height.
« Last Edit: April 25, 2009, 12:10:19 AM by z9999 »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: [patch] new cursor movement
« Reply #32 on: April 25, 2009, 08:33:56 AM »
Thanks for reporting. I will look into it this weekend.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: [patch] new cursor movement
« Reply #33 on: April 25, 2009, 07:45:26 PM »
I make a spezial run (see http://patches.simutrans-germany.com/)

Sorry that today and not yesterday, but yesterday my Girdfriend (and wife) think, that is more importan to play with the Laptop then to make the upload ... ;o)

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3658
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: [patch] new cursor movement
« Reply #34 on: April 26, 2009, 05:08:40 AM »
yesterday my Girdfriend (and wife) think

Well, as long as you can get the both of them to agree, I think that's what's most important. ;D