Board index FlightGear Development New features

Random splash screens

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Random splash screens

Postby onox » Tue Jun 02, 2015 4:33 pm

I have added a patch to FG 3.5 to support random splash-textures. Like this:

Code: Select all
<startup>
    <splash-texture>Aircraft/c172p/splash1.png</splash-texture>
    <splash-texture>Aircraft/c172p/splash2.png</splash-texture>
    <splash-texture>Aircraft/c172p/splash3.png</splash-texture>
    <splash-texture>Aircraft/c172p/splash4.png</splash-texture>
</startup>


It will choose one randomly when you start FG. You can add as many splash screens as you want.
onox
Retired
 
Posts: 431
Joined: Fri Jun 20, 2014 2:45 pm

Re: Random splash screens

Postby IAHM-COL » Tue Jun 02, 2015 5:36 pm

Would it be possible? to

1. create a Splash directory
2. place splash there
3. have a nasal code or something else in the set-xml that reads the splash directory for png files, and use them

(as oppose of creating lists over the -set.xml file?)

That may make installing new splashs more smooth
I don't know how to implement such thing, but I know based on the livery code that it could be possible, and I know you (onox) are the right guy to make it happen

:D

Thanks for this exciting new feature

Best
IH-COL
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4064
Joined: Wed Aug 08, 2012 5:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Random splash screens

Postby Tomaskom » Tue Jun 02, 2015 9:16 pm

IAHM-COL wrote in Tue Jun 02, 2015 5:36 pm:(...)
3. have a nasal code or something else in the set-xml that reads the splash directory for png files, and use them

I guess at the very beginning the necessary subsystems aren't even running yet and you don't want to wait until they initialize. I think the method provided by listing the splash screens is just fine. Well, unless you want to have more control over the pick than random, like picking one based on current time (day/night pictures, different seasons) or something similar...
"There are no problems in the air. The only problem is hitting the ground"

Get my L-159 ALCA from the FGUK hangar. If you crash it, things gonna go boom!
User avatar
Tomaskom
 
Posts: 132
Joined: Sun Dec 02, 2012 8:03 pm
Location: Czech Republic
Callsign: OK-TomK
Version: git
OS: openSUSE (Linux)

Re: Random splash screens

Postby IAHM-COL » Tue Jun 02, 2015 9:43 pm

Tomaskom wrote in Tue Jun 02, 2015 9:16 pm:I guess at the very beginning the necessary subsystems aren't even running yet and you don't want to wait until they initialize.

Good point against 'nasaling' this.
But your point about time of date screnshot or something is cool too.

My point goes more in the sense of just populating the "Splash" directories could potentially suffice to randomize the splash.
I understand ONOX had patched flightgear to be able to understand this code and randomize in the first place, so maybe the random implementation of take a random image from "Splash" directory could still be hard coded in the code (not needing a nasal)

Besides that, I agree, the current implementation is good too.

I am Just brainstorming about this a little.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4064
Joined: Wed Aug 08, 2012 5:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Random splash screens

Postby Tomaskom » Tue Jun 02, 2015 11:52 pm

I just can't see how reading out specific folder contents instead of listing the files would help anything. Listing a few lines with the files is so simple and trouble-proof. Not to mention that hardcoding anything like this to be read from a specific folder is not a good practice.
"There are no problems in the air. The only problem is hitting the ground"

Get my L-159 ALCA from the FGUK hangar. If you crash it, things gonna go boom!
User avatar
Tomaskom
 
Posts: 132
Joined: Sun Dec 02, 2012 8:03 pm
Location: Czech Republic
Callsign: OK-TomK
Version: git
OS: openSUSE (Linux)

Re: Random splash screens

Postby IAHM-COL » Tue Jun 02, 2015 11:53 pm

Yes. I see your point now.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4064
Joined: Wed Aug 08, 2012 5:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Random splash screens

Postby Hooray » Wed Jun 03, 2015 5:54 pm

see the Canvas sub-forum, we've had two threads a few months ago where we explained how Nasal/Canvas can be used to implement arbitrary splash screen schemes fairly easily (a splash screen really just being a Canvas window, without any window decoration). The hard-coded splash screen can be disabled using a few properties, so that you can implement Canvas splash screens - and we do have C++ patches for making Nasal/Canvas available much earlier, too.

viewtopic.php?f=71&t=23542#p214463
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11475
Joined: Tue Mar 25, 2008 8:40 am


Return to New features

Who is online

Users browsing this forum: No registered users and 3 guests

cron