OpenTTD Screensaver

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
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

OpenTTD Screensaver

Post by CommanderZ »

Bored of stupid windows screensavers? Use your favorite OTTD game as your screensaver!

How to use precompiled binaries

1) Download the screensaver package.

2) Extract it somewhere.

3) Put the original TTD data files (sample.cat, trg1r.grf, trgcr.grf, trghr.grf, trgir.grf and trgtr.grf) into "data" directory.

4) OPTIONAL: Copy your favorite OTTD savegame file into the "save" directory and rename it to screensaver.sav. Make sure the savegame is compatible with trunk revision 14030 (stables 0.6.2 and older are compatible). Make sure there are at least several signs defining individual camera views or the camera would be static.

5) Download the OpenTTDCoop GRF pack 7.1 and extract it into the data folder if you want to use the included demo game. Make sure there are all the GRFs your savegame uses if you are not using the demo game.

6) Enter the directory and right-click on the openttd.scr. Now choose "Install".

7) Windows screensaver dialog will pop up. Make sure correct timeout is selected.

8 ) OPTIONAL: Click Configuration. Seemingly unmodded OpenTTD will open. Now make sure valid screen resolution is set and fullscreen mode is ON. The screensaver looks very weird in windowed mode (but starts and quits faster). You can also adjust some more settings. You can later access the configuration mode by right-clicking the openttd.scr (the screensaver file) and schoosing "Configure" or by right-clicking desktop, choosing "Properties", then going to "Screensaver" tab and clicking the "Configure" button.

It is done, now you can test it :)

How to compile it yourself

1) Apply the patch on r14030 source as described in this thread. Or use BuildOTTD and then skip the step 4.

2) OPTIONAL: Apply any third party patches - screensaver should be compatible with most of them

3) Compile the patch using any compiler you like.

4) Rename the resulting openttd.exe to openttd.scr.

5) Continue with step 4 of "How to use precompiled binaries" 8)

Known issues

- takes some time to load and quit (this is much faster in windowed mode, but it looks weird)

- no support for non-windows platforms and Win98 and older. Please confirm if it works on Vista and 2000.

- no support for passwords (at least it seems)

Version history

Version 1

- first public version

Version 2

- the camera now jumps randomly over the signs

- demo game present (requires OpenTTDCoop GRF pack 7.1)

- fixed many negative effects caused by the time flow (crashes, industry closures, new vehicle screens, town growth...)

- mouse movement now shuts the screensaver down (= the application now behaves fully as screensaver)

- updated to r14030
Last edited by CommanderZ on 09 Aug 2008 17:12, edited 7 times in total.
Mchl
Director
Director
Posts: 611
Joined: 05 Jan 2007 15:50
Location: Poland
Contact:

Re: OpenTTD Screensaver

Post by Mchl »

For hard-core OpenTTD experience there's a possibility in Vista to set up a screensaver as an animated desktop (needs external app).
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: OpenTTD Screensaver

Post by Roujin »

Interesting :)

For the moving viewport thing, (I'm sure you'd manage it on your own, but anyways ;)) you might have a look at this patch by me: http://www.tt-forums.net/viewtopic.php?f=33&t=36925

This combined with the patch option "Smooth viewport scrolling" gives very nice results imo :)
* @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: OpenTTD Screensaver

Post by CommanderZ »

Thanks Roujin, you have saved me a lot of coding. This way I made it to work in less than hour :)

What annoys me is a still growing list of items that will need to be altered to make it work really correctly.

- no industry closures (including exhaustion in pikka's industries), no industry spawning
- no vehicle eldering (this can be bypassed by disabling breadowns)
- no plane crashes
- no annoying popups (news, finances, vehicle testing offers). Some can be disabled with correct patch settings, some not.
- no disasters (can be disabled in patch settings)
- no victory/defeat
.
.
.

In final analysis, the best would be if it was possible to stop time without pausing the game...I mean let the game run without increasing date.

I will post new version once I have a nice savegame to use as default screensaver.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: OpenTTD Screensaver

Post by Roujin »

Maybe you can utilize GM_MENU? Because those things shouldn't be happening in the main menu either...

edit: at least part of them.. I don't really know if industry closure and opening is disabled in GM_MENU, but I'd guess so...
* @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: OpenTTD Screensaver

Post by CommanderZ »

I think I would break far more thing then I would get.

I haven't looked into it yet, but I still hope I will be able to "stop time". Preventing industry closures is probably very simple, so it doesn't matter much. The only thing I'm afraid of is the GRF-triggered closure, I have no idea how NewIndustries and GRF at all work.


EDIT: Yaaaay, it was as simple as I hoped it to be! Also, most of the annoying stuff seems to be dependent on days/months, so I fixed it everything at once...by adding one condition :twisted:

EDIT 2: OTTD screenaver final release candidate will be released soon. I'm just trying to hunt down one crashing bug.
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: OpenTTD Screensaver

Post by CommanderZ »

Version 2

- the camera now jumps randomly over the signs
- demo game present (requires OpenTTDCoop GRF pack 7.1)
- fixed many negative effects caused by the time flow (crashes, industry closures, new vehicle screens, town growth...)
- mouse movement now shuts the screensaver down (= the application now behaves fully as screensaver)
- updated to r14030
Attachments
screensaver_v2.diff
Patch file against r14030
(14.98 KiB) Downloaded 397 times
OTTD Screensaver v2.zip
Ready to use executable with preconfigured cfg file and demo game included.
(2.82 MiB) Downloaded 879 times
Kruser
Engineer
Engineer
Posts: 1
Joined: 18 Mar 2008 21:44

Re: OpenTTD Screensaver

Post by Kruser »

I´ve a problem with your screensaver on my WindowsXP laptop.

I configured it with my own savegames. The screensaver starts and chanches the view to the first sign.
But when die camera view moves a third time, the screensaver closes and exits.

I´m looking forward to your reply.

bye

Kruser
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: OpenTTD Screensaver

Post by CommanderZ »

Send me your savegame, I will have a look at it.
Xrufuian
Transport Coordinator
Transport Coordinator
Posts: 334
Joined: 18 Sep 2008 23:47
Location: California, USA

Re: OpenTTD Screensaver

Post by Xrufuian »

Nice Idea, I like it. :D

However, it doesn't work for me. :( When I run it, my screen goes black for 5 secs, then dumps to the desktop. :cry:

My operating system is Windows 5.1.2600
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: OpenTTD Screensaver

Post by CommanderZ »

Did you exactly follow the instructions? This happens if you don't have the GRF pack and the saved game requires it (my demo game does).
Xrufuian
Transport Coordinator
Transport Coordinator
Posts: 334
Joined: 18 Sep 2008 23:47
Location: California, USA

Re: OpenTTD Screensaver

Post by Xrufuian »

CommanderZ wrote:Did you exactly follow the instructions? This happens if you don't have the GRF pack and the saved game requires it (my demo game does).
Got the GRF pack, had it for sometime. I'll retry copying the files, I might have missed one of them.

However in the "config" it worked, I got carried away playing it. :mrgreen:

I wish that there was something like this for Locomotion.
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: OpenTTD Screensaver

Post by CommanderZ »

Are you using the demo game or your own map as screensaver?
Xrufuian
Transport Coordinator
Transport Coordinator
Posts: 334
Joined: 18 Sep 2008 23:47
Location: California, USA

Re: OpenTTD Screensaver

Post by Xrufuian »

CommanderZ wrote:Are you using the demo game or your own map as screensaver?
The one that is the main menu background.
Screensaver2.sav
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: OpenTTD Screensaver

Post by CommanderZ »

Strange, it works for me :(

Does it work for you with the default sreensaver.sav?
Xrufuian
Transport Coordinator
Transport Coordinator
Posts: 334
Joined: 18 Sep 2008 23:47
Location: California, USA

Re: OpenTTD Screensaver

Post by Xrufuian »

CommanderZ wrote:Strange, it works for me :(

Does it work for you with the default sreensaver.sav?
No, the config mode crashes when I load screensaver.sav. I'll try copying the GRF pack again, I may have missed a file. :roll:
Aylo
Traffic Manager
Traffic Manager
Posts: 198
Joined: 11 Apr 2007 16:47

Re: OpenTTD Screensaver

Post by Aylo »

A really good idea, CommanderZ
In my scenario the viewport only switches between the first two signs (of four). In your example scenario it works.
Attachments
screensaver.sav
(374.26 KiB) Downloaded 172 times
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: OpenTTD Screensaver

Post by CommanderZ »

Aylo wrote:A really good idea, CommanderZ
In my scenario the viewport only switches between the first two signs (of four). In your example scenario it works.
I'm looking at it, thanks for report...it seems something is wrong with random number generator.

Btw, why the hell are you using ISR 3.2...8.0 is out and it is unbelievably beautiful.
Aylo
Traffic Manager
Traffic Manager
Posts: 198
Joined: 11 Apr 2007 16:47

Re: OpenTTD Screensaver

Post by Aylo »

I'm using 0.3.2??? Maybe, my openttdcoop pakcage is not up to date. Normally I play with 0.8
User avatar
Qu@rks
Route Supervisor
Route Supervisor
Posts: 495
Joined: 26 Mar 2006 23:16
Location: Berlin, Germany
Contact:

Re: OpenTTD Screensaver

Post by Qu@rks »

How do you create a "sign" in a savegame so that the screensaver can jump to that position?

Oh and the standard screensaver savegame doesnt work for me either. The second one does but jumps to the edge of the map after like 4 seconds. And yes I did follow the instructions...
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 43 guests