Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Fun Facts Splashscreens



  • @meleu said in Fun Facts Splashscreens:

    So with your suggestion we would create a screen on every boot and after a game is finished.

    With that sentece I'm not sure if you are confused about what the fun-fact script does. Then here are some words, just trying to clarify:
    The boot splashscreen image file is different from launching images.

    Sorry bro for being unclear.
    My suggestion was to create a funfact screen during boot (not a splashscreen!) to have one generated picture ready to show if you start a ROM. Then the runcommand-onend creates the next...

    Hope that I was clear now ;)



  • @cyperghost

    My suggestion was to create a funfact screen during boot (not a splashscreen!) to have one generated picture ready to show if you start a ROM.

    Generate launching images at boot? For what system? All of them? 😱

    I think the delay would be unbearable.



  • @meleu @cyperghost maybe what we could do is have a function in fun facts to create all those launching images (it would take a long time) and then we could either use onend or onstart to generate the new one, per rom/system



  • @hiulit I wouldn't bother to code something to be used only one time to do the exactly same thing that would be done on demand later (except for learning purposes, of course).

    Summing up: let's focus on runcommand-onstart/-onend scripts! ;-)



  • I'm happy to announce Fun Facts! Splashscreens v2.0.0 :D!!!

    Check out https://github.com/hiulit/RetroPie-Fun-Facts-Splashscreens to see the complete documentation about all the new options.

    CHANGELOG

    Fixed

    • Fixed check_dependencies.
    • Fixed files permissions after updating the script.
    • Fixed scriptmodule files and help.
    • Fixed Set text color dialog, which was crashing after clicking the Back button.
    • Fixed GUI error messages going to >&2.

    Added

    • Added --add-fun-fact option to add new Fun Facts!.
    • Added --remove-fun-fact option to remove Fun Facts!.
    • Added --edit-config option to edit the config file.
    • Added --reset-config option to reset the config file.
    • Added --enable-log option to enable logging.
    • Added --disable-log option to disable logging.
    • Added --restore-defaults option to restore default files (splashscreen, config file and Fun Facts!).
    • Added functionality to download the Fun Facts! Splashscreens default splashscreen if it doesn't exist.
    • Added functionality to download the Fun Facts! Splashscreens config file if it doesn't exist.
    • Added functionality to download the Fun Facts! Splashscreens text file if it doesn't exist.
    • Added log file fun-facts-splashcreens.log.
    • Added functionality to enable/disable logging in the config file.
    • Added functionality to enable/disable script at boot in the config file.
    • Check if the script is used as a scriptmodule.

    Changed

    • Updated Fun Facts!.
    • Changed default-splashscreen.png for retropie-default.png.
    • Changed fun-facts-settings.cfg for fun-facts-splashscreens-settings.cfg.
    • Silenced some outputs.
    • Removed CODE_OF_CONDUCT.md, ISSUE_TEMAPLATE.md and PULL_REQUEST_TEMPLATE.md as nobody, not even me, was using them :)

    How to update

    As it is a major version, instead of updating the script, I would start with a clean installation.

    • Remove any previous installation by deleting the Fun Facts! Splashscreens folder: /home/pi/RetroPie-Fun-Facts-Splashscreens.
    • Install the script:
    cd /home/pi/
    git clone https://github.com/hiulit/RetroPie-Fun-Facts-Splashscreens.git
    cd RetroPie-Fun-Facts-Splashscreens/
    sudo chmod +x fun-facts-splashscreens.sh
    

    If you are using the script via the RetroPie-Setup (if you installed the script as a scriptmodule via the RetroPie-Extra repository), go to:

    • Manage packages
    • Manage experimental packages
    • fun-facts-splashscreens
    • Remove
    • Install from source

    But wait! I'm still waiting for a PR to be accepted ;)

    Now what?

    Let's start working on runcommand-onstart/-onend!!



  • @hiulit said in Fun Facts Splashscreens:

    But wait! I'm still waiting for a PR to be accepted ;)

    Accepted!



  • @zerojay Thanks!!! :)

    P.S. I'll send you a new one in a few days... Sorry! :P



  • @hiulit said in Fun Facts Splashscreens:

    @zerojay Thanks!!! :)

    P.S. I'll send you a new one in a few days... Sorry! :P

    Keep 'em comin'.



  • Working on runcommand-onend.sh to create Fun Facts! Splashscreens when the user finishes playing a game, so next time it starts a game, a Fun Facts! Splashscreen will be shown :)

    Right now I'm using the awesome Pixel theme to test the creation of splashscreens using the system and console images and then attaching the Fun Fact!.

    2_1518625862626_fun-facts-splashscreens-system-snes.jpg

    1_1518625862625_fun-facts-splashscreens-system-nes.jpg

    0_1518625862624_fun-facts-splashscreens-system-megadrive.jpg

    @meleu How did you manage to use imagemagick to convert svg to png? Because the Pixel theme uses png files and it's working just fine, but I've seen the majority of themes (Carbon theme included) use svg and I'm having problems with that.

    P.S. Does anybody know if there's a naming convention for creating themes? (folder naming, assets, etc.) Thanks!





  • @meleu I used your code and I'm still having the same issue:

    convert: delegate failed '"rsvg-convert -o "%o" "%i""' @ error/delegate.c
    

    It seems that I need rsvg but my imagemagick doesn't have it and I've searched the Interwebs and I have to install manually...



  • @hiulit if I recall correctly that's why I made this commit: https://github.com/RetroPie/RetroPie-Setup/commit/bf8f36971f161cf6ce5bf4a029ae4e64bdb87f65

    Then, I believe you can solve it by installing librsvg2-bin.



  • @meleu Nice! I'll try that :)



  • @meleu Thanks! It's working :D

    I'll keep working on creating Fun Facts! Splashscreens using runcommand-onend.sh. And of course, I'll take a deep look at your generate-launching-images.sh code, because that's basically what I'm lookinf for.

    I have a little video demo:

    0_1518689050846_fun-facts-splashscreens-demo.png

    P.S. In the VM everything is slower than it should be.



  • If I end up adding this new feature (creating splashscreens with Fun Facts! for each system using runcommand-onend.sh) in Fun Facts! Splashscreens, maybe it's time to start thinking about using tags for the facts somehow?

    I think it would be better if the facts are related to the system the user is about to use.

    What do you think?



  • What I have right now is:

    • The runcommand-onend.sh placed in /opt/retropie/configs/all:
    #!/usr/bin/env bash
    # runcommand-onend.sh
    
    "/home/pi/RetroPie-Fun-Facts-Splashscreens/fun-facts-splashscreens-runcommand-onend.sh" "$1"
    

    Actually, the fun-facts-splashscreens.sh script will have an option to enable/disable runcommand-onend.shusing something like this to add/remove this line:

    "/home/pi/RetroPie-Fun-Facts-Splashscreens/fun-facts-splashscreens-runcommand-onend.sh" "$1"
    

    The script will check if runcommand-onend.sh already exists.
    If it does, it will add/remove that line.
    If not, it will create the file and add that line.

    • The fun-facts-splashscreens-runcommand-onend.shfile:
    #!/usr/bin/env bash
    # fun-facts-splashscreens-runcommand-onend.sh
    
    readonly RP_CONFIG_DIR="/opt/retropie/configs"
    readonly SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
    readonly SYSTEM="$1"
    
    [[ -f "$RP_CONFIG_DIR/$SYSTEM/launching.png"  ]] && rm "$RP_CONFIG_DIR/$SYSTEM/launching.png"
    
    "$SCRIPT_DIR/fun-facts-splashscreens.sh" --create-fun-fact "$SYSTEM"
    

    What it does is very simple. Basically it takes the system variable $1 and it passes it to --create-fun-fact. All the heavy lifting is done in fun-facts-splashscreens.sh in the create_fun_fact() function.

    • If --create-fun-fact doesn't have any argument, it creates a boot splashscreen.
    • If the argument passed to --create-fun-fact is "all", it will create splashscreens for each system. This is a good option to run the first time (it takes a while) to have splashscreens for all the systems ready to use.
    • If the argument passed to --create-fun-fact is "$1"(megadrive, nes, snes, etc.) it will only create a splashscreen for that specific system.


  • Some examples of system launching images with box art.

    Everything is positioned based on percentages of the screen resolution.

    • The logo is 60% wide and 20% tall and is positioned 5% from the top.
    • The box art is centered and 35% tall.
    • The Fun Fact! is 60% wide and 15% tall and is positioned 15% from the bottom
    • The "Press any button..." text is 60% wide and 5% tall and is positioned 5% from the bottom.

    0_1518708720666_ffs-3do.png

    0_1518708738381_ffs-megadrive.png

    0_1518708748365_ffs-genesis.png

    0_1518708759493_ffs-mame-libretro.png

    0_1518708766502_ffs-nes.png

    0_1518708775150_ffs-snes.png



  • @hiulit That looks beautiful.

    The creation is incredible fast. So why not using /dev/shm and create the screens with runcommand-onstart?



  • @cyperghost I don't know what you mean by using /dev/shm.. :P



  • @hiulit That's a RAM drive ... Don't know if it's available on the x86 versions. The Rapsberry gots that


 

Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.