The International Simutrans Forum

 

Author Topic: Simutrans Experimental [Original thread]  (Read 51376 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Simutrans Experimental [Original thread]
« on: January 21, 2009, 12:20:03 AM »
Archive thread - no further information will be added here. See other threads in the Simutrans-Experimental forum for more information

Introduction

As many forum regulars may be aware, I have recently developed a number of patches that are designed to have a substantial impact on gameplay. These patches have not yet been included into the trunk, quite probably because that impact has not yet been fully tested. I thought that it might be helpful if I produce a single experimental version, containing all of the various alterations that I have made to the code, for people to be able to test the gameplay impact of my modifications for themselves. I will release both the source code and a Windows binary so that people can see the modified source code all in one place, and also so that people without the wherewithal or inclination to compile from source can test (and even, if it is found to be stable enough, play with) my modified version. The experimental version is based on the latest nightly at the time of release - partly for that reason, and partly because my new features are not fully tested - it should be considered beta software and used accordingly.

I will keep this original post updated with the latest information on the progress of this experimental version as matters progress. I am also currently working with the PakBritain team, and hope for there to be a release (possibly an interim release) of a version of PakBritain that takes advantage of the extra features in this experimental version (but is also compatible with the default version) fairly soon.

Getting the necessary files

1. Source code

Simutrans-Experimental now uses a version control system ("VCS") called "Git" (as written by Linus Torvolds, no less), and no longer uses patch files (which can be hard to apply). The Simutrans-Experimental Git repository is here. For a tutorial on how to use Git, see here. The standard Simutrans SVN is also mirrored on Git here. Git is compatible with Linux and Windows (and possibly also MacOS X, although I have not verified that).

It is recommended that those who wish to get the source code for Simutrans-Experimental setup a separate directory for doing so than that used for the normal source code. Anyone wishing to contribute to coding for the Experimental version is welcome to do so, using Git's very flexible branching system (which makes it far easier to merge a branch back into the trunk than is possible with SVN). So, unlike with standard Simutrans, to make an alteration to the code of Simutrans-Experimental, do not upload a patch file - fork the code in the standard Git way. Any modification that is included in Simutrans-Experimental will be included by way of re-merging the code, rather than applying a patch. Please let me know if you have forked the code so that I can merge back in any desirable new features!

2. Modified configuration files

The attached file Simutrans-experimental-config.zip contains all of the modified configuration files required for the experimental version, including:

(a) simuconf.tab:

This is my configuration file sample, needed because many of my modifications need their own configuration settings. This is an example from PakBritain-Experimental, but should be able to be modified for other paksets easily. The new features are, I hope clearly, documented.

(b) privatecar.tab:

This is a special configuration file, needed for one of the new features incorporated into this version: competition with private cars.

(c) en.tab:

These are slightly revised translation texts for the English language, as there is no specific Simutranslator entry for some of the new texts that have to be translated for the additional features. If anyone wants to produce a non-English version, please reply to this thread with the amended file attached.

(d) speedbonus.tab:

This is a modified speed bonus file for Pak128, taking into account the modified speed bonus system used in this experimental release. This may change again when the new revenue system is implemented.

3. Program files (binaries)

These are the files that will be needed if you cannot or do not want to compile Simutrans-Experimental from source. Simutrans-Experimental may well be added to the official nightly builds (albeit not as often as nightly) in the near future, but, for the time being, a Windows executable version of Simutrans-Experimental can be downloaded here, and a Windows executable version of Makeobj-Experimental (for making assets that take advantage of Simutrans-Experimental's new features) can be downloaded here. (Note: new version)

List of modifications

Note: This list of modifications is only updated with every binary release of Simutrans-Experimental. Binary releases of Simutrans-Experimental will be less frequent than code updates on Git. For modifications to the source code on Git, see the commit comments.

I have included all of my recent patches, plus one or two patches produced recently by other regular contributors, but not included in the trunk. I have assumed that those patches have been released under the Artistic licence, and that the authors will, therefore, have no complaint about their code being included. If I am mistaken in that view, please contact me via PM and ask to have your patch removed from the experimental version.

1. Modification of speed bonus for local transport*; and

2. increase of running costs for obsolete vehicles, both explained further here.

3. Modified passenger generation, including local weighting and alternative destinations, explained further here.

4. Competition with private cars, as discussed further here.

5. Cornering, weight limits and tilting trains, as discussed here.

6. Way constraints (new in this version - fully implemented in the code and UI) as also discussed here.

7. Catering level (implemented in .dat files and UI only - currently has no effect on gameplay. Also, mail vehicles with a catering level above 1 are treated as "travelling post office" vehicles, but no effect on gameplay is yet coded), as also discussed  here.

8. Enhanced physics for steam locomotives.

9. Industries close down at a random point between 0 and 30 years after their retirement date. A message is displayed in the ticker when an industry closes down. Any other industries in the same chain either re-link to another supplier/consumer, or, if they cannot find one, close down themselves.

10. The origins of goods/passengers/mail are displayed with vehicles and stops (New in this version: origin data now saves).

11. Automated replacement of vehicles, by Isidoro, (updated to be compatible with way constraints) discussed here. (New in this version): data on replacing vehicles now saves: replacing will occur as planned when reloading from a saved game when convoys are saved as being set to be replaced.

12. More sophisticated handling of debt (including: customisable interest on debt, an option to turn off bankruptcy, and a credit limit, beyond which no further capital purchases can be made (which can be disabled)). More details on this feature here.

13. (New in this version) Accurate reversing for trains, including different types of trains taking longer to reverse: see here for more details. (Note: this will only work with customised pakset data, made using a recent version of Makeobj-Experimental)

14. (New in this version) Variable loading time for all vehicles: see here for more details. (Note: this will only work with customised pakset data, made using a recent version of Makeobj-Experimental)

15. (New in this version) Upgrading (rather than buying and selling) of vehicles, fully integrated with the vehicle replacing system;  see here for more details. (Note: this will only work with customised pakset data, made using a recent version of Makeobj-Experimental)

* This will become obsolete when item no. 1 on the to do list is completed.

Please note also that the experimental version excludes a feature of some of the more recent nightlies, the revenue being based on the straight line distance between the start and end point of the whole journey, rather than for each transfer. It has been omitted because it would be difficult to integrate with the existing code, is not entirely realistic, and will be redundant once the new revenue system is in place.

Note: (New - 15th of March 2009) The save game files produced by Simutrans-Experimental are no longer compatible with save game files produced by standard Simutrans. Simutrans-Experimental can load save games from standard Simutrans, but standard Simutrans cannot load files saved by Simutrans-Experimental. This new version, however, enables data, such as the weight limits of tracks/roads, etc., the origins of goods, which vehicles are being replaced and so forth, to be saved.

To do

There are a number of further plans that I have in relation to work on this experimental version. In approximate order of priority so far:

(1) revised revenue system, with revenues based on journey times and accommodation level, not the maximum speed of vehicles;

(2) full implementation of catering and travelling post offices;

(3) a system in which labour costs (and possibly other costs) vary depending on the year;

(4) an implementation of overcrowding for passenger services;

(5) a more sophisticated means of passengers/goods choosing which route to take to travel, or whether to take their private cars as opposed to public transport, based on the new revenue model described at (1) and (possibly) the quality of services metrics being developed by Isidoro; and

(6) merge in the underground view and underground slopes patches if this has not already been included in the trunk.

Known issues

1. The sort ordering for goods in transit or at stations does not work - this is associated with origins tracking, although the reason is not entirely clear.

2. When goods from different origins have the same destination, they are not combined together in the GUI for convoys or stations, even when the mode is not set to sort by origin.

3. Interest payments are not shown in the finance history window. Fixing this requires reversioning the save game files.

Fixed bugs

15th of February 2009

1. Cornering speeds would often be incorrect when more than one vehicle was moving at once.

2. Detection of overweight vehicles became erratic when more than one vehicle was moving at once.

3. (Fixing items 1 and 2 might also have resolved occasional crashes that had not hitherto been traced or reproduced effectively).

4. Crash (assertion failure) when loading a saved game.

5. Crash (uninitialised variable) sometimes when loading saved games.

22nd of February 2009

6. Occasionally, vehicles set to be replaced automatically will not go to the depot automatically as they should.

7. Instability and unexpected behaviour when vehicles unload in a game that has been loaded from a saved game.

26th of February 2009

8. Crash (access violation) on some occasions relating to the code for detecting when vehicles are climbing hills.

15th of March 2009

10. Origin data are not saved.

11. Maximum weights on track are not set correctly when loading a saved game.

Feedback

The whole point of this experimental version is to enable people to experiment. I should be very grateful for any feedback that people have from using this experimental version, particularly as regards: (1) bugs; and (2) gameplay/balancing issues. Please, however, do not post about bugs or gameplay issues until you have verified that the bugs/issues are present only in the experimental version, and cannot be reproduced in the standard nightly (if they can, please make a stand-alone bug report in the usual way). I should also be grateful for any suggestions for improvement, although please be aware that, because I am busy with work, I may not have the time to implement even good suggestions.

Happy experimenting!
« Last Edit: April 12, 2009, 03:44:22 PM by jamespetts »

Offline isidoro

  • Devotee
  • *
  • Posts: 1128
Re: Simutrans Experimental
« Reply #1 on: January 21, 2009, 12:55:32 AM »
My code (and my body) is free for testers...  Go ahead.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #2 on: January 21, 2009, 08:55:38 AM »
My code (and my body) is free for testers...  Go ahead.


Thank you :-)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #3 on: January 21, 2009, 10:33:28 PM »
Update: Both source and binary versions are now updated for official Nightly 2259 (21 Jan. 2009), and the configuration files are consolidated into a single .zip file for convenience and speed.

Further update: Experimental 0.2 contained a bug which would cause the game to crash whenever a vehicle reached a stop. An updated version is now available that fixes that.
« Last Edit: January 22, 2009, 12:16:02 AM by jamespetts »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #4 on: January 24, 2009, 01:24:19 PM »
New: Windows binary for Makjeobj-Experimental now available, to allow asset authors to make assets compatible with the new features in Simutrans-Experimental. See the original post for the link. Also, reference has been added in the future features list to changing labour costs, etc., over time, as well as a reference to overcrowding.
« Last Edit: January 24, 2009, 01:41:04 PM by jamespetts »

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: Simutrans Experimental
« Reply #5 on: January 25, 2009, 01:57:54 PM »
Is it possible to rewrite the code for GCC safety ?
I can't compile your code on MinGW + MSYS because of too many errors, and I gave up.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #6 on: January 25, 2009, 02:01:57 PM »
Z9999,

ahh, I wasn't aware that there were errors that would be produced on some compilers but not others with this code. Can you give me an idea of what those errors are and where in the code they are to be found?

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: Simutrans Experimental
« Reply #7 on: January 25, 2009, 02:11:48 PM »
...
Edit: Binary version for Windows now available here.
Edit 2: Binary version of Makeobj-Experimental (for compiling assets compatible with the extended features in Simutrans-Experimental) available here.

pleace delete the www. from links

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #8 on: January 25, 2009, 02:25:09 PM »
pleace delete the www. from links

Done :-)

Offline sojo

  • Devotees (Inactive)
  • *
  • Posts: 851
  • Maintainer pak96.comic
    • German home of Simutrans
Re: Simutrans Experimental
« Reply #9 on: January 25, 2009, 07:51:27 PM »
Quote
5. Cornering, weight limits and tilting trains, as discussed here
I have tested the cornering. I think it looks good for trains but not so good for road-vehicles.

And i had the feeling sometimes some vehicles drive to fast. (It were citycars).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #10 on: January 25, 2009, 08:32:35 PM »
Sojo,

interesting comments about road vehicles - have you tried adjusting the values in simuconf.tab? All the various cornering settings are adjustable by waytype in simuconf.tab, so you can reduce the impact of corners just for road vehicles. If you find some values that you think are better than the default, let me know, and I'll try them out, and, if they work, include them as the default in a subsequent release. Thank you for your work!

Offline sojo

  • Devotees (Inactive)
  • *
  • Posts: 851
  • Maintainer pak96.comic
    • German home of Simutrans
Re: Simutrans Experimental
« Reply #11 on: January 25, 2009, 08:34:39 PM »
I have done no changes. I have used my normal simuconf.tab without any of this settings.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #12 on: January 25, 2009, 08:47:56 PM »
Ahh - to make Simutrans-Experimental work properly, you need to use a specially adapted simuconf.tab: a copy is included in Simutrans-experimental-config.zip. The reason for this is that there are a number of Simutrans-Experimental specific settings that need to be set in simuconf.tab.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Simutrans Experimental
« Reply #13 on: January 26, 2009, 10:26:09 AM »
and is experimental simuconf.tab back compatible with standard simutrans?

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: Simutrans Experimental
« Reply #14 on: January 26, 2009, 12:53:05 PM »
You don't have MinGW, then it's okay. Don't mind, thank you.  :)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #15 on: January 26, 2009, 05:07:11 PM »
Fabio,

yes, it should be, since additional parameters in the file not supported are simply ignored.

Z9999,

what OS were you trying to compile it in? I use MSVC++ Express Edition, as recommended in the thread explaining how to compile the code. MinGW is a Windows compiler, so, if you are using Windows, you can just use MSVC++ Express Edition (free). If you are using Linux and cannot compile there, that is something that I'd need to fix.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Simutrans Experimental
« Reply #16 on: January 26, 2009, 05:08:10 PM »
yes, it should be, since additional parameters in the file not supported are simply ignored.

good to know! ;)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #17 on: January 31, 2009, 07:08:43 PM »
Update: Simutrans-Experimental source code is now available on Git: see the original post for details. The source code has also been updated since the original release, and now includes the latest rivers code as well as other recent enhancements.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: Simutrans Experimental
« Reply #18 on: January 31, 2009, 09:38:49 PM »
.....

for git you need a git-Client?
(Have you an example for the acess?)

Or can I use svn???
« Last Edit: January 31, 2009, 09:42:50 PM by wernieman »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #19 on: January 31, 2009, 09:54:24 PM »
Yes, indeed one needs a Git client for Git (which was recommended to me over and above SVN). The process of downloading and installing the Git client for Windows is explained in this tutorial.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: Simutrans Experimental
« Reply #20 on: January 31, 2009, 09:55:55 PM »
Installing no Problem (Linux) but using .....

I say to you, that I make a spezial run for you experienze ... so the Server need the sources ..

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #21 on: January 31, 2009, 10:29:22 PM »
Here's some information on how to use Git - but I'm not sure that I really understand your second sentence.

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Simutrans Experimental
« Reply #22 on: January 31, 2009, 10:31:21 PM »
I read it that way, that's he's going to make a special nightly version - and for that his server needs the sources.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: Simutrans Experimental
« Reply #23 on: January 31, 2009, 10:39:31 PM »
Dirk .. you are good.....

I need the sources of the simutrans-experimental for compiling.

Have your git an anonymous access?? (Read Only)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #24 on: January 31, 2009, 11:13:22 PM »
Dirk - thank you for the translation! Yes, I hope that I've got it setup to allow anonymous access. Try here:

http://github.com/jamespetts/simutrans-experimental/tree/master

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #25 on: February 02, 2009, 11:41:47 PM »
Update - new binary and features

A new release of Simutrans-Experimental is now available (updated binaries linked from the original post; updated source code on Github), with all of the revisions of the trunk up to and including r2287 (incorporating the removal of the vehicle noise at fast-forward: that has now been removed from the list of Simutrans-Experimental specific features, as well as the ever popular rivers), and a new experimental feature: enhanced steam locomotive physics.

Steam locomotive physics - in detail

In standard Simutrans, steam locomotives are treated in exactly the same way as any other locomotive, but, in reality, their performance characteristics are different (as this article explains: http://www.railway-technical.com/st-vs-de.shtml). The main noticable effect of these differences are that steam locomotives are slower to accelerate and give poorer performance on gradients than diesel or electric locomotives of the same overall power. Those differences between steam and diesel/electric traction had a marked impact on the development of railways. Firstly, it lead to early railways being constructed to avoid gradients as much as possible, even if it involved relatively tight corners, since the reduction in speed necessary to take corners was far less than the reduction in speed that a gradient would bring about; secondly, it was part of what was responsible for a strong preference on the part of railway operators to replace steam with diesel and electric traction, when the technology became mature, especially for suburban services (involving regular starting/stopping) or services in areas with steep gradients.

Simutrans-Experimental now incorporates these physical characteristics in a somewhat simplified form. The precise mechanism is largely invisible to the player, who will only notice that steam trains perform worse at low speeds than diesel/electric trains of the same overall power. This should make network design choices more interesting, as well as giving players more incentive than they currently have to use electric trains early in the game, when their maximum speed and power is low. I have tested the new physics carefully with Pak128 and Pak64, and it seems to balance about right (with the exception of the RVg 0-4-0-T in Pak128, which is now underpowered, and cannot haul more than 3 coaches without being restricted to 3kph: the problem, I suspect, is a combination of the gear being set at 0.8 and the contemporary carriages being too heavy: making the settings more favourable to low powered locomotives than they are made other locomotives perform too well). PakBritain, unfortunately, is not currently balanced well in respect of steam locomotive power, so the effect of this feature is largely unnoticeable there (some steam locomotives have a gear factor of over 3 - the Princess Coronation class accelerates like a Ferarri with or without this feature). No doubt, rebalancing will come in time.

One thing for both players and asset authors to bear in mind is that this feature works by reducing the effective power of the locomotive at lower speeds. To take account of the fact that some steam locomotives are designed to run at low speeds and others at high speeds, without having to add a tractive effort factor to all the assets in the game (which would require a great deal of work to be re-done), the system that I have implemented assumes that a locomotive with a lower maximum speed per unit of power has more of its available power at the lower end of its speed, whereas a locomotive with a higher top speed has a greater proportion of its power available at higher speeds. The practical effect of this is that more powerful steam locomotives with lower top speeds (such as, for instance, the LMS 8F and BR 9F - indeed, most locomotives with a larger number of smaller driving wheels) have better acceleration and gradient climbing abilities than their faster cousins. This is balanced against the fact, of course, that they have a lower top speed. Thus, there is, with this feature, a greater differentiation between locomotives designed for freight work and locomotives designed for passenger/mail work than there is in default Simutrans.

I should be very interested for people to test this new feature (using the binary provided; or you can compile from the sources if you prefer) and give views as to whether I have balanced it correctly. I should also be interested in thoughts on whether there are any other (relatively simple to code) ways of improving locomotive physics, preferably that (1) have a substantial, balanced and realistic economic impact on the game; and (2) do not require changes to all existing vehicle assets to make work properly. Please reply to this thread with any thoughts.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9409
  • Languages: De,EN,JP
Re: Simutrans Experimental
« Reply #26 on: February 03, 2009, 08:20:33 AM »
Simutrans has no meaningful physics, if you look into the acceleration formulars. Those would bring any Newtonian to cry in despair. Trust me, I teach them every year. I tried the "correct" formulars too, but on the Simutrans scale those simply did not look neither realistic nor nice.

Moreover the power of any engine rail is in reality not the only constrait, there is also the tracktive effort (see TTD Patch for elaborate discussion) which ultimately give the max. accelleration at low speeds, where power is in excess. Also steam engines perform worse at high spoeed, when the steam consumption rate exceeds the boiler area. A steam engine has a certain power only at a certain speed. (Also electric engines has different posers ratios. Usually electric engines can give much more power, up to 100% for short time scales than their 1h nominal power. For instanc ethe 103 can give 10300 kW peak power but is rated for 7400kW.) The only meaningful power is for diesel engines; even more since they ran more or less at constant revolutions (compared to car engines at least).

By the way, how does the japanese engines work then? THose are very weak, same for old age engines.

And Simutrans has all modes of transport and thus the formula has to fit them all and (since we are a game) must be good looking too. It even worked somehow on planes, even though it was introduced before. Since there is only a few steam trucks and apart from that only steam ships, it might be still ok.

(On a side note, However, it would be easier to discuss you changes if you showed the relevant section of the code without requiring to install git to get all code and then look in simconvoi.cc for the changes.)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #27 on: February 03, 2009, 11:12:38 AM »
Prissi,

thank you for your thoughts - it is always useful to know about the physics end of things from a physicist. I am aware that the physics in Simutrans do not try to be exactly accurate because of the nature of the game - it would be a different matter if it were a train driving simulator, of course. My intention with this change is not to have Simutrans simulate accurate physics for the sake of it, but to increase the accuracy of the physics only in so far as it has a substantial economic impact on gameplay, and steam engines accelerating from a slow speed more slowly, and having more trouble on gradients seems to be a good start.

You mention one or two other interesting facets of physics that I am wondering whether to attempt to incorporate. Firstly, the reduced efficiency of a steam engine at very high speeds; so far, I have taken the speed limit given in the vehicle file as the expression of that loss of efficiency, but do you think that the effect is significant enough that I ought also make them slower to accelerate when they are nearing their top speed by reducing the effective power when a locomotive is within, say, 10% of its maximum speed? If the reduction in power was subtle enough, and slowly phased in, that might give a good effect (and look more realistic, too, than a vehicle accelerating at a near linear rate then suddenly stopping accelerating) without having too drastic an impact on things.

I am interested also in what you have written about electrics, but I am not sure that I fully understand. Is the electric engine's ability to deliver higher power output for short periods something that might usefully have an economic impact on the game, or is it too rarely used to make a real difference?

I am also aware of the different modes of transport (although there is nothing to stop there being code to give different physics models to different modes of transport, of course, with a simple switch case on the wtype), although altering steam physics in this way ought not have an impact on other modes of transport, since (1) steam road vehicles would largely be subject to the same effect (they did not usually have gearboxes); and (2) if there was ever a problem with anomalous effects for non-trains, it would be easy to add a test in the code to see whether the vehicle is a train before applying the new formulae.

As to the code, if you set up a Git repository for Simuntrans-Experimental, you can see the new code for each individual revision by using the "visualise history" setting in Git-GUI. Did you want me to paste the relevant code into this thread for further discussion?

Offline Spike

  • *
  • Posts: 1361
  • First Simutrans Developer and Graphics Artist
Re: Simutrans Experimental
« Reply #28 on: February 03, 2009, 11:22:11 AM »
I like the idea of having different engine characteristics for the steam engines. The "power" value is often discussed, and together with the "gear" value Simutrans already is pretty detached from real world engine powers (still people want to see those numbers in the vehicle specs, otherwise they complain).

While in general I think that special cases are bad for maintainability of a program, Simutrans-Experimental seems to be the proper playground for testing such ideas, and if you get along with the maintenance of Simutrans-Experimental, despite the added complexity, it's even better.

Summary: Variation is good, realism not necessary on this level IMO.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9409
  • Languages: De,EN,JP
Re: Simutrans Experimental
« Reply #29 on: February 03, 2009, 01:18:40 PM »
SInce GIT is only available for a very limited number of platforms and the discussion can surface in half a year or so again, pasting the relevant changes ensures we are talking about the same.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #30 on: February 08, 2009, 04:57:04 PM »
Update: New version of the binary available, which now includes a system of industries retiring between 0 and 30 years (the upper number can be set in simuconf.tab) after their in-built retirement date has passed, if the player is playing with the timeline enabled. This enables pakset authors to simulate a changing world/economy, and gives players with established industry connexions later in the game a greater challenge in having to adapt to changing circumstances. Industries in the same chain as those that close down either relink to other suitable industries, or close down themselves if there are no suitable other industries.

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Simutrans Experimental
« Reply #31 on: February 08, 2009, 05:00:36 PM »
That sounds awesome.  The only problem is that I said I would draw more industries when you had done this.  Why did you have to do it so fast? :p

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #32 on: February 08, 2009, 05:01:22 PM »
*** to you, too :-p

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Simutrans Experimental
« Reply #33 on: February 08, 2009, 05:08:00 PM »
Oh, wow. I hope the industry changes are one day ported back, because this is one of the things I was always hoping for...

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18376
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans Experimental
« Reply #34 on: February 08, 2009, 05:20:24 PM »
VS,

I'm glad that you like it. You could always just play Simutrans-Experimental, of course ;-)