News:

SimuTranslator
Make Simutrans speak your language.

[Patch] New underground view

Started by Dwachs, December 27, 2008, 03:08:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dwachs

Maybe use a free filesharer out there ?
Parsley, sage, rosemary, and maggikraut.

Dwachs

Parsley, sage, rosemary, and maggikraut.

Dwachs

#72
here is a updated and slightly reworked patch.

edit: patch removed
Parsley, sage, rosemary, and maggikraut.

z9999

Windows GDI, compiled with MinGW, GCC

I tried, but simutrans quit without any error dialog. (assert)

How to reproduce:
1. Change to underground mode
2. Build road to slope
3. Build tunnel on slope

Result:
Quit without any error dialog

simu.log
Quote
Message: karte_t::interactive_event(event_t &ev):   calling a tool
Message: tunnelbauer_t::baue():   called on 42,53

z9999

Another small problem.

In normal (overground) mode, when I build monorail track on vertical slope, it don't show.
But if I change to underground mode and change to normal mode again, it shows.

Dwachs

thanks for testing! I missed to apply changes to the tunnel building routines causing the assertion.

However, I could not reproduce your second report. Maybe the undergroundmode was on and the new built monorail was above the underground level, which makes it invisible?

Patch attached, but against 2381, since I dont have the possibility to update.
Parsley, sage, rosemary, and maggikraut.

gerw

I can reproduce the monorail bug. Be sure to build elevated monorail tracks, not flat ones.

z9999

Crash when I remove a tunnel with romove tool in underground view.


I think monorail problem is some kind of initialize problem.
If I once changed to underground view and changend back to ground view. This problem don't happen.

Dwachs

new patch against 2381.

Hopefully the monorail-bug is gone. I could not reproduce it :(
Parsley, sage, rosemary, and maggikraut.

z9999

I tried with both 2381 and 2391, monorail problem didn't happen.
Thank you.

Dwachs

Since several revisions, tool number 20 is used for toggling tooltips. Hence the menuconf.tab-entry must be changed to

# WKZ_INC_UNDERGROUND_LEVEL = 21
# WKZ_DEC_UNDERGROUND_LEVEL = 22
simple_tool[21]=,HOME
simple_tool[22]=,END

this will increase / decrease the underground-level if the 'home' / 'end' keys are pressed. Ofcourse, different keys than 'home'/'end' can be defined.
Parsley, sage, rosemary, and maggikraut.

sojo

Will this patch go into the trunk?
"English is a easy language. But not for me." ;) sojo

follow simutrans_de on Twitter
- A home for Simutrans (in german)

prissi

Modified, yes, like some mouse interaction and so on. Otherwise it would not be in the considered category. However, there are some other stuff not finished, which must be finished before. I will not promise any date though

sojo

"English is a easy language. But not for me." ;) sojo

follow simutrans_de on Twitter
- A home for Simutrans (in german)

Dwachs

Updated the patch :)

Do you have any suggestions on additional gui elements?

The underground view toggler can be activated by menuconf.tab

# WKZ_SHOW_UNDERGROUND=15
# WKZ_INC_UNDERGROUND_LEVEL = 21
# WKZ_DEC_UNDERGROUND_LEVEL = 22
simple_tool[15]=,U
simple_tool[21]=,HOME
simple_tool[22]=,END

Of course the decrease / increase level tool can be integrated in a single tool that takes an additional parameter. Suggestions / wishes?
Parsley, sage, rosemary, and maggikraut.

z9999

#85
Problems:
If I used way tools, powerline tool and bridge tool on under ground mode, this will affect on the ground and build on ground.
These tools should be removed from toolbars.

Another problem.
In normal (overground) mode, when I build monorail track on vertical slope, it don't show.
But if I change to underground mode and change to normal mode again, it shows.
Same as http://forum.simutrans.com/index.php?topic=1089.msg18145#msg18145

[EDIT]
Another problem:
On normal ground mode, we can see the cars on harbor tunnels.
But on underground mode, we can't see the ways and the cars on harbor tunnels.

[EDIT2]
Quote from: Dwachs on May 12, 2009, 07:34:32 PM
Of course the decrease / increase level tool can be integrated in a single tool that takes an additional parameter. Suggestions / wishes?

I don't know which is better, but anyway, please use different text, containing "up" or "down", instead of "change underground level".
These text are shown in keyboard help window.

And one more thing. When it is on height-cut mode, I often forget that it is on height-cut mode now. Is there any good idea which to know it is not on normal overground mode ?

[EDIT3]
I can use terraforming tool on height-cut mode. But sometimes forbidden with this message, "Terraforming not possible here in underground view"
I'm not sure which is correct.

sojo

Quote from: Dwachs on May 12, 2009, 07:34:32 PM
Do you have any suggestions on additional gui elements?
Do you need buttons?
"English is a easy language. But not for me." ;) sojo

follow simutrans_de on Twitter
- A home for Simutrans (in german)

Dwachs

Thank you for testing! I am almost blind for all these bugs. In particular, when they were fixed but came back after porting the patch. Modified patch file attached.
Quote from: z9999 on May 13, 2009, 02:04:59 AM
Problems:
If I used way tools, powerline tool and bridge tool on under ground mode, this will affect on the ground and build on ground.
These tools should be removed from toolbars.
I would rather opt for (and infact implemented) a correct check in all the routines.
Quote
Another problem.
In normal (overground) mode, when I build monorail track on vertical slope, it don't show.
fixed
Quote
Another problem:
On normal ground mode, we can see the cars on harbor tunnels.
But on underground mode, we can't see the ways and the cars on harbor tunnels.
These harbor tunnels spoil the logic in the display routines :( Why dont you build a bridge there? I see no easy fix to that problem.
Quote
I don't know which is better, but anyway, please use different text, containing "up" or "down", instead of "change underground level".
These text are shown in keyboard help window.
Do you refer to the in-game help? I did not touch this.
Quote
And one more thing. When it is on height-cut mode, I often forget that it is on height-cut mode now. Is there any good idea which to know it is not on normal overground mode ?
Ideally, simutrans should work in height-cut and in overground mode identical for the visible parts. So that it does not matter for playing which mode is currently active.
QuoteI can use terraforming tool on height-cut mode. But sometimes forbidden with this message, "Terraforming not possible here in underground view"
I'm not sure which is correct.
This is intended: terraforming is possible up to and including the height cut. So that one can build slopes to extend the underground area, and such that this new underground area is immediately available for building more underground structures without changing view modes.


Quote from: sojo on May 13, 2009, 07:39:29 AM
Do you need buttons?
If the tools should be integrated in a toolbar then yes :)

My question was, whether I should implement a different dialogue for the underground modes, which (maybe) pops up if one presses 'U' etc. This is also connected to z9999's question 'how to determine which mode is currently active'.

Are there suggestions how to design such a dialogue?
Parsley, sage, rosemary, and maggikraut.

jamespetts

As to the "harbour tunnel" issue, might I suggest that, when underground slopes are implemented, the building of any further harbour tunnels be disabled, as it would then be possible to tunnel under the water using a slope? It should still be possible, however, to load existing saved games containing them, so as not to break people's existing saved games. Harbour tunnels in their present form are an anomaly.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

sojo

I have painted some buttons some times ago.
"English is a easy language. But not for me." ;) sojo

follow simutrans_de on Twitter
- A home for Simutrans (in german)

gauthier

QuoteAs to the "harbour tunnel" issue, might I suggest that, when underground slopes are implemented, the building of any further harbour tunnels be disabled, as it would then be possible to tunnel under the water using a slope?
I have it already :)

I know Prissi will kill me but underground slopes could be implemented in the trunk now ?

z9999

Quote from: Dwachs on May 13, 2009, 10:27:27 AM
Do you refer to the in-game help?

No, tooltips thing.
For example, wkz_change_city_size_t has 2 different text, "Grow city" and "Shrink city". Thus, each button can have each tooltips.

class wkz_change_city_size_t : public werkzeug_t {
const char *get_tooltip(spieler_t *) { return translator::translate( atoi(default_param)>=0 ? "Grow city" : "Shrink city" ); }




Quote
My question was, whether I should implement a different dialogue for the underground modes, which (maybe) pops up if one presses 'U' etc.
Are there suggestions how to design such a dialogue?

Dialogue pop-up is the hell.
You can also use 3 toggle tooltips like wkz_show_name_t.

I like the idea to add a new mode "Toggle height-cut mode" instead of 3 toggle mode.
- "U" toggles underground mode just as old simutrans.
- "v", (for example), toggles height-cut mode.
But I'm not sure what prissi want to do.

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

I am divided. Toggling three modes seem easier to a necomer, as it is used also for citybuildings and station names. Logically, a seperate mode will be more clean. I also dislike seperate commands for changing the height.

My Idea would be a small window opening (and closing it would retrun to normal mode) with two bars or even a scrollbar from lowest to highest height in the game. This could be moved by mousewheel or PAGTE_UP/PAGE_DOWN then when the mouse is over the dialoge. It would also give a visiual indication where one is.

jamespetts

I like Prissi's idea for the GUI - that seems as if it would be intuitive and easy to use both for new and experienced players.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

z9999

As for harbor tunnels, why you need to change old code ?
Current simutrans can show well harbor tunnels both on overground mode and underground mode.
What you did is only adding new height-cut mode isn't it ? Why these behavior should be changed on overground mode and underground mode.

Dwachs

what about this:

  • WKZ_SHOW_UNDERGROUND for toggling 'complete underground view' - press 'U' in pak64
  • WKZ_SLICED_UNDERGROUND with one parameter:   
    • 0 - toggle this view with height taken from cursor
    • 1 / -1 increase / decrease underground level

  • a new dialogue doing all this stuff in a gui for newcomers etc
Parsley, sage, rosemary, and maggikraut.

gerw

But then there should be a possibility to configure simutrans in such a way, that you can access the underground mode without the GUI. Therefore I totally agree with z9999:
Quote from: z9999 on May 13, 2009, 11:28:20 AM
Dialogue pop-up is the hell.

Dwachs

Quote from: z9999 on May 13, 2009, 01:09:17 PM
What you did is only adding new height-cut mode isn't it ? Why these behavior should be changed on overground mode and underground mode.
If you look at the patch, it is not an addition to the already implemented modes, it is in fact a full replacement. And I dont feel like rewriting everything for these harbour tunnels :/


Parsley, sage, rosemary, and maggikraut.

z9999

"Under ground view" button on display setting window doesn't have 3 mode.
So, I can't change to underground mode by clicking this button.

One question. Overground mode and height-cut mode of height=20 is exactly the same ?
If so, why we need to toggle with overground mode and height-cut mode ?
If overground mode can change height level of view directly, we don't need height-cut mode, don't we ?
In that case, toggle overground mode and underground mode is enough.

Dwachs

yes you are right. Normal mode is equivalent to sliced mode with height level = +infinity ;)
Parsley, sage, rosemary, and maggikraut.

z9999

Thank you.
Then I like toggle 2 mode than toggle 3 mode like as attached image.
In this case, toggling height-cut view and underground mode keeps last used height value, so we can easily continue construction.
Toggling 3 mode really breaks the continuity of our though.

VS

Maybe you can make it (from player perspective) one continuous mode - from +∞ (full overground) through slices to -∞ (full underground).

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Dwachs

Quote from: VS on May 13, 2009, 07:46:43 PM
Maybe you can make it (from player perspective) one continuous mode - from +∞ (full overground) through slices to -∞ (full underground).
this will not work, since sliced mode shows underground structures only on one height, whereas full underground mode shows all underground structures.
Parsley, sage, rosemary, and maggikraut.

Dwachs

Quote from: z9999 on May 13, 2009, 06:34:40 PM
Then I like toggle 2 mode than toggle 3 mode like as attached image.
In this case, toggling height-cut view and underground mode keeps last used height value, so we can easily continue construction.
Toggling 3 mode really breaks the continuity of our though.

I dont know whether I understood you right. Do you mean something like this:

Toggling underground ('U') switches between overground and underground view (and does nothing to height-cut view).

Toggling height-cut switches between height cut view and overground or underground view, depending which of the latter two was active previously. If height-cut is activated by keyboard then the z-coordinate of the cursor is taken for the cut height otherwise the last used value.

I must say, this looks better to me than the now implemented 'cycling through all view'.

More comments?
Parsley, sage, rosemary, and maggikraut.