Page 5 of 154

Re: Cargo Distribution

Posted: 13 Apr 2009 21:07
by fonso
ChillCore wrote: I am going to test your patch and i will post a patch for turtoise.
If you think the patch is stable enough I will post my binaries too,
if that is okay with you that is.
Of course it is. The sources are "derived work" of OpenTTD and thus under the GPL. Everyone can change, republish, compile, distribute or do whatever with them. I'm happy to see people doing that.

I'm even more happy if people help me find the bugs mentioned here. It was only a little frustrating to spend half the day on setting up a virtual machine with windows, installing all the stuff and actually finding the problem, just to see someone else had just done the same thing. Perhaps just drop me a line when you start working on some known problem, so that I can concentrate on something else then. I'll post my IM information in my forum profile. But again: I don't want to prevent anyone from doing anything they like with the patches I post.

The good thing is: I can build Windows binaries myself now. I'll attach the fixed one I've tested with.

Re: Cargo Distribution

Posted: 13 Apr 2009 22:18
by ChillCore
As promised.
Svn / Turtoise patch attached.
After quick testing no more slowdowns. even with accuracy set higher (32 tested)

How to use a patch including new files using Turtoise:

- create a dummy file for each new file.
- apply the patch and compile.
- Never apply the patch twice.
First revert your source using Turtoise.
Then revert the new files to dummy files manually:
Turtoise does not revert new files for some reason.

Now you can reapply the patch to your source.


@ fonso:
Now you can easier debug windows compatibility, your afternoon was not a total waste. I hope.

ps:
The patch is the all in version.

Re: Cargo Distribution

Posted: 13 Apr 2009 22:23
by isk
fonso wrote: Perhaps just drop me a line when you start working on some known problem, so that I can concentrate on something else then. I'll post my IM information in my forum profile. But again: I don't want to prevent anyone from doing anything they like with the patches I post.

Will keep that in mind next time :)
I have spend some time playing with your patch applied and it seems that everything is working, although during compilation (still MSVC and WinXP) there is one warning

Code: Select all

Warning	1	warning C4804: '>' : unsafe use of type 'bool' in operation	f:\temp\openttd\src\mcf.cpp	72	openttd

Re: Cargo Distribution

Posted: 14 Apr 2009 12:21
by el koeno
fonso wrote:
ChillCore wrote: I am going to test your patch and i will post a patch for turtoise.
If you think the patch is stable enough I will post my binaries too,
if that is okay with you that is.
Of course it is. The sources are "derived work" of OpenTTD and thus under the GPL. Everyone can change, republish, compile, distribute or do whatever with them. I'm happy to see people doing that.

I'm even more happy if people help me find the bugs mentioned here. It was only a little frustrating to spend half the day on setting up a virtual machine with windows, installing all the stuff and actually finding the problem, just to see someone else had just done the same thing. Perhaps just drop me a line when you start working on some known problem, so that I can concentrate on something else then. I'll post my IM information in my forum profile. But again: I don't want to prevent anyone from doing anything they like with the patches I post.

The good thing is: I can build Windows binaries myself now. I'll attach the fixed one I've tested with.
Hi,

I downloaded the binary you posted, and copied it to an install of trunk R16055 (which works) and I get an error: " No available language packs (invalid versions?)" I'm not quite sure what the problem is there, but if trunk works, I guess there's nothing wrong with the language packs?

Re: Cargo Distribution

Posted: 14 Apr 2009 13:11
by fonso
el koeno wrote: I downloaded the binary you posted, and copied it to an install of trunk R16055 (which works) and I get an error: " No available language packs (invalid versions?)" I'm not quite sure what the problem is there, but if trunk works, I guess there's nothing wrong with the language packs?
Ouch, I'm sorry ... this is because you not only need the binary but also some other files that are generated from the patch-modified sources. If you use the binary I posted with trunk versions of those other files it complains (as you have seen). I'll try to figure out which those files are.

Re: Cargo Distribution

Posted: 14 Apr 2009 13:18
by ChillCore
Hi fonso,
I see you only included openttd.exe
You need everything from the bin i think.
Try these to compare.
I think you can leave the svn folders out.

[EDIT]
Binaries removed. newer are available further in the thread.
[/EDIT]

Re: Cargo Distribution

Posted: 14 Apr 2009 14:38
by el koeno
ChillCore wrote:Hi fonso,
I see you only included openttd.exe
You need everything from the bin i think.
Try these to compare.
I think you can leave the svn folders out.
Thanks, that one worked. It might contain some copyrighted material though.

Re: Cargo Distribution

Posted: 14 Apr 2009 14:40
by mullie0
wow this really works great fonso :bow: :bow: :bow:

I only have one question. In the map there are some new black numbers. What do they exactly mean?

Also sometimes the numbers are writen on top of the numbers of other cities rendering them unreadible

Re: Cargo Distribution

Posted: 14 Apr 2009 14:51
by ChillCore
Thanks, that one worked. It might contain some copyrighted material though.
Please tell me which files those are.
So i do not do that again.
I will remove the binaries if needed.

Re: Cargo Distribution

Posted: 14 Apr 2009 15:15
by fonso
mullie0 wrote:wow this really works great fonso :bow: :bow: :bow:

I only have one question. In the map there are some new black numbers. What do they exactly mean?

Also sometimes the numbers are writen on top of the numbers of other cities rendering them unreadible
The numbers are shown in the following format:

U/C:S/P

U = usage of the link (cargo having arrived at the destination coming from the source)
C = capacity of the link
S = cargo sent along the link (without necessarily arriving at the other side)
P = cargo planned for the link

Of course this doesn't matter much as no one can read it. If you click on the town names button some coloured boxes will be shown instead, but those are only marginally more readable. The coding is as follows:

white: capacity
grey: usage
red: plan
yellow: sent

The space, however, is so tight that you have to get really close to the screen in order to see if there is a box of a certain colour or not. And then you still don't know much about its size. Also, in areas with lots of stations, for example in town centers, the boxes still overlap and you can't discern anything. I'm thinking of reducing the space used for each item of information even further by drawing cubes instead of boxes, but I doubt it would help a lot.

So, I got a task for the artists among you: Draw a mockup of how the capacity/usage/planned/sent information (or at least a subset you'd like to see there) can be displayed readably in the map. I could really use an idea there as I'm not very good with GUI stuff.

Re: Cargo Distribution

Posted: 14 Apr 2009 15:43
by mullie0
thank you very much for the info Fonso

Re: Cargo Distribution

Posted: 14 Apr 2009 15:50
by as
ChillCore wrote:
Thanks, that one worked. It might contain some copyrighted material though.
Please tell me which files those are.
So i do not do that again.
I will remove the binaries if needed.
I don't think any files should be removed, but you should add GPL-licence.

Re: Cargo Distribution

Posted: 14 Apr 2009 16:06
by el koeno
ChillCore wrote:
Thanks, that one worked. It might contain some copyrighted material though.
Please tell me which files those are.
So i do not do that again.
I will remove the binaries if needed.
I'm not totally sure, but the data directory might contain some of the original artwork. I'm not entirely sure, as it might just contain the openGFX these days. I only use the openttd/data directory in "My Documents", so I wouldn't really know. ;)

Re: Cargo Distribution

Posted: 14 Apr 2009 16:13
by Jafinto
ChillCore wrote:
Thanks, that one worked. It might contain some copyrighted material though.
Please tell me which files those are.
So i do not do that again.
I will remove the binaries if needed.
You haven't included any of the original artwork grfs, so no reason to panic ;). For the record, the said files are (at least for the windows version): sample.cat, trg1r.grf, trgcr.grf, trghr.grf, trgir.grf and trgtr.grf. I think the files of the DOS version have other names, but they are similar though.

Re: Cargo Distribution

Posted: 14 Apr 2009 18:40
by -3s-
I just tried Chillcore's build: cargodist_r16055_win32.7z [2.88 ].

Again I builded two buses: A->B and A->C. So far no freezings yet, or high cpu-load. I will try further by building trains. I'll keep you posted, but so far so good.

Re: Cargo Distribution

Posted: 14 Apr 2009 18:58
by ChillCore
Yes, lets get back on topic.

Here too it runs like a train even with bigger savegames.
I watched smallmap mostly i love how i can evaluate downloaded savegames.

For cargo distribution testing i should start a new game i guess ...

Re: Cargo Distribution

Posted: 14 Apr 2009 19:00
by DaleStan
Zuu wrote:

Code: Select all

1/accuracy < epsilon
can be changed to

Code: Select all

1 < epsilon * accuracy
In pure math, these are equivivalent
No, they're not. They are equivalent iff "accuracy" is positive.

Re: Cargo Distribution

Posted: 14 Apr 2009 20:56
by el koeno
Jafinto wrote:
ChillCore wrote:
Thanks, that one worked. It might contain some copyrighted material though.
Please tell me which files those are.
So i do not do that again.
I will remove the binaries if needed.
You haven't included any of the original artwork grfs, so no reason to panic ;). For the record, the said files are (at least for the windows version): sample.cat, trg1r.grf, trgcr.grf, trghr.grf, trgir.grf and trgtr.grf. I think the files of the DOS version have other names, but they are similar though.
Ah, good. I wasn't sure what was in the .grfs in the data directory.

On-topic: It seems to work fine, haven't found any problems. The GUI needs a major overhaul, but Fonso is on the case there.

Re: Cargo Distribution

Posted: 15 Apr 2009 07:02
by MJS
The Cargodest GUI worked quite well, I feel - lots of information, yet presented in an accessible format. And you could set your favourite view (for me, Destinations) as your default.

Re: Cargo Distribution

Posted: 15 Apr 2009 14:45
by MJS
With the r16055 exe version I get 100% CPU load and then game crashes. I run the 2cc set on a 512/256 map with snowy terrain. What debugging/crash information can I send in to help?

(I've just built a network with an eye on the CPU meter all the time. Seems that my method of making a few very long-distance connections with very few stations all across the map brings CPU up quite a lot.; up to 60% for some time after I open the link, with just two trains. See attached image. The other two trains run a local line with four stops.)