[Patch] Automatic giant screens aka Timelapse

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

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: [Patch] Automatic giant screens aka Timelapse

Post by Roujin »

@Progman:
Oh it's okay, I'm at it ;) But how do you like the option I proposed?

With that, you could still use a set interval (one month), but if less than y commands happened since the last screen, it is left out. It's a different approach, but you can archieve the same with it (I think) - don't take screenshots if there's no activity.


Of course we're talking about global activity here, not about activity in the proximity of a local view - I hope you're not demanding that ;) :lol:

edit:
Aali wrote:What about taking a screenshot every X commands? Not terribly accurate, but atleast it wont be taking screenshots when there's nothing going on.
Well, with the YAPO (yet another patch option) I proposed in my last post, that would be possible too. (Then again I'd have to call this from the command function hmm that would need some restructuring *mumble* :lol: well I guess that's a feature for "when it's done" :lol: )

---
edit2:
Ah, should the global screenshot also be influenced by the amount of commands?
* @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
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: [Patch] Automatic giant screens aka Timelapse

Post by Roujin »

I'm done. :)

Well, since I wanted to keep the global and local shots seperate from each other, I ended up with a whole bunch of settings!
The current count is 12(!) settings:
  • for giant screenshots:
    • auto_screenshot: take giant screenshots? 0=off, 1=every x days, 2=every y commands, 3= every x days and y commands
    • auto_screenshot_interval: the "x" in "x days"
    • auto_screenshot_num_commands: the "y" in "y commands"
    • auto_screenshot_zoomlvl: which zoom level to use for the giant screenshots
  • for local screenshots:
    • auto_local_screen: take local screenshots? 0=off, 1=every x days, 2=every y commands, 3= every x days and y commands
    • auto_local_screen_types: where to take local screenshots. 0=signs, 1=stations, 2=signs and stations
    • auto_local_screen_interval: the "x" in "x days"
    • auto_local_screen_num_commands: the "y" in "y commands"
    • auto_local_screen_zoomlvl: which zoom level to use for the local screenshots
    • auto_local_screen_size_x: width of local screenshots (in openttd.cfg only!)
    • auto_local_screen_size_y: height of local screenshots (in openttd.cfg only!)
    • auto_local_screen_prefix: character used as prefix for local screenshots in ASCII (in openttd.cfg only!)
Since it grew so much I introduced a new tab for the settings :mrgreen:
I hope it is configurable enough for all your needs now and I didn't miss any bugs during the short testing I did. :twisted:

Here's the patch:
Attachments
timelapse_r14565.diff
timelapse for r14565
(23.05 KiB) Downloaded 154 times
* @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
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: [Patch] Automatic giant screens aka Timelapse

Post by CommanderZ »

every x days and y commands
I guess it is "every x days or y commands",... or not?
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: [Patch] Automatic giant screens aka Timelapse

Post by Roujin »

No, it is and.

It means you set up your preferred time interval (e.g. 30 days), and every 30 days it checks if it should take a screenshot. If y commands were issued since the last screenshot, the command counter is reset and a screenshot is done, else it is skipped and 30 days later it's checked again.
* @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
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Automatic giant screens aka Timelapse

Post by planetmaker »

When updating my clientpatches pack, I found that this patch doesn't apply to current trunk anymore. This is an update to r14856 with unchanged functionality.
Attachments
automatic_screenshot_r14856.diff
svn patch for r14856
(13.16 KiB) Downloaded 95 times
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: [Patch] Automatic giant screens aka Timelapse

Post by Roujin »

Thanks! Although there doesn't seem to be much interest in this..

Hey, now that we've got a heap of client slots to spare, maybe someone wants to set up a machine that just joins on the openttdcoop server and records with this patch? :mrgreen: maybe set up some scripts so that it reconnects automatically if it was disconnected for some reason..
* @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
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Automatic giant screens aka Timelapse

Post by planetmaker »

Roujin wrote:Hey, now that we've got a heap of client slots to spare, maybe someone wants to set up a machine that just joins on the openttdcoop server and records with this patch? :mrgreen: maybe set up some scripts so that it reconnects automatically if it was disconnected for some reason..
That's now indeed an idea... we'll see what we can do :)

And here's another update... as some additional settings got introduced by my (and sulai's) persistant buildtools patch which break compatibility of this patch with trunk.
Attachments
automatic_screenshot_r14905.diff
automatic screenshots for r14905
(13.21 KiB) Downloaded 101 times
LorenzoxD
Engineer
Engineer
Posts: 15
Joined: 25 Jan 2009 00:09

Re: [Patch] Automatic giant screens aka Timelapse

Post by LorenzoxD »

Where do i put the .diff file :?:
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Automatic giant screens aka Timelapse

Post by planetmaker »

LorenzoxD wrote:Where do i put the .diff file :?:
See here: http://www.tt-forums.net/viewtopic.php?f=33&t=21678
No, I won't provide binaries.
LorenzoxD
Engineer
Engineer
Posts: 15
Joined: 25 Jan 2009 00:09

Re: [Patch] Automatic giant screens aka Timelapse

Post by LorenzoxD »

No offense, but that is the most complicated explenation i've ever seen, to bad.....
I'll just stick with fraps and make a video and speed it up very fast or something.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Automatic giant screens aka Timelapse

Post by planetmaker »

LorenzoxD wrote:No offense, but that is the most complicated explenation i've ever seen, to bad.....
I'll just stick with fraps and make a video and speed it up very fast or something.
There's no easier answer than "get a subversion or mercurial client, get the game's source code, apply the patch with the proper tools of your OS to the source code and then compile". The answer to the details depend highly on the choice of your OS. Those are answered in exactly the thread given. No easier way.

Attached a probably unnecessary update, but I've updated my patch queue anyway.
Attachments
automatic_screenshot_r145286.diff
update to r15286
(13.86 KiB) Downloaded 98 times
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: [Patch] Automatic giant screens aka Timelapse

Post by Roujin »

planetmaker wrote:
LorenzoxD wrote:No offense, but that is the most complicated explenation i've ever seen, to bad.....
I'll just stick with fraps and make a video and speed it up very fast or something.
There's no easier answer than "get a subversion or mercurial client, get the game's source code, apply the patch with the proper tools of your OS to the source code and then compile". The answer to the details depend highly on the choice of your OS. Those are answered in exactly the thread given. No easier way.

Attached a probably unnecessary update, but I've updated my patch queue anyway.
Thanks for updating. But tell me...
automatic_screenshot_r145286.diff
Just how far does your time machine go? Was the 1.0 branch already split off before that revision? And did underground make it in until r145286? :P :lol:
* @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
LorenzoxD
Engineer
Engineer
Posts: 15
Joined: 25 Jan 2009 00:09

Re: [Patch] Automatic giant screens aka Timelapse

Post by LorenzoxD »

I Now have downloaded the program which was on the ''complicated'' page. and followed his direction and as he said if i get any ''red'' files, i had to tell you.
Don't worry, often application will download other revision and everything will work.
However, if you're experiencing problems (marked red) ask patch developer and tell him what's wrong. Tell him what diff file have you downloaded and what revision have you downloaded using "SVN Checkout"
I downloaded the automatic_screenshot_r14905.diff and my version of OpenTTD is Nightly 15285. I get the following error.

The patch seems outdated! the file line STR_CONFIG_PATCHES_LARGER_TOWNS_DISABLED :{LTBLUE}Proportion of towns that wil become cities: {ORANGE}Non and the patchline STR_CONFIG_PATCHES_TOWN_GROWTH :{LTBLEU}Town growth speed: {ORANGE}{STRING1} do not match!

and than.

Patch seems outdated! The file line SDTC_BOOL(gui.keep_all_autosave, S, 0, false, STR_NULL, NULL), and the patchline
SDT_CONDVRAR(GameSettings, pf.yapf.rail_longer_platform_penalty, SLE_UINT, 33, SL_MAX_VERSION, 0,0 8 * YAPF_TILE_LENGHT, 0, 20000, 0, STR_NULL, NULL) Do not match!


Another.

The Patch seems outdated! The file line ''gui.persistent_buildingtools'',and the patchline void FoldAll(); do not match!

and another :tongue:

The patch seems outdated! The file line bool station_dragdrop; ///<wheter drag and drop is enabled for stations and the patchline bool station_show_coverage; ///<wheter to highlight coverage area do not match!


I guess i'ts outdated :mrgreen:
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: [Patch] Automatic giant screens aka Timelapse

Post by Roest »

Who might have guessed that a patch for r14905 doesn't work on 15285 out of the box? It's alomst like these numbers mean something.
LorenzoxD
Engineer
Engineer
Posts: 15
Joined: 25 Jan 2009 00:09

Re: [Patch] Automatic giant screens aka Timelapse

Post by LorenzoxD »

So ... where can i get the nightly 14905?
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: [Patch] Automatic giant screens aka Timelapse

Post by Roest »

LorenzoxD wrote:So ... where can i get the nightly 14905?
Same place where you get the latest rev. Just check out with -r 14905
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Automatic giant screens aka Timelapse

Post by planetmaker »

Roujin wrote:Thanks for updating. But tell me...
automatic_screenshot_r145286.diff
Just how far does your time machine go? Was the 1.0 branch already split off before that revision? And did underground make it in until r145286? :P :lol:
Lool. :) I got it from the museum of ancient software from the year 2045 :P Obviously my subconciousness is still puzzled by the lightening fast increase in revision numbers from r14XXX to r15XXX that it wanted both numbers be present :)
Of course r15286 is the version I did the patch against.

@LorenzoxD: try this patch against current trunk instead the version you tried.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: [Patch] Automatic giant screens aka Timelapse

Post by Roujin »

Oops, I didn't update the link in the first post.. done now.

@LorenzoxD: the number in the filename of the patch says which revision of OpenTTD it was made with/for. It is advised to apply it to the same, or at least a revision near it. Fortunately, planetmaker just updated the patch, so you can use his version of the patch for r15286. (he just mistyped it a bit ;))

Like Roest said, you can get a specific revision of OpenTTD with the -r [number] command line option if you're using svn from a command line, or if you're using some GUI based program like TurtoiseSVN, there is a box somewhere in the window where you can specify the revision you want...
* @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
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Automatic giant screens aka Timelapse

Post by planetmaker »

A spin-off the update of my clientpatches diff - an update to r15549.

EDIT:
Some ideas for further improvement:
- set the zoomlevel by a number which immediately follows the "#" in the signs (then we can get rid of that setting, too - or alternatively keep it as default which then can be overriden by the signs)
- create an own subdirectory "auto_screenshot" in OpenTTD's data dir. Make for each sign therein another subdirectory with the signs name, but get rid of the '#n'
- same for filenames: get rid of the '#n' therein.
- possibility to define you own character which indicates the positions to take a screenshot from (additional setting)

Chances that I'll add those functions / make those changes are not particularily high, though.
Attachments
automatic_screenshots.diff
updated for r15549
(13.86 KiB) Downloaded 114 times
Iguanna
Engineer
Engineer
Posts: 100
Joined: 21 Nov 2007 00:06

Re: [Patch] Automatic giant screens aka Timelapse

Post by Iguanna »

When I checkout trunk r15549
SVN Checkout.PNG
SVN Checkout.PNG (9.56 KiB) Viewed 1960 times
and apply the above patch for that revision I get this
SVN Error.PNG
SVN Error.PNG (10.27 KiB) Viewed 1959 times
I also tried the r15286 patch (with trunk r15286) and get a similar error.

I would just like to try this out, preferably with a version save-compatible with the 0.7 RCs, so if anyone could give me a hand to get that going it would be much appreciated. It doesn't need to be the latest patch, just one that applies and complies easily. Thanks
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 40 guests