News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Removing limits for construction, and Adding some utilities.

Started by wackdone, July 25, 2012, 01:26:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wackdone

The attached patch is a part of my current work.

1. Removes some limitations in construction.

MAY_SLOPE_UNDER_ELEVATED
  permits construction of elevated way like as shown in the attached image.
  In pure Simutrans, it can be made with dull steps. (first image)
  This hack makes it easy. (second image)
  (In my tiny survey, it doesn't break any consistency of welt.)

MAY_ELEVATED_ON_TUNNEL_ENTRANCE
  same functionality with last one, but it's on a tunnel entrance.

MAY_STATION_ON_TUNNEL_ENTRANCE
  permits building a halt (platform, bus-stop,...) at tunnel entrance.
  I remember that it was able to build a halt at tunnel entrance in ancient Simutranses.
  Did any problem appear in current Simutrans around the building at tunnel entrance?

2. Utilities for building platforms.

MAY_FLIP_STATION_FACE
  flips result of calculation for face of platform at building.
  To do it, click with pressing Ctrl key to build a platform.

MAY_DOWNGRADE_HALT
  permits downgrading of halts.
  To do it, click with pressing Shift key to replace existing a halt tile.

3. Tiny utility for game playing.

PAUSE_AFTER_LOAD
  adds '-pause' option for command line.
  If it's directed, game will start with paused state after loading.
  It'll be useful in opening a huge and heavy developed map.

SCREENSHOT_ONLY_TOPWIN
  makes snapshot image of top window only.
  To do it, click 'screenshot' button with pressing Ctrl key.
  It should be implemented as an optional behavior of snapshot tool
  (switched by tool argument, or other methods).
  Currently, codes exist only for SDL backend (not for GDI, nor others).


Some of above may conflict with policy of the game design, or policy of UI design.
(permits downgrading of halts? use of Ctrl/Shift modifiers?)
If it's so, please suggest me about it.

prissi

Tunnel with stations look just ugly, sicne the tunnel itself has forground and background image. Thus it was forbidden.

And you should be able to downgrade stops by using control click. Aparently this was broken.

To choose the facing of an extension building, it would make more sense to allow the decision upon selection, similar to extension building. That would be imho the better integration into the game

You can connect elevated ways to a slope. Especially for this purpose the bridge with lenght=0 was made. At a slop also the elevated way should slope. Otherwise, how would you construct an elevated way that goes up one level? But maybe I understood this wrong. (THus I may also misunderstood the tunnel.)

For pause after load, I just press p after simutrans was started in such cases. You could also define a dummy server with pauses on disconnectivity.

wackdone

Tunnel with platform:
  I understand the problem around visualization. But, as a one of player, I hope it revives.

Choose facing of platform:
  Face selector was implemented by patch 'Simutrans VT'. I tested it and I felt it slightly bothers development process.
  Although my approach may confuse users about behavior.
  Mmm, I need smarter interface to control it...

Elevated way and slopes:
  Sorry, it's not my main purpose to connect ways between elevated and grounded.
  Connecting elevated to grounded is achievable by dragging with track tool.
  My target is 'build flat elevated and slope on same tile'.
  They seem to be standing at same height-level. It looks making inconsistency, but it doesn't.
  I'll show you better image later. Wait a while, please.

Pause after load:
  Sigh... My machine is too slow, and my finger is (?)..
  When the load of CPU goes too heavy, X and SDL become taking keyboard events after passing some steps of Simutrans main.
  Connecting to dummy server is a nice trick! I'll try it.

Ters

Deleting that building in the screenshots shouldn't restore slope in this case. It just becomes plain wrong, even if only because of graphical errors.

wackdone

Another image for building flat elevated on slope / tunnel entrance.

And better examples exist in a blog page of a Japanese user:
http://simutrans128.blog26.fc2.com/blog-entry-222.html

(128naHito san, excuse me referring your page.)

wackdone

I tested it with latest source from svn (r5838).
Ouch, the behavior was changed from older version.

Quote
Deleting that building in the screenshots shouldn't restore slope in this case. It just becomes plain wrong, even if only because of graphical errors.

before 110 (or near), slope was restored.
and there was no problem while playing with it.

Ters

Quote from: wackdone on July 25, 2012, 03:58:01 PM
before 110 (or near), slope was restored.
and there was no problem while playing with it.

Tecnically, it may work, but the graphics, and the pylons in particular, does not fit. A ramp is needed for slopes.

wackdone

Graphical matters are depend on design of pak sets and add-ons.
Game engine should not limit variety of use.

And, in real world, there are many dense construction such as elevated and tunneling by double track, ...
especially in dense city.

Ters

Quote from: wackdone on July 25, 2012, 04:16:16 PM
Graphical matters are depend on design of pak sets and add-ons.
Game engine should not limit variety of use.

The problem is that it is the same image. If you cut the pylons to fit a slope, they will be too short on flat ground.

I see the desire to build elevated ways on slopes, especially along the side of slopes. Sometimes I have wanted to build such myself. But I think there are fundamental limitations in the game engine that can not be easily overcome. There are already graphical glitches that can't be fixed. What have been presented here seem like simple hacks that lead to other problems.

wackdone

As you say, one of need is siding with slope.
and I have another desire, stack of track especially at near of dense tracked station.
(building cross-under track for line branching at exit of elevated station, or ...)

Okay,
  First example: slopes connected to neighbor smoothly, cannot hide pylons.
  mip-const-2.png in Reply #4:  side panel (basement?) hides higher pylons well.

Do you feel something strange for the image in Reply#4?
(of course, I've not cut any pillar by hand:-)

Some more codes are required to render it better in any situations as you say.
I'll find something lighter to fix its view.
Thanks.

prissi

The slope and flat elevated could be easily done already today using bridges. (This is the intended way to connect flat and elevated. Actually it should be the only way, any other way is an error.)

ӔO

I think the one type of construction wanted, that may have been discussed in the past, was a tunnel on flat edge.
or it may have been something to do with "tunnels" being unnecessarily confusing.

Either way, it was something to the tune of: an entrance to underground should not require a special underground only tool.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

Ters

Quote from: ӔO on July 25, 2012, 10:26:56 PM
Either way, it was something to the tune of: an entrance to underground should not require a special underground only tool.

You need some way of telling the game to drill into a slope rather than go up one. If it's not a tool, then it must be some modifier key, but modifier keys are probably even worse.

Dwachs

I like PAUSE_AFTER_LOAD, SCREENSHOT_ONLY_TOPWIN, MAY_DOWNGRADE_HALT.

You can pause a game if you press 'p' already during loading.

The first three patches potentially break stuff that is implicitly assumed in the code. See attached screenshot. The train finds a route upward through the elevated rail, but not downward.
Parsley, sage, rosemary, and maggikraut.

wackdone

Ouch, it's a serious problem.
Okay, I'll cancel requests around "Elevated and Sloe/Tunnel Entrance" at once (or forever).

And I'll make a patch again of survived portions.
Currently survived (I think):
  PAUSE_AFTER_LOAD
  SCREENSHOT_ONLY_TOPWIN
  MAY_DOWNGRADE_HALT  (in original: Ctrl+Click, but it doesn't work now)

To be considered:
  MAY_FLIP_STATION_FACE:  requires smart UI (dialogue?)

BTW, I'll explain my tiny need of PAUSE_AFTER_LOAD.
I'm working for some different parts of Simutrans, and I often build some different sort of executables.
While debug process, Kick building versionA and execution of A with -load data-has-problem -pause, in one command line.
and return to edit source for B, ... when I feel little tired, have a tea time :-)
Returning to screen, Okay, A has booted with pausing near the time I wanna see. Let's test A again!
It is one of my usages of '-pause'.

Dwachs

PAUSE_AFTER_LOAD: I agree that this is useful. But I do not see the need to pause every game after loading? Imho a command-line parameter that pauses the savegame specified by -load would be enough.
Parsley, sage, rosemary, and maggikraut.

wackdone

Sorry to be late for remaking the patch.

PAUSE_AFTER_LOAD:
  Surely, it's required exactly for batch operation such as the situation I mentioned in previous post.
  But, I have a little need for 'constant -pause' (or a setting makes same result) in browsing and comparing some maps
  (seeing other players' map, ...)
  Hitting 'p' while loading, it's working but little troublesome for that situation.

  How about the following spec:
    (1) '-pause' for command line, it works only for '-load' at booting up.
    (2) '[] pause after load' checkbox in Load Dialog  (it may inherit value from '-pause')

SCREENSHOT_ONLY_TOPWIN:
  The functions for snapshot should be one generic function taking region for snapshot.
  display_snapshot(x,y,w,h):
     if (x,y==0,0 && w,h==screen_size) make snapshot for fullscreen.
     else make partial snapshot.
  How about the aggregation?

Dwachs

Your proposal for PAUSE_AFTER_LOAD sounds good.

SCREENSHOT_ONLY_TOPWIN: Using a generic fucntion, which takes full screenshot as special case, is the way to go.

You may want to consider the extension of this methods in such a way that a complete picture of the ingame map can be saved to a image file.
Parsley, sage, rosemary, and maggikraut.

Fabio

A sophisticated screenshot tool would be good. It could save to file
1) visible screen (current)
2) topmost window
3) background, with no menu, toolbar, ticker nor mouse cursor
4) entire game map, like 3)
5) video: screenshots spaced 1/30 sec of mode 3).


prissi