Patch: New graphs

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

griffin71
Traffic Manager
Traffic Manager
Posts: 142
Joined: 31 Mar 2007 13:11
Location: Amsterdam

feature request

Post by griffin71 »

Could the scales of both axes be adapted to 'beautiful' values?
E.g. if your scale runs from 0 to 1024, it is normal to create 22 gridlines: 0, 50, 100, ...., 1000, 1050. On a small graph one might use 12 gridlines: 0, 100, 200, ... , 1000, 1100.
Algorithms for this are in existence, and it would enhance the readability of the graphs greatly.
A game worth playing is a game worth modding :-)
User avatar
Zojj
Engineer
Engineer
Posts: 97
Joined: 27 Apr 2007 17:58
Location: Vegas baby
Contact:

Re: feature request

Post by Zojj »

chrissicom wrote:What I did was only changing the graph from days in transit to seconds in transit since that is not a relative value affected by the daylength patch.
Cool! No problem. I hope people find your build useful.
griffin71 wrote:Could the scales of both axes be adapted to 'beautiful' values?
Good thought. I was lazy and kept the horiz grid spacing the same as TTD. If I change the graph it to use rounder increments (50,100,1000...), I think the horiz. grid spacing would need to vary... hmm
I'm on the Zoloft to keep me from killing yall

My patches: Better graphs - Train acceleration - Crash rates
User avatar
Zojj
Engineer
Engineer
Posts: 97
Joined: 27 Apr 2007 17:58
Location: Vegas baby
Contact:

Re: Patch: New graphs

Post by Zojj »

I'm considering continuing work on this patch.. mostly depends if it has a chance of being included in the trunk.

I plan on doing this:
1. Update to current trunk
2. Gray background option in the patch settings (normal, better with black bg, better with gray bg)
3. Rounded numbers on the Y-axis
4. Update coding style as required. Feedback from devs appreciated.

Post your thoughts or requests please!
I'm on the Zoloft to keep me from killing yall

My patches: Better graphs - Train acceleration - Crash rates
Volny
Engineer
Engineer
Posts: 42
Joined: 18 Jun 2006 11:44
Location: Czech Republic

Re: Patch: New graphs

Post by Volny »

the more graphs the better! :) especially in multiplayer it is nice to compare your company with others! And if somebody doesnt like them, then he just dont have to use them :)
- one suggestion - maybe adding some cool eycandy - ie splines for connecting "dots" or "values" instead of current lines. This will make graphs much smoother. And also some kind of floating average.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: New graphs

Post by Bilbo »

Volny wrote:the more graphs the better! :) especially in multiplayer it is nice to compare your company with others! And if somebody doesnt like them, then he just dont have to use them :)
- one suggestion - maybe adding some cool eycandy - ie splines for connecting "dots" or "values" instead of current lines. This will make graphs much smoother. And also some kind of floating average.
Smoother, but IMHO maybe inaccurate, as you never know what happens "between the points" and for values like 100,700,700,100 you may get some false peak between the two 700's with value perhaps like 800. Also, somebody will need to add support for splines to openttd (they are a bit more difficult than drawing simple lines, especially if you want some clipping and good drawing speed - although not so hard to implement, it still may be quite some work ...)

I don't think splines in these graphs are a good idea.
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
Zojj
Engineer
Engineer
Posts: 97
Joined: 27 Apr 2007 17:58
Location: Vegas baby
Contact:

Re: Patch: New graphs

Post by Zojj »

Bilbo wrote: for values like 100,700,700,100 you may get some false peak between the two 700's
True. If the point values are kept the same, then with a smooth curve the area (cumulative total) will be incorrect. I could keep the area the same and adjust the points... that would be better, but still inaccurate. I would use parabolic curves.

But not yet... I'm still waiting for someone to say this patch has a good chance of inclusion. :P
I'm on the Zoloft to keep me from killing yall

My patches: Better graphs - Train acceleration - Crash rates
User avatar
orudge
Administrator
Administrator
Posts: 25214
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: Patch: New graphs

Post by orudge »

Just to give my opinion on these graphs - I think they look rather good. Hopefully if the code is up to scratch they can be submitted to the repository. :)
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Patch: New graphs

Post by belugas »

for the record, I second orudge
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Patch: New graphs

Post by Roujin »

I haven't looked at your patch until now, and i haven't got a voice that counts in terms of trunk inclusion, but i just have to second all the others that find your graphs very useful. Also the "smooth" option is very promising if you want a bigger picture about what is happening, where all the spikes are just distracting.

I know that my trains sometimes manage to do two deliveries in a year, sometimes one. That's not the info I'm looking for in the graph ;)

So, great patch and hopefully a candidate for inclusion as orudge and belugas are saying...
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Zojj
Engineer
Engineer
Posts: 97
Joined: 27 Apr 2007 17:58
Location: Vegas baby
Contact:

Re: Patch: New graphs

Post by Zojj »

Yay! Motivation :P
I'm on the Zoloft to keep me from killing yall

My patches: Better graphs - Train acceleration - Crash rates
User avatar
jez
Traffic Manager
Traffic Manager
Posts: 158
Joined: 23 Aug 2003 21:24

Re: Patch: New graphs

Post by jez »

I love this patch, but it seems like it has not been maintained which is a real shame :-( player.h doesn't even exist anymore and so the current patch doesn't work at all for the latest SVN trunk. Anyone feel like updating it for the latest trunk? I might have to see if I can if nobody else will/has, because I like these graphs so much. :-)
=== Jez ===
zypa
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 30 Mar 2006 12:05
Location: Germany
Contact:

Re: Patch: New graphs

Post by zypa »

@zojj: Will there ever be a new version of this patch? I'd really love to see a new version

@chrissicom: You use this patch in your latest ChrisIN. Do you have a newer version than the one on this thread?
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: Patch: New graphs

Post by Roest »

There's hope. I got it up and running now. Still crashes when i click on key, the cargo payment rates dont work and the cargo graph legend doesn't seem to like ECS very much, but other than that it works

Edit: Cargo payment rates work, just not with ECS.
Attachments
Gordon & Co., 18th Oct 1981.png
Screenshot is even in english.
(300.06 KiB) Downloaded 169 times
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: Patch: New graphs

Post by Roest »

And here it is. Works with latest trunk (12733).
Attachments
bettergraphs_r12714.patch
(51.25 KiB) Downloaded 183 times
Bigwig & Co., 17th Apr 1952.png
(103.85 KiB) Downloaded 174 times
User avatar
Zojj
Engineer
Engineer
Posts: 97
Joined: 27 Apr 2007 17:58
Location: Vegas baby
Contact:

Re: Patch: New graphs

Post by Zojj »

Awesome! Thanks for updating my patch. I don't have time anymore =(
I'm on the Zoloft to keep me from killing yall

My patches: Better graphs - Train acceleration - Crash rates
wleader
Engineer
Engineer
Posts: 123
Joined: 18 May 2007 09:04

Re: Patch: New graphs

Post by wleader »

I've noticed Roest's update of this patch makes an unneeded modification to variables.h. Its just something that can be cleaned up the next time it is updated.
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: Patch: New graphs

Post by Roest »

Hmm? It's probably been there before i meddled with it.
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: Patch: New graphs

Post by Roest »

update, should work with newindustries now,

please report any bugs you find
Attachments
bettergraphs_r12837.patch
(50.6 KiB) Downloaded 183 times
Unnamed, 20th Mar 1950.png
(129.32 KiB) Downloaded 189 times
AndiK
Engineer
Engineer
Posts: 53
Joined: 07 Dec 2004 18:34
Location: Grafing bei München (Munich)
Contact:

Re: Patch: New graphs

Post by AndiK »

Hmm. I've got a suggestion: The growth views could do with an own vertical scaling. If absolute values are high and changes small, the growth graph is practically unreadable.

Very useful patch, though..
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: Patch: New graphs

Post by Roest »

updated to r13117
AndiK wrote:Hmm. I've got a suggestion: The growth views could do with an own vertical scaling. If absolute values are high and changes small, the growth graph is practically unreadable.

Very useful patch, though..
That issue is known, but don't have time to fix it right now.
Attachments
bettergraphs_r13117.patch
(49.07 KiB) Downloaded 179 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests