Physics patches

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

klogg
Traffic Manager
Traffic Manager
Posts: 248
Joined: 10 May 2006 13:55

Post by klogg »

I took me one hour to read the whole thread. (I did it because it is very interesting)
Now I can just say: Great!
You and all the other guys involved did/are doing a great job!
Whow! :o
You folks really did a nice upgrade to the game.
I hope you keep up maintaining and improving the patch
until it has become a very true part of OpentTTD.

klogg
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Talking literally about becoming a part of OpenTTD - it will soon become a part of MiniIN build of OpenTTD. Now - is there any other version of OpenTTD worth mentioning? ;-)
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

SirkoZ wrote:One question though - why do maglevs get slowed down on the hills (to such extent) - is it really >>all<< just air resistance?
Gravity. See MiniIN thread.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Excellent patch hertogjan. :)

Just one small suggestion concerning the GUI. You have correctly increased the size of the train purchase list to show the Max. Tractive Effort. The autoreplace window should also be increased in size by the same amount.

I haven't yet found a case where the text overflows the window (the screenshot shows the nearest I've found), but the "Refittable to:" info. can use two lines of text. I believe that some GRFs use more than the two lines of additional GRF text ("Suitable for:", "Special features:") shown in the screenshot.
Attachments
GUI_Window_Sizes.png
GUI_Window_Sizes.png (64.48 KiB) Viewed 11059 times
Image
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

DaleStan wrote:
SirkoZ wrote:One question though - why do maglevs get slowed down on the hills (to such extent) - is it really >>all<< just air resistance?
Gravity. See MiniIN thread.
Still - quite a slowdown for such powerful train...
hertogjan
Director
Director
Posts: 560
Joined: 03 Jan 2006 20:45
Location: Netherlands

Post by hertogjan »

The following patches change the behaviour for trains in curves, in particular the length-two S bend. As this type of curve is commonly used and hardly avoidable, the maximum speed in this type of curve is lifted. Now most trains will travel through these curves at a speed which is in the order of their engine's maximum speed.

I will look to the GUI issues later on.
Attachments
patch_physics_r5698-miniin_01-08-2006.patch
Physics patch - version 01-aug-2006 - r5698-MiniIN
(3.76 KiB) Downloaded 379 times
patch_physics_r5698_01-08-2006.patch
Physics patch - version 01-aug-2006 - r5698
(136.39 KiB) Downloaded 357 times
meowsqueak
Engineer
Engineer
Posts: 48
Joined: 05 Jul 2006 22:25

Post by meowsqueak »

SirkoZ wrote:
DaleStan wrote:
SirkoZ wrote:One question though - why do maglevs get slowed down on the hills (to such extent) - is it really >>all<< just air resistance?
Gravity. See MiniIN thread.
Still - quite a slowdown for such powerful train...
Gravity - it's not just a good idea, it's the law. 8)
hertogjan
Director
Director
Posts: 560
Joined: 03 Jan 2006 20:45
Location: Netherlands

Post by hertogjan »

Maybe I should send SirkoZ to the moon: No air friction, and reduced gravity, so his MagLevs would be fast as lightning.

But seriously, it would not be unthinkable of having the gravity and air friction be dependent on the climate. I might actually be quite interesting to see what happens to your trains on the moon or on Mars. Is there a volunteer to create the graphics for a moon or Mars "climate" (and to implement them into OpenTTD)?
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Maybe we'll pick your patch and throw it out of the MiniIN. ;)

But seriously - from now on - I'll use four-locomotive maglev trains. :idea:
User avatar
Villem
Tycoon
Tycoon
Posts: 3310
Joined: 28 Aug 2003 09:38

Post by Villem »

mart3p wrote:Excellent patch hertogjan. :)

Just one small suggestion concerning the GUI. You have correctly increased the size of the train purchase list to show the Max. Tractive Effort. The autoreplace window should also be increased in size by the same amount.

I haven't yet found a case where the text overflows the window (the screenshot shows the nearest I've found), but the "Refittable to:" info. can use two lines of text. I believe that some GRFs use more than the two lines of additional GRF text ("Suitable for:", "Special features:") shown in the screenshot.
Heh, Tropical set's texts overflowed both, the buy window & autoreplace window last time i checked.
hertogjan
Director
Director
Posts: 560
Joined: 03 Jan 2006 20:45
Location: Netherlands

Post by hertogjan »

I have made a little update for the MiniIN version. I included the old realistic acceleration, which I have called SRA-T (i.e., semirealistic acceleration for trains). It is not entirely the old function, since I had to clean up some code to get it working. Also, I removed the nasty velocity conversion bug* which I talked about in a different topic (the MiniIN topic, I believe).
Please note that it is not exactly the realistic acceleration function which was in the MiniIN before the physics patch was put in, since that function was already a modified version (by SirkoZ).
Moreover, I have implemented some little GUI fixes**.

Note: If you create savegames with this patch, they may be broken if this patch is merged into the MiniIN branch later on.


*There was a conversion from mph to km/h, but someone forgot to take it out when the internal units of the game were changed from mph to km/h, which was somewhere in April or so.

**For instance, I changed the "tilts in curves" line to "Special feature: Tilt", which is also (more or less) equal to the line that is included in some NewGRFs. It is only shown if there is no NewGRF extra text (to prevent it from being displayed twice) -- assuming that GRF coders who include extra text will also include "Special features: Tilt" if applicable).
Attachments
patch_physics_r5806-miniin_07-08-2006.patch
Physics patch - version 07-aug-2006 - r5806-MiniIN
(no trunk version this time)
(21.21 KiB) Downloaded 375 times
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

From what I see in the above diff, you didn't at all include the realistic acceleration, that was before in MiniIN - instead - it's the default, crappy (with all due respect), OTTD realistic acceleration.
What is up with that?! :?
hertogjan
Director
Director
Posts: 560
Joined: 03 Jan 2006 20:45
Location: Netherlands

Post by hertogjan »

hertogjan wrote:Please note that it is not exactly the realistic acceleration function which was in the MiniIN before the physics patch was put in, since that function was already a modified version (by SirkoZ).
That's what I told you. It was the trunk version of realistic acceleration.
Anyway, here is also the same patch, but with SirkoZ's smoother realistic acceleration patch applied. But actually, with all respect, there aren't that many differences (but I have to admit that it is slightly less worse than the trunk version). ;)

[edit]Also added a trunk version.
Attachments
patch_physics_r5810-miniin_08-08-2006.patch
Physics patch - version 08-aug-2006 - r5810-MiniIN
(21.54 KiB) Downloaded 382 times
patch_physics_r5811_08-08-2006.patch
Physics patch - version 08-aug-2006 - r5811
(143.53 KiB) Downloaded 357 times
Last edited by hertogjan on 08 Aug 2006 19:55, edited 1 time in total.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

hertogjan wrote:
hertogjan wrote:Please note that it is not exactly the realistic acceleration function which was in the MiniIN before the physics patch was put in, since that function was already a modified version (by SirkoZ).
That's what I told you. It was the trunk version of realistic acceleration.
Anyway, here is also the same patch, but with SirkoZ's smoother realistic acceleration patch applied. But actually, with all respect, there aren't that many differences (but I have to admit that it is slightly less worse than the trunk version). ;)
Of course it's better - DUH! Whay good would it do otherwise?
As for differences - try to make such a small patch and have it affect the gameplay so pleasantly! 8)
hertogjan
Director
Director
Posts: 560
Joined: 03 Jan 2006 20:45
Location: Netherlands

Post by hertogjan »

Well, the old realistic acceleration function was written by someone on some day, and I think that no one (of the devs) ever looked to it again. That's why it hasn't been updated (in trunk) for a long time.
Also, there are more important things to do. And why make your hands dirty on something that is already worked on by somebody else? I mean, why update that old dirty function if some bloke is already coding a new version which will be better anyway ;).
Your patch is simple but effective, which is a great thing, but the background is still that old crappy function.

Anyway, this patch (the MiniIN version at least) includes both functions (each with its own advantages and disadvantages), so that the player can choose the one (s)he likes best.

Maybe, if this version is merged with the branch, you should insist on keeping the credits for SRA-T, or, as it is currently called, Realistic Acceleration v2.0.
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

hertogjan can you please post (and update) your patches in your first post, that makes getting them easier and wastes less space of the forum. Thanks
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
hertogjan
Director
Director
Posts: 560
Joined: 03 Jan 2006 20:45
Location: Netherlands

Post by hertogjan »

Here is an updated version of the MiniIN version of the physics patch.
It is the same as the previous version: No new features, only made compatible with the MiniIN branch changes, so that it will merge again without problems.
Attachments
patch_physics_r6394-miniin_05-09-2006.patch
Physics patch - version 05-sep-2006 - r6394-MiniIN
(21.76 KiB) Downloaded 315 times
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Patch added. Many thanks.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
hertogjan
Director
Director
Posts: 560
Joined: 03 Jan 2006 20:45
Location: Netherlands

Post by hertogjan »

The following fixes a bug with road vehicle data (power, weight) not being initialised properly after loading a game.

(Note: Bug appeared only shortly before. As you may have noticed, many of the older versions did not contain this bug.)
Attachments
patch_physics_r6434-miniin_09-09-2006.patch
Physics patch - version 09-sep-2006 - r6434-MiniIN
(1.28 KiB) Downloaded 335 times
patch_physics_r6434-09-09-2006.patch
Physics patch - version 09-sep-2006 - r6434
(141.95 KiB) Downloaded 349 times
orcaz
Engineer
Engineer
Posts: 97
Joined: 13 May 2006 19:45
Location: Kobe, japan

Post by orcaz »

Will it be in next MiniIN? The last time i tried to compile a patch, it failed.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 12 guests