Chill's patchpack v14_7

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

User avatar
ChillCore
Tycoon
Tycoon
Posts: 2858
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpack v10_7

Post by ChillCore »

Dwight_K._Schrute wrote: Unfortunately it is not only the BR 420 ...
Is that still the DB set? There is one ICE (or more) in the 2cc set too ...
Also now that we know when and where the bug was introduced feel free to report this particular bug in the appropriate thread ... preferably with info how to reproduce. eg. If I attach this wagon to this consist in this configuration this happens.
It is possible to build the BR420 for example in a way that the bug does not show but I need to do some more testing before I can tell for sure how to do it ...
and stop digging for V0.9. :mrgreen: AFAIK ther is no release yet... but I think it would be a nice christmas present for a lot of people :D
Grrrrrr. I was hoping for a test version. :mrgreen:
But thank you for the info anyway.



I did some more testing too yesterday with recently posted savegames and the savegame code...

@MagicBuzz:
The Daylenght factor is changed globally when loading a savegame but when changing it in game and saving the new value is not properly saved ... It uses a STDG_VAR instead of a STD_VAR for saving the value and I think that is where "the bug" is ... will need to do some more testing .
I think I nailed the the corrupting savegames bug when saving manually -> assert "in line 37 of ~/chipp_v11/src/date.cpp: fract < DAY_TICKS".
I could not yet reproduce it in my testfolder and the previously mentioned corupted savegame I could load again after messing in the saveloadcode ... Also here I need to do more testing before finding the correct numbers to insert.

@Nickelplate:
I have played your savegame for a year yesterday while leaving the daylenght factor at 30.
I could make towns grow without modifying additional code but it required a lot of input. @see attachment. The sign under the towname mentions population of when I started.
Here is what I did so far.
- I added a lot of local busses.
- I have bought statues in the three cities that are being served.
- I increased train capacity (cloned trains) and changed their orders a bit so that they use all platforms in Suntbridge.
- I funded some new houses in Ronningley a few times and payed for some advertisement.
- I have continued for a little while longer than jan 1925. Charnway had also grown bigger than initial after further increasing the number of trains, but I have not saved it as I want to change the town growth speed first. I wanted to play for a full year but I knew I was not going to finish that yesterday.
- While I was busy messing around I have paid of the loan as that makes a $20.000 difference a year.
I am going to play for another year while setting the town growth speed faster in advanced settings and see what difference that makes. I will then post your savegame so you can see what I did exactly.

@everybody:
- I have found where I have made the error that prevents current trunk savegames from being loaded when there is a HQ present and I have almost solved it.
- Basically I will have to review most of the changes in afterload.cpp (and related files) ...
- After testing some more I will be making my way to the next version as a lot has been fixed in trunk recently ... again.
Attachments
Montana Rail Link, 1925-01-09.png
Montana Rail Link, 1925-01-09.png (46.73 KiB) Viewed 4305 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
michael blunck
Tycoon
Tycoon
Posts: 5954
Joined: 27 Apr 2005 07:09
Contact:

Re: Chill's patchpack v10_7

Post by michael blunck »

Dwight_K._Schrute wrote: Unfortunately it is not only the BR 420 ...
Ah yes. So, could somebody having experienced that bug, please report it to http://bugs.openttd.org ?

As I´m neither using Chill's patchpack nor an OTTD version >= r21249, I´m not the right person to do it. Nevertheless, I´ll step into a possible discussion, if needed.

From my observation, this bug is due to a combination of a very early change in r5061 and a recent one in r21249.
Dwight_K._Schrute wrote: stop digging for V0.9. AFAIK ther is no release yet... but I think it would be a nice christmas present for a lot of people
Don´t hold your breath for DBXL 0.9. ATM, I´m working on other "Christmas presents". :cool:


[edit]
Chillcore wrote:Thank you for testing TTDPatch.
OK. Tested again with r2350, but I think this has always been working in TTDPatch:
effects.png
effects.png (7.58 KiB) Viewed 4679 times
Sparks also work, but it´s quite hard to get two of them doing so on one picture. 8)
[/edit]

regards
Michael
Last edited by michael blunck on 27 Nov 2010 10:51, edited 1 time in total.
Image
Kimby
Engineer
Engineer
Posts: 48
Joined: 02 Dec 2009 15:42

Re: Chill's patchpack v10_7

Post by Kimby »

ChillCore wrote: Todo:
<...>
- Try to reproduce Kimby's crash.
I've been trying all kinds of things to see what causes it and while I'm not exactly capable of giving you a precise sequence of events to follow, it does seem to always follow the use of the copy-paste function. However, it's not right after using it (I've successfully saved games after copy-pasting) but a while later and always at the moment I'm trying a manual save.

I know it's not much, but I hope it will at least narrow down things a bit.

Edit: I think I found a way to help out a bit more. The attached savegame is a file I saved after having used copy-paste. When I load it and go further 1 day, I can save it again without a problem. But when I load it, then load another game, go a day further in that game and try to save, I get the error. Reminder: this is with 10_7, I didn't try the 11 versions yet.
Attachments
Examples, 2020-01-02.sav
(35.93 KiB) Downloaded 100 times
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2858
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpack v10_7

Post by ChillCore »

michael blunck wrote:
Dwight_K._Schrute wrote: Unfortunately it is not only the BR 420 ...
Ah yes. So, could somebody having experienced that bug, please report it to http://bugs.openttd.org ?

As I´m neither using Chill's patchpack nor an OTTD version >= r21249, I´m not the right person to do it. Nevertheless, I´ll step into a possible discussion, if needed.

From my observation, this bug is due to a combination of a very early change in r5061 and a recent one in r21249.
Thank you for that revision number.
Reverting r5061 makes the steam go away but I think doing so causes some other unwanted behaviour also as a lot has changed in that area since then.
I will do some more testing later as I only did a very brief test and did not try different codechanges. eg. changing the default to "effects_disabled", etc ...
michael blunck wrote: Don´t hold your breath for DBXL 0.9. ATM, I´m working on other "Christmas presents". :cool:
Boo, I mean, Yay ... Yaboo? (Now I know how they got to choose Yahoo's brandname.)
Can't wait for Christmass ... :lol:
michael blunck wrote:
ChillCore wrote: Thank you for testing TTDPatch.
OK. Tested again with r2350, but I think this has always been working in TTDPatch:
Glad it is working fine in TTDPatch.
Kimby wrote:
ChillCore wrote: Todo:
<...>
- Try to reproduce Kimby's crash.
I've been trying all kinds of things to see what causes it and while I'm not exactly capable of giving you a precise sequence of events to follow, it does seem to always follow the use of the copy-paste function. However, it's not right after using it (I've successfully saved games after copy-pasting) but a while later and always at the moment I'm trying a manual save.

I know it's not much, but I hope it will at least narrow down things a bit.
Something is better than nothing. :)
Crash while saving? I crashed it before while pasting loaded templates ...
The copypaste bug is pretty hard to reproduce ... sometimes all goes well for a long time and sometimes it keeps crashing.
Kimby wrote: Edit: I think I found a way to help out a bit more. The attached savegame is a file I saved after having used copy-paste. When I load it and go further 1 day, I can save it again without a problem. But when I load it, then load another game, go a day further in that game and try to save, I get the error. Reminder: this is with 10_7, I didn't try the 11 versions yet.
That behaviour I can reproduce in v11_1 with your savegame.
Something to test in a debug build, which i have not yet compiled for v11_1.
Maybe it has to do with memory not being cleared correctly between changing games.

Try this:
Load a random game and copy some track but instead of pasting load another random game and select the paste tool.
The template is still there ... this should not happen IMHO.
I am not sure that this is the cause of the crash but I have a strong feeling it is related.

Thank you for the savegame and the effort.
Also ... Nice, prios with programmable signals. I have not seen many games with those yet. ;)



@MagicBuzz:
In the next version the natural sorting patch will be removed ...
Thank you Terkhen and Rubidium for r21340 to 21344.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Re: Chill's patchpack v10_7

Post by Cadde »

ChillCore wrote: While I will be doing that ... should I look for the vehicle income also to be devided by the daylenght factor or is the higher income a "desired" effect?
YEEEESSSSSS!

Please, there is already another daylength patch that attempts to balance incomes with changes to daylength. As well as town growth, cargo generation from industries, property maintenance and vehicle running costs etc etc.
If you haven't done so, please give it a look?

http://www.tt-forums.net/viewtopic.php?f=33&t=42432

Either way, i am running super expensive modifiers to building and buying all kinds of stuff just to balance out the daylength changes. Problem is that it's a backwards way of doing it because the problem is i am making too much money because time practically stands still when running daylength 10 or above. As far as cargo payment goes that is.

If anyone has a workspace set up and could make me a merge with this patch pack and the above linked daylength patch i would be forever grateful.
Been ages since i last made a binary myself and i know there's a lot to it.
dkarn
Engineer
Engineer
Posts: 13
Joined: 11 Nov 2010 17:51

Re: Chill's patchpack v10_7

Post by dkarn »

Hello Chill,

I use your last patch chipp_V11_1r21293.diff with OpenTTD trunk r21336.

So I create a game on a server with this configuration :
  • huge map = 2048*2048
    city = high
    industry = high
    without GRF
When i try to join it to play, a pop up appear with this message
  • "Possible connection loss"
    "The last 4 second no data has arrived from the server"
Image

After this message, server send me the map, and i succesfully connect to the game.
But each time a player try to connect or during autosave the same pop up appear.
More we are connect and bigger is this counter.
More this game is complex (A lot of trains / stations) and bigger is this counter.
Problem when the counter = 10 second, you are disconnect from the game.

I try the same with openttd 1.05 and no problem.

Do you have any idea about it ?
Thanks for this great patchpack :)
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2858
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpack v10_7

Post by ChillCore »

Cadde wrote:
ChillCore wrote: While I will be doing that ... should I look for the vehicle income also to be devided by the daylenght factor or is the higher income a "desired" effect?
YEEEESSSSSS!

Please, there is already another daylength patch that attempts to balance incomes with changes to daylength. As well as town growth, cargo generation from industries, property maintenance and vehicle running costs etc etc.
If you haven't done so, please give it a look?

viewtopic.php?f=33&t=42432
I will have a looksie at the patch and see where they differ so I can make appropriate changes in my source. Thank you for the link.
Either way, i am running super expensive modifiers to building and buying all kinds of stuff just to balance out the daylength changes. Problem is that it's a backwards way of doing it because the problem is i am making too much money because time practically stands still when running daylength 10 or above. As far as cargo payment goes that is.
Too much money eh? Usually people complain about not having enough. Crisis has not yet kicked in in OpenTTD. :lol:
If it is really too much too handle you can spend some by bulldozing water ...
If anyone has a workspace set up and could make me a merge with this patch pack and the above linked daylength patch i would be forever grateful.
Been ages since i last made a binary myself and i know there's a lot to it.
I would advise against this approach unless the currently included daylenght patch is removed first.
The only problem I see is that it was included in the "sprinkles patch" and was not a patch by itself when I added it. When it is removed one should not forget parts ... including modifications I have made afterwards.
Also, most likely savegame compatibility with previous versions will be lost. I still have not found the correct way to remove a setting from the saveload code and keep savegame compatibility at the same time. :(
Let me start by comparing the two patches first to see where they differ exactly.


dkarn wrote: Hello Chill,

I use your last patch chipp_V11_1r21293.diff with OpenTTD trunk r21336.
Hi dkarn.
So I create a game on a server with this configuration :

huge map = 2048*2048
city = high
industry = high
without GRF
That is a big map ...
When i try to join it to play, a pop up appear with this message

"Possible connection loss"
"The last 4 second no data has arrived from the server"

After this message, server send me the map, and i succesfully connect to the game.
But each time a player try to connect or during autosave the same pop up appear.
More we are connect and bigger is this counter.
More this game is complex (A lot of trains / stations) and bigger is this counter.
Problem when the counter = 10 second, you are disconnect from the game.
Unfortunately I have a wireless internet connection and it is not very stable at times. The last time I tried joining a server I was automatically kicked a few times when trying to change the company name. I have not yet tried after that to not annoy the people playing online as , If I understood correctly, the server is paused while someone joins and downloads the map.
So I hope you understand that my online experience is quite non-existant. Sorry.
Anyway, there were some changes in the documentation in 21349, I have quoted them below.
I hope they help in solving your problem somewhat.

Code: Select all

docs/multiplayer.txt (after 21349) says:

 - It can happen that a connection is that slow, or you have that many clients
   connected to your server, that your clients start to loose their connection.
   Some things you can do about it:
   - [network] frame_freq:
     change it in console with: 'set network.frame_freq <number>'
     the number should be between the 0 and 10, not much higher. It indicates
     the delay between clicking and showing up. The higher, the more you notice
     it, but the less bandwidth you use.
     A good value for Internet-games is 2 or 3.

   - [network] sync_freq:
     change it in console with: 'set network.sync_freq <number>'
     the number should be between the 50 and 1000, not much lower, not much
     higer. It indicates the time between sync-frames. A sync-frame is a frame
     which checks if all clients are still in sync. When the value it too high,
     clients can desync in 1960, but the server detects it in 1970. Not really
     handy. The lower the value, the more bandwidth it uses.

   NB: changing frame_freq has more effect on the bandwidth then sync_freq.
I would appreciate it if you could let me know if toying with the numbers above makes a difference, if not something might be wrong.
I try the same with openttd 1.05 and no problem.
OpenTTD 1.0.5 is not really the correct version to compare with. 1.0.5 is still based on the same revision that 1.0.0 was when the branch was split from trunk. Backports from trunk have been made afterwards resulting in 1.0.1, ... ,1.0.5 but other than that the revision has not changed.
The best version to campare with would be the same revision as the version of the pacthpack you are playing with is based upon. (r21336 in your case.)
I am reviewing my code and will be posting a new version soon against current trunk.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Re: Chill's patchpack v10_7

Post by Cadde »

ChillCore wrote:I will have a looksie at the patch and see where they differ so I can make appropriate changes in my source. Thank you for the link.
You are my hero! ;)
ChillCore wrote:Too much money eh? Usually people complain about not having enough. Crisis has not yet kicked in in OpenTTD. :lol:
If it is really too much too handle you can spend some by bulldozing water ...
Well, the point is to not have so much money one has to resort to arbitrary wasteful methods just to keep it nice and low. I am looking for a proper challenge where if you stop your network for even a short while it might cost you your entire company. Where one can actually go bankrupt by not paying attention to details. At least that's MY point.
So with that, i don't agree with getting paid stupid amounts of cash just to bring a trainload of passengers 400 tiles away in 20 days. I much prefer having a fixed amount of cash to spend (gained through cheating) and then use that cash to build just enough of an empire to become self sufficient, not by building a single passenger line from city A to city B but by actually having a complex transport network that relies on all components working smoothly for it to be profitable.
Where running trains empty equals a pretty big loss but if it's running at 80% or more capacity you start making money.
I dunno, i might just be the kind of guy that likes it to be painful. But there is something very satisfying with having timetables set up just right and constantly optimizing a network to minimize delays for maximized profits.
And that patch i mentioned also have a setting for train breakdowns so rather than a train breaking down once every 2 days you might set it so you get a breakdown (total) of twice a year. With daylength 16 or something like that it's going to be a fun challenge to take that into account.
ChillCore wrote:I would advise against this approach unless the currently included daylenght patch is removed first.
The only problem I see is that it was included in the "sprinkles patch" and was not a patch by itself when I added it. When it is removed one should not forget parts ... including modifications I have made afterwards.
Also, most likely savegame compatibility with previous versions will be lost. I still have not found the correct way to remove a setting from the saveload code and keep savegame compatibility at the same time. :(
Let me start by comparing the two patches first to see where they differ exactly.
That's what i meant but never wrote. Maybe it's just so obvious to me that one cannot have BOTH daylength patches in there at the same time.
And i was kinda hoping you would be the one to make it happen because you know what's what.
Personally i don't give much for savegame compatibility because the game i have running now has gone completely out of control anyways.
So if a replace merge where to be made it would be for those who wouldn't mind starting new games. At least that's my idea for now.


ChillCore wrote:
So I create a game on a server with this configuration :

huge map = 2048*2048
city = high
industry = high
without GRF
That is a big map ...
... No, 4096x4096 is kinda big. That's what i run with :)
I tried 8192x8192 but it complained with out of memory errors even though only 40% of my ram was used at any given time. If i could i would run with as large maps as possible because then, no matter how hard you try you never run out of places to expand to. Which ensures LONG games.
It also removes the space limitations that i hate so much.

Rather than be forced into a tiny box (the art has been mastered already anyways) i can build large junctions that don't need some crazy woodoo magic to work in a small space.
If only i could build stations underground without digging into the ground. At a huge cost ofc!
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: Chill's patchpack v10_7

Post by MagicBuzz »

Chillcore, I have some good news for you.

Well, good, good... They are not so good, but it looks like we are pointing to the right direction.

CargoDest is already partially compatible with IS

BUT :
- There is a problem with the linkgraph display (only connects stations of the current company... it should be really easy to fix)
- May be need a total rewrite of the subsidy attribution system (but it works like this). Need to investigate deeper.

See the attached screenshot.

I'm the cream colored company.
PAXLink is the blue company.

As you can see, at PAXLink's bus station "Nevers Feeder Station 7" there are passengers from my station "Le Puy" waiting to go at :
- PAXLink's bus station "Nevers Feeder Station 6"
- PAXLink's bus station "Nevers IC Airport via PAXLink's bus station "Nevers Feeder Station 6"
- PAXLink's bus station "Tours IC Airport" via PAXLink's bus station "Nevers Feeder Station 6"

So the link graph correctly works with IS, as cargo (at least passengers) are able to travel accross at least 2 differente company infrastructures.

Here is the good news.

The bad news :
- PAXLink got awarded with the subsidy. After a deeper investigation, he used a plane to transport people from Tours to Nevers.
=> Ok, but imagine the aircraft isn't there : there is a route from Tours to Nevers via Le Puy. The route is 100% mine, but as a passenger can travel inside Nevers on PAXLink's lines before the linkgraph is re-calculated, this situation could happen : a company could be awarded for a subsidy while she didn't actually do anything. The same situation would happen if I have a line from Tours to Le Puy then PAXLink a line from Le Puy to Nevers.

I didn't investigate in the LinkGraph code, but IMO, the subsidy award may be divided by the distance of each used company. Don't know if it can be done or not.
But this miss-feature isn't really important for the moment I guess.

At last, if you look at the linkgraph map, then you'll see only my Tours-Le Puy line, while my buses actually desserve Nevers using the PAXLink "Nevers Feeder Station 7".
=> This need to be reworked, but I'm quite confident with this, we have two choices :
1/ Draw linkgraph for all companies (screen should be charged).
2/ Draw linkgraph for all link where a vehicle of the current company desserve both stations.

The first one should be really easy, and the second one may require some more work.

Again, this miss-feature isn't blocking at all.

Here is the lastest patch (I fixed a problem with opponnent depots)


PS for other people : this patch is for test purpose only, it shouldn't work properly and loose your savegames.
Attachments
Orléans Transport, 14 Jul 1931.png
(186.53 KiB) Downloaded 1 time
chill+is+town_ratings_r21350.patch
(1.27 MiB) Downloaded 77 times
ogfxe_extra.7z
(334.42 KiB) Downloaded 94 times
User avatar
Dwight_K._Schrute
Traffic Manager
Traffic Manager
Posts: 209
Joined: 01 Sep 2010 11:29

Re: Chill's patchpack v10_7

Post by Dwight_K._Schrute »

Hey guys,

I have to write my thesis the next few months... so if I want to pass or wirte anything at all you have to stop with releasing such great stuff or banish me from the forums :D

@ Chill: I know: priorities 8)
dkarn
Engineer
Engineer
Posts: 13
Joined: 11 Nov 2010 17:51

Re: Chill's patchpack v10_7

Post by dkarn »

ChillCore wrote: Unfortunately I have a wireless internet connection and it is not very stable at times. The last time I tried joining a server I was automatically kicked a few times when trying to change the company name. I have not yet tried after that to not annoy the people playing online as , If I understood correctly, the server is paused while someone joins and downloads the map.
So I hope you understand that my online experience is quite non-existant. Sorry.
Anyway, there were some changes in the documentation in 21349, I have quoted them below.
I hope they help in solving your problem somewhat.

Code: Select all

docs/multiplayer.txt (after 21349) says:

 - It can happen that a connection is that slow, or you have that many clients
   connected to your server, that your clients start to loose their connection.
   Some things you can do about it:
   - [network] frame_freq:
     change it in console with: 'set network.frame_freq <number>'
     the number should be between the 0 and 10, not much higher. It indicates
     the delay between clicking and showing up. The higher, the more you notice
     it, but the less bandwidth you use.
     A good value for Internet-games is 2 or 3.

   - [network] sync_freq:
     change it in console with: 'set network.sync_freq <number>'
     the number should be between the 50 and 1000, not much lower, not much
     higer. It indicates the time between sync-frames. A sync-frame is a frame
     which checks if all clients are still in sync. When the value it too high,
     clients can desync in 1960, but the server detects it in 1970. Not really
     handy. The lower the value, the more bandwidth it uses.

   NB: changing frame_freq has more effect on the bandwidth then sync_freq.
I would appreciate it if you could let me know if toying with the numbers above makes a difference, if not something might be wrong.
I try the same with openttd 1.05 and no problem.
OpenTTD 1.0.5 is not really the correct version to compare with. 1.0.5 is still based on the same revision that 1.0.0 was when the branch was split from trunk. Backports from trunk have been made afterwards resulting in 1.0.1, ... ,1.0.5 but other than that the revision has not changed.
The best version to campare with would be the same revision as the version of the pacthpack you are playing with is based upon. (r21336 in your case.)
I am reviewing my code and will be posting a new version soon against current trunk.
You are right.
I have the same problem with r21336 trunk :shock:
To test it i use the same config, but this time on lan on my computer, and always the same problem during connection or save :|

So your patch is OK, and mine who use it too :)
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2858
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpack v10_7

Post by ChillCore »

Wow many replies ...
Cadde wrote:
ChillCore wrote: I will have a looksie at the patch and see where they differ so I can make appropriate changes in my source. Thank you for the link.
You are my hero! ;)
:mrgreen:
Cadde wrote:
ChillCore wrote: Too much money eh? Usually people complain about not having enough. Crisis has not yet kicked in in OpenTTD. :lol:
If it is really too much too handle you can spend some by bulldozing water ...
Well, the point is to not have so much money one has to resort to arbitrary wasteful methods just to keep it nice and low.
...

I dunno, i might just be the kind of guy that likes it to be painful. But there is something very satisfying with having timetables set up just right and constantly optimizing a network to minimize delays for maximized profits.
My dada is building my network so that all trains can reach all stations while terraforming as little as possible and not having jams ...
Cadde wrote: And that patch i mentioned also have a setting for train breakdowns so rather than a train breaking down once every 2 days you might set it so you get a breakdown (total) of twice a year. With daylength 16 or something like that it's going to be a fun challenge to take that into account.
What patch are you talking about exactly?
The one in the first post or the different "true_daylength_patch" near the end of the thread?
The one near the end of the thread does not seem to have such a setting ...
Cadde wrote:
ChillCore wrote:
dkarn wrote: So I create a game on a server with this configuration :

huge map = 2048*2048
city = high
industry = high
without GRF
That is a big map ...
... No, 4096x4096 is kinda big. That's what i run with :)
I meant a big map to be sent back and forth between clients in a multiplayer game. ;)
Cadde wrote: I tried 8192x8192 but it complained with out of memory errors even though only 40% of my ram was used at any given time.
Was it OpenTTD complaining or your OS? It has been a while I have tried generating such big maps ...
If it was OpenTTD there might be a hardcoded limit somewhere. If it was your OS then there is little I can do about it.
I remember Bilbo telling me about the memory usage for big maps but I can not remember if it was in this thread or in the More Height Levels thread ... I'll check later if I can find the discussion.
Cadde wrote: If only i could build stations underground without digging into the ground. At a huge cost ofc!
Have you tried NuTracks? There is a railtype that places houses over the rails ...
For an actual implementation of underground rail and stations you would need a third layer and additional transparancy so you can see where you are building.
For the moment there are two, sealevel and terrain_tileheight.
I think it would be quite hard to implement (Hard in the sence of getting all things behaving correct everywhere).
It wont be me, at least not for as long as the moreheightlevels patch is not in trunk.


MagcBuzz wrote: Chillcore, I have some good news for you.

Well, good, good... They are not so good, but it looks like we are pointing to the right direction.

CargoDist is already partially compatible with IS
Cool.
MagicBuzz wrote: BUT :
- There is a problem with the linkgraph display (only connects stations of the current company... it should be really easy to fix)
- May be need a total rewrite of the subsidy attribution system (but it works like this). Need to investigate deeper.

See the attached screenshot.
...
So the link graph correctly works with IS, as cargo (at least passengers) are able to travel accross at least 2 differente company infrastructures.
That's nice to hear (Read: read ;) ).
MagicBuzz wrote: The bad news :
- PAXLink got awarded with the subsidy. After a deeper investigation, he used a plane to transport people from Tours to Nevers.
=> Ok, but imagine the aircraft isn't there : there is a route from Tours to Nevers via Le Puy. The route is 100% mine, but as a passenger can travel inside Nevers on PAXLink's lines before the linkgraph is re-calculated, this situation could happen : a company could be awarded for a subsidy while she didn't actually do anything. The same situation would happen if I have a line from Tours to Le Puy then PAXLink a line from Le Puy to Nevers.

I didn't investigate in the LinkGraph code, but IMO, the subsidy award may be divided by the distance of each used company. Don't know if it can be done or not.
But this miss-feature isn't really important for the moment I guess.
Hmm, I do not think that the company did nothing. They transported the goods did they not?
Imagine this situation:
Say I have a truck rental company and you hire one of my trucks. Should I get a cut of your profits if you do a paid transport for someone else? You already paid for the rental of the truck and what you do with it is none of my bussiness as long as I get my money as per contract.
IMHO the same applies to IS, the other company pays/has paid for using your infrastructure ...
MagicBuzz wrote: At last, if you look at the linkgraph map, then you'll see only my Tours-Le Puy line, while my buses actually desserve Nevers using the PAXLink "Nevers Feeder Station 7".
=> This need to be reworked, but I'm quite confident with this, we have two choices :
1/ Draw linkgraph for all companies (screen should be charged).
2/ Draw linkgraph for all link where a vehicle of the current company desserve both stations.

The first one should be really easy, and the second one may require some more work.

Again, this miss-feature isn't blocking at all.
I do no know if Cargodist takes into account all stations where company's vehicle stop or only company's stations where vehicles stop without looking in the code. Have you let the game run for a while so the linkgraphs had time to be recalculated?
MagicBuzz wrote: Here is the lastest patch (I fixed a problem with opponnent depots)

PS for other people : this patch is for test purpose only, it shouldn't work properly and loose your savegames.
I have not yet compiled and tested but here are a few things I noticed while I was re-arranging your patch to be able to compare with mine.

Missing files: (svn. add should do the trick)
- copypaste_gui.cpp
- linkgraph/linkgraph.cpp

To fix:
- Remove double declaration of strnatcmp from strings.cpp
- Savegame code: Replace IS' 143 by number greater than what is found in saveload.h and or replace by enum. Also adjust saveload.cpp and your game should be savegame compatible with savegames made with the patchpack
- Disclaimer: savegames made with your testpatch will not be compatible with my "official" version untill I include IS too with the same numbers as yours.

In addition to the extra grf I think you should provide the modified png also for people to be able to compile ... (Not tested yet)


Will test in a bit, thank you for the effort.


Dwight_K._Schrute wrote: Hey guys,

I have to write my thesis the next few months... so if I want to pass or wirte anything at all you have to stop with releasing such great stuff or banish me from the forums :D

@ Chill: I know: priorities 8)
I'll see if I can modify the code a bit.

Code: Select all

if (time_too_study || _playing_time > 30minutes) {
    RefuseToRun();
}
:lol:


dkarn wrote:
ChillCore wrote:
dkarn wrote: ... clients disconnecting ...
... quote form documentation ...
You are right.
I have the same problem with r21336 trunk :shock:
To test it i use the same config, but this time on lan on my computer, and always the same problem during connection or save :|

So your patch is OK, and mine who use it too :)
Would you mind testing with recent trunk if it works better?
There have been some codechanges by Rubidium in 21357, 58, 61, 63, 64 and documentation in r21365.
If current trunk works better I will bump v11_1 to current trunk and will add the other changes I am still testing in a later version.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
dkarn
Engineer
Engineer
Posts: 13
Joined: 11 Nov 2010 17:51

Re: Chill's patchpack v10_7

Post by dkarn »

ChillCore wrote:Would you mind testing with recent trunk if it works better?
There have been some codechanges by Rubidium in 21357, 58, 61, 63, 64 and documentation in r21365.
If current trunk works better I will bump v11_1 to current trunk and will add the other changes I am still testing in a later version.
I try with recent Trunk r21365, same problem.
The problem is when server is saving the game, probably client/server can't sent or receive data.
So client consider that is a lag, and after 10 sec you are disconnect automatically.

I am not sure, because network is hardly to understand ^^
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2858
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpack v10_7

Post by ChillCore »

dkarn wrote:
ChillCore wrote:Would you mind testing with recent trunk if it works better?
There have been some codechanges by Rubidium in 21357, 58, 61, 63, 64 and documentation in r21365.
If current trunk works better I will bump v11_1 to current trunk and will add the other changes I am still testing in a later version.
I try with recent Trunk r21365, same problem.
The problem is when server is saving the game, probably client/server can't sent or receive data.
So client consider that is a lag, and after 10 sec you are disconnect automatically.

I am not sure, because network is hardly to understand ^^
Sounds like an issue for http://bugs.openttd.org/ . I would not know where to start searching to solve this issue other then increasing the time before kicking clients. :(
Could you post the savegame and the server's config file there please.

Network code is indeed not very easy to understand. :)
Maybe someone that understands how the network code works can reproduce and find a solution ...

Edit:
By posting savegame I mean the one from clean trunk. If you post the one from the patchpack they will not be very happy me thinks ... ;)
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Chill's patchpack v10_7

Post by Rubidium »

If saving the savegame on the server takes more than 10 seconds I would rather blame the server for being way too slow for serving that game. If the server is fast enough, then it's even worse because then the clients can't even autosave without being kicked for being too slow.
User avatar
Maverick
Traffic Manager
Traffic Manager
Posts: 175
Joined: 08 Dec 2002 15:20
Location: West Ryde, Australia.
Contact:

Re: Chill's patchpack v10_7

Post by Maverick »

Hi Guys, Not a bug, just looking for some advice on speedups.
I'm running r21051-chill-v10_7 and I'm having some slowdowns on my i7 860.
Now I do understand I'm single-threaded constrained, but I was hoping someone could give me some advice on what I could do to speed things up. It's running Aviators Aircraft 1.7, eGRVTS1.0 , FISH 0.6.2, and 2cc 28dec08. No AI's, but I could use some advice perhaps to completely disable them.
What are some changes I can make to see things improve in speed?
Anything at this point! :)
Thanks guys
Chris

http://dl.dropbox.com/u/27690/Pilkingto ... 201946.sav
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Re: Chill's patchpack v10_7

Post by Cadde »

ChillCore wrote:What patch are you talking about exactly?
The one in the first post or the different "true_daylength_patch" near the end of the thread?
The one near the end of the thread does not seem to have such a setting ...
I didn't know it had changed, i would guess the one with the most features if possible. ;)
Either way, as long as one can select the income multiplier i am all happy.
I meant a big map to be sent back and forth between clients in a multiplayer game. ;)
Oh, that stuff ;)
Well, i rarely have those issues with a 100MBit line and Quad core, 4 GB, 260 GTX machine.
Was it OpenTTD complaining or your OS? It has been a while I have tried generating such big maps ...
I don't recall what it said. It just complained about out of memory with a MsgBox style error. And then a crash dump.
If it was OpenTTD there might be a hardcoded limit somewhere. If it was your OS then there is little I can do about it.
Pretty sure it wasn't OTTD though as it should be possible, have been done before. Might be because i never restart my PC or whatever.
And it's not my OS either, probably just some random issue i couldn't be bothered to fix. I just wanted to play at that point in time. (Took me 2 hours just to find all the stuff i wanted to play with)
Running Win 7 Ultimate 64bit.
I remember Bilbo telling me about the memory usage for big maps but I can not remember if it was in this thread or in the More Height Levels thread ... I'll check later if I can find the discussion.
Think it was ~450 for 4096² and 1.3 gigs for 8192²
Have you tried NuTracks? There is a railtype that places houses over the rails ...
"Without actually digging into the ground", yes i love 2CC and NuTracks but i am talking more along the lines of just building underground without disrupting what's on the surface.
I know it's not gonna happen for the next couple of years unless someone crazy enough just makes it happen ignoring all those "limitations" that developers like to and keep talking about.
As much as i can appreciate and understand that the map array is the reason we can't I also am a man that thinks that NOTHING is impossible if you only have the time and energy to code it.
That and Hardware OFC, running a 2billion x 2billion tile map in realtime would just be impossible due to hardware limitations... And so on ;)

And with all that said, keep up the good work and i would love to see another daylength patch made part of the patchpack.
I know i should be doing my own dirty work and all that but if it can be avoided i really would like to avoid setting up a compile workspace just for that little thing. That's pretty much all i am missing from Chill's patchpack.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Chill's patchpack v10_7

Post by Kogut »

Cadde wrote:"Without actually digging into the ground", yes i love 2CC and NuTracks but i am talking more along the lines of just building underground without disrupting what's on the surface.
I know it's not gonna happen for the next couple of years unless someone crazy enough just makes it happen ignoring all those "limitations" that developers like to and keep talking about.
As much as i can appreciate and understand that the map array is the reason we can't I also am a man that thinks that NOTHING is impossible if you only have the time and energy to code it.
It is also possible to code OpenTTD on Turing machine - only enough energy and stamina is required 8) . Limitations mentioned by developers means rather "It would take about 35 years to code" than "it is impossible to do due to limits of universe".
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Re: Chill's patchpack v10_7

Post by Cadde »

Kogut wrote:
Cadde wrote:"Without actually digging into the ground", yes i love 2CC and NuTracks but i am talking more along the lines of just building underground without disrupting what's on the surface.
I know it's not gonna happen for the next couple of years unless someone crazy enough just makes it happen ignoring all those "limitations" that developers like to and keep talking about.
As much as i can appreciate and understand that the map array is the reason we can't I also am a man that thinks that NOTHING is impossible if you only have the time and energy to code it.
It is also possible to code OpenTTD on Turing machine - only enough energy and stamina is required 8) . Limitations mentioned by developers means rather "It would take about 35 years to code" than "it is impossible to do due to limits of universe".
Except I wouldn't go as far as saying it would take 35 years to code... The problem doesn't lie in how long it would take to convert it but how much work it is to convert it and the amount of knowledge one needs to have to be successful in doing so.
And ofc the necessary motivations. Neither of which i possess ;)

But i would assume someone, with the proper motivation and knowledge, could cook something up in less than 10 work hours. It's just a matter of getting it operational first and then refining it.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Chill's patchpack v10_7

Post by Kogut »

Cadde wrote:
Kogut wrote:
Cadde wrote:"Without actually digging into the ground", yes i love 2CC and NuTracks but i am talking more along the lines of just building underground without disrupting what's on the surface.
I know it's not gonna happen for the next couple of years unless someone crazy enough just makes it happen ignoring all those "limitations" that developers like to and keep talking about.
As much as i can appreciate and understand that the map array is the reason we can't I also am a man that thinks that NOTHING is impossible if you only have the time and energy to code it.
It is also possible to code OpenTTD on Turing machine - only enough energy and stamina is required 8) . Limitations mentioned by developers means rather "It would take about 35 years to code" than "it is impossible to do due to limits of universe".
Except I wouldn't go as far as saying it would take 35 years to code... The problem doesn't lie in how long it would take to convert it but how much work it is to convert it and the amount of knowledge one needs to have to be successful in doing so.
And ofc the necessary motivations. Neither of which i possess ;)

But i would assume someone, with the proper motivation and knowledge, could cook something up in less than 10 work hours. It's just a matter of getting it operational first and then refining it.
I think that estimate is wrong. By orders of magnitude.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 17 guests