The International Simutrans Forum

 

Author Topic: Slower vehicles on diagonals  (Read 14134 times)

0 Members and 1 Guest are viewing this topic.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Slower vehicles on diagonals
« on: August 27, 2008, 09:06:57 PM »
With the attached patch, vehicle on diagonals will travel only at 0.75 speed. That will make them more similar to the true 1.41...=sqrt(2) speed. Without the vehicles were way too fast on diagonals.

However, this will affect graphics. The ridicilous stretching in SW/NE would be gone too. Actually the very old vehicles of pakHAJO have already nearly correct length. (The correct length is the lower row, labled 2/3.)

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1408
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Slower vehicles on diagonals
« Reply #1 on: August 27, 2008, 09:53:25 PM »
Quote
vehicle on diagonals will travel only at 0.75 speed.

That's a pity, it made diagonal track very useful  ;D. Unfortunately you are right, it is better...

Offline yoshi

  • Devotee
  • *
  • Posts: 133
  • PAK128.Japan Maintainer
    • pak128.Japan
  • Languages: JA
Re: Slower vehicles on diagonals
« Reply #2 on: August 27, 2008, 09:54:55 PM »
This is really great!!!  ;D

I need to adjest the length of all the pak128.Japan vehicles, suitable for this.  :D

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Slower vehicles on diagonals
« Reply #3 on: August 27, 2008, 11:02:04 PM »
Yes, that'll be a lot of redrawing  :( ... but probably more than worth the effort.   :D

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: Slower vehicles on diagonals
« Reply #4 on: August 28, 2008, 02:53:42 PM »
Ok, then I will do more debugging. Last time I asked about this, there was less enthusiasm.

Let's make realistic vehicles in all views ...

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Slower vehicles on diagonals
« Reply #5 on: August 28, 2008, 02:59:06 PM »
I'll have to see and try it before I can give my final judgement - but it sounds great! So, go prissi, go!  :D

Offline wipi35

  • Devotees (Inactive)
  • *
  • Posts: 250
  • Imagination is more important than knowledge
  • Languages: NL,EN,GE,FR
Re: Slower vehicles on diagonals
« Reply #6 on: August 28, 2008, 04:31:53 PM »
As far as I can see on the screenshot it's absolutely wonderful! Can't wait to use it.

Offline Ashley

  • Coder/Patcher
  • Devotees (Inactive)
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Slower vehicles on diagonals
« Reply #7 on: August 28, 2008, 06:33:29 PM »
This is something I've wanted for ages in Simutrans, much more realism, would go really well with an enhancement to switches to improve the look of diagonal ways.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: Slower vehicles on diagonals
« Reply #8 on: August 29, 2008, 07:30:04 AM »
I am soo stupid: The correct value (sqrt(2)) is easily appromimated, and faster too. Just wait before changing all your vehicle for a little longer please.

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Slower vehicles on diagonals
« Reply #9 on: August 29, 2008, 10:23:11 AM »
Don't worry. At least I am not going to start before I have the new system running here in its "final" form. (As a pixel-pusher I have learned that much patience  ;D)

Offline Spike

  • *
  • Posts: 1361
  • First Simutrans Developer and Graphics Artist
Re: Slower vehicles on diagonals
« Reply #10 on: August 29, 2008, 11:20:37 AM »
Good work there, Prissi, even if needs one more change :)

Offline yoshi

  • Devotee
  • *
  • Posts: 133
  • PAK128.Japan Maintainer
    • pak128.Japan
  • Languages: JA
Re: Slower vehicles on diagonals
« Reply #11 on: August 29, 2008, 05:14:58 PM »
In r1978, the vehicle speed on diagonals seems to be 0.724. But why isn't it 0.707 (correct value)?
I'm sorry, if there is a technical reason, but I'm simply curious.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: Slower vehicles on diagonals
« Reply #12 on: August 29, 2008, 07:20:51 PM »
It is to avoid a division. 724 is 1024*sqrt(2)=724. Instead of a division, I can shift 10 to the right ... 707/1000=724/1024 (which the rounding error of course).

Offline yoshi

  • Devotee
  • *
  • Posts: 133
  • PAK128.Japan Maintainer
    • pak128.Japan
  • Languages: JA
Re: Slower vehicles on diagonals
« Reply #13 on: August 29, 2008, 07:26:11 PM »
Thanks for the answer, I really need to study programming...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: Slower vehicles on diagonals
« Reply #14 on: August 29, 2008, 07:35:28 PM »
Actually, better keep to making nice drawings. Much better than anything I could produce ...

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: Slower vehicles on diagonals
« Reply #15 on: August 30, 2008, 02:35:59 AM »
I've tried the feature in the nightly and it is great!  Everything looks more natural now.  Thanks, Prissi.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: Slower vehicles on diagonals
« Reply #16 on: August 30, 2008, 09:43:40 PM »
Anybody who tried this in the nightly: The savegames created there will not readable with 1983 and up. But now the length on a diagonal can be configurable, from the simuconf.tab in the pak/config folder (and only there) by "diagonal_length=512 (old resp. 724 (new default)

Offline yoshi

  • Devotee
  • *
  • Posts: 133
  • PAK128.Japan Maintainer
    • pak128.Japan
  • Languages: JA
Re: Slower vehicles on diagonals
« Reply #17 on: August 30, 2008, 10:31:44 PM »
Isn't it "diagonal_multiplier = 512"?


*Edit*

When I use "diagonal_multiplier = 512", the vehilce movement on diagonal tracks is not as smooth as past versions... Isn't this avoidable?
« Last Edit: August 31, 2008, 02:18:58 AM by yoshi »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: Slower vehicles on diagonals
« Reply #18 on: August 31, 2008, 05:52:38 PM »
This is a calculation error ...

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Slower vehicles on diagonals
« Reply #19 on: September 02, 2008, 04:27:26 PM »
This patch cause me a problem : in my project MLM dev., diagonal vehicles are stretched to avoid spaces between vehicles as explained in this picture :


So the question : Have I to continue stretching vehicles or reduce their length as a normal vehicle of pak128 European ?

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Slower vehicles on diagonals
« Reply #20 on: September 02, 2008, 05:31:06 PM »
If I understood correctly, the new default will be that the vehicles can now be shorter on diagonals since most vehicles in pak128 (and pak64) were not stretched for that view any way. But I guess the final word on that has to come from the PAKset-maintainers. But if it comes as I have said, and your vehicles were already stretched for the old version, then yes, you'd have to either shorten them, or live with some graphical errors happening (tried it with my Shinkansen trains - it's there, but the error wasn't that bad. So updates can wait a little, but I think I will shorten them to fit in the new system soon.)

Just try for yourself - once you know what pak128 will do.

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Slower vehicles on diagonals
« Reply #21 on: September 02, 2008, 06:17:11 PM »
So I will short them because I had to remake most of them for a better quality.

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Slower vehicles on diagonals
« Reply #22 on: September 03, 2008, 10:46:23 AM »
I have an other problem : I tried to count the average length of diagonal vehicles and I found :
_ 43 pixels for Bernhardt E-11
_ 44 for a passengers car and a category_07 car
_ 49 for a cooling car

So how many pixels length a diagonal train must be ?

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Slower vehicles on diagonals
« Reply #23 on: September 03, 2008, 01:17:14 PM »
I haven't started yet, but what I'll probably do is make up some dummy graphics (just one wagon a red rectangle, the next a yellow rectable of the approximate size and then just do it by trial&error, using screenshots. (That's how I usually check my creations for detail and/or positioning issues (of course as soon as I have it done once, I'll take the measures from that prototype. And if you take the length-settings into accout, that's usually working well enough for all vehicles.)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: Slower vehicles on diagonals
« Reply #24 on: September 03, 2008, 03:21:43 PM »
It should be 64/sqrt(2) of the full length, I think which is 45.3. THus to have overlap use 46, for loose coupling use 44. But I would wait until a maintainer of pak128 spokes up.

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Slower vehicles on diagonals
« Reply #25 on: September 04, 2008, 04:59:32 PM »
Someone who has patched version can test this TR-08 for me ? I reduced diagonal size to 46 pixels.
« Last Edit: September 04, 2008, 05:01:47 PM by gauthier »

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Slower vehicles on diagonals
« Reply #26 on: September 04, 2008, 05:05:46 PM »
Someone who has patched version

Why? Wernieman is back and so is the nightly page - and the new diagonal-system is included the latest nightlies. ;)

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Slower vehicles on diagonals
« Reply #27 on: September 04, 2008, 05:07:30 PM »
oh thanks, I didn't know it, thanks  ;D

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: Slower vehicles on diagonals
« Reply #28 on: September 05, 2008, 07:34:45 AM »
Sorry, I donĀ“t write it  to everybody  :D

Offline wipi35

  • Devotees (Inactive)
  • *
  • Posts: 250
  • Imagination is more important than knowledge
  • Languages: NL,EN,GE,FR
Re: Slower vehicles on diagonals
« Reply #29 on: September 05, 2008, 10:00:14 AM »
Why? Wernieman is back and so is the nightly page - and the new diagonal-system is included the latest nightlies. ;)

Downloaded r2000, it looks so nice, really a major improvement.

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Slower vehicles on diagonals
« Reply #30 on: September 05, 2008, 11:46:55 PM »
Just got to check it for the first time...

looks a bit strange at first - I guess one is simply used to the "wrong" images. But after a couple of minutes I really started to like it - well done, prissi!

But it's going to be so much work...  :P

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: Slower vehicles on diagonals
« Reply #31 on: September 06, 2008, 07:10:11 PM »
It can be switched off anyway from pak128/config/simuconf.tab ...

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Slower vehicles on diagonals
« Reply #32 on: September 06, 2008, 08:50:24 PM »
I tried to do that (just for testing) - and it didn't work.

Didn't bother me enough to dig any deeper, because I am already convinced of the new system. (=Maybe I did it wrong).

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: Slower vehicles on diagonals
« Reply #33 on: September 06, 2008, 08:59:04 PM »
diagonal_length=1024 in the config file in the pak/config (and only there!)

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Slower vehicles on diagonals
« Reply #34 on: September 06, 2008, 09:05:45 PM »
Yes, that works. I tried with 512  ::)