The International Simutrans Forum

 

Author Topic: [funpatch] play simutrans on a torus  (Read 8450 times)

0 Members and 1 Guest are viewing this topic.

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
[funpatch] play simutrans on a torus
« on: June 07, 2009, 11:08:12 AM »
With this patch you can play simutrans on a torus, i.e. if you leave the map on the top/left, you will re-enter it at the bottom/right and vice versa.

There are still some bugs (wegbauer and income calculation), but it is still playable.

I didn't aimed, that it comes into trunk. I just wanted to test it and now you can test it, too.

You can find the path at www.tu-chemnitz.de/~gerw/patches/torus_v2.patch.

Edit: Income calculation should work now.
« Last Edit: June 07, 2009, 02:35:41 PM by gerw »

Offline MoTw

  • *
  • Posts: 137
  • ~ Mister Kanister ~
    • Depp-City
Re: [funpatch] play simutrans on a torus
« Reply #1 on: June 07, 2009, 11:19:10 AM »
Sounds funny! But when clicking the link it says "Error 404"!  :'(

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: [funpatch] play simutrans on a torus
« Reply #2 on: June 07, 2009, 11:50:02 AM »
Should work now. I've forgotten the "/patches".

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: [funpatch] play simutrans on a torus
« Reply #3 on: June 07, 2009, 02:30:25 PM »
ways and paths can be built trough the limits of the map ?

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: [funpatch] play simutrans on a torus
« Reply #4 on: June 07, 2009, 02:33:55 PM »
Yes. And vehicles can drive through. If all works perfect, you shouldn't notice the map borders at all.

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: [funpatch] play simutrans on a torus
« Reply #5 on: June 07, 2009, 03:20:44 PM »
That sounds like fun :) Too bad you cannot allow Simutrans to be played on a sphere!

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: [funpatch] play simutrans on a torus
« Reply #6 on: June 07, 2009, 03:40:35 PM »
That sounds like fun :) Too bad you cannot allow Simutrans to be played on a sphere!
But it could be possible (with some work) to play simutrans on a Cross-cap. It's almost a sphere...

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: [funpatch] play simutrans on a torus
« Reply #7 on: June 07, 2009, 08:33:21 PM »
there is a little big problem ... ingame map extension couldn't be used anymore :/

Offline Isaac Eiland-Hall

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3912
  • Providing hosting for Simutrans projects
    • pc2.io
  • Languages: EN
Re: [funpatch] play simutrans on a torus
« Reply #8 on: June 07, 2009, 09:28:56 PM »
Ooh, this does sound like fun :)

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: [funpatch] play simutrans on a torus
« Reply #9 on: June 08, 2009, 06:07:52 AM »
there is a little big problem ... ingame map extension couldn't be used anymore :/
Of course. You can't extend your map, if you built over the edges. So map extension is disabled. You can enable it by reverting the changes in simwerkz.h

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4869
  • Languages: EN, DE, AT
Re: [funpatch] play simutrans on a torus
« Reply #10 on: June 08, 2009, 06:08:37 AM »
there is a little big problem ... ingame map extension couldn't be used anymore :/

why would you like to enlarge an infinite map (ie a map without borders) ? ;)

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: [funpatch] play simutrans on a torus
« Reply #11 on: June 09, 2009, 07:47:27 AM »
for the same reaseon as normal maps ;)

Online prissi

  • Developer
  • Administrator
  • *
  • Posts: 10627
  • Languages: De,EN,JP
Re: [funpatch] play simutrans on a torus
« Reply #12 on: June 11, 2009, 08:20:28 AM »
I linke the idea of an torus map. However, I fear several stuff need still to be fixed, like the income and the factory-chain builder and probably some other places too.

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: [funpatch] play simutrans on a torus
« Reply #13 on: June 11, 2009, 09:04:14 AM »
The income is already fixed. And also connection of factories should work right, since I used the function welt->torus_dist, which calculates the distance of to coordinates on the torus.

One thing that doesn't work yet is wegbauer_t::calc_distance. It is easy, if you calculate routes from a single starting point to an initial end point. But if you consider several end points, some additional logic is needed.

And I think, there are some differences of koord(3d) left, which should be replaced by welt->koord_diff.

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: [funpatch] play simutrans on a torus
« Reply #14 on: June 11, 2009, 10:25:51 AM »
Does this patch completely rule out map enlargement, or is it mutually exclusive per-map feature?

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: [funpatch] play simutrans on a torus
« Reply #15 on: June 11, 2009, 10:47:16 AM »
In the current version of the patch, all maps are tori. Therefore map enlargement is disabled.

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: [funpatch] play simutrans on a torus
« Reply #16 on: June 11, 2009, 06:12:24 PM »
It could be included as a setting in new world window.