Please test: Random Game selection/launch via Video Screensaver
-
EDIT: This build now includes all changes made to the master RetroPie build, up to April 14th 2017.
Hi all.
Here's a small build for testing/perusal of the RetroPie community. The majority of its credit goes to @fieldofcows for the massive work in implementing video, video screensavers, and a separate player (OMXPlayer) for the Raspberry Pi which performs extremely well, albeit at the cost of lacking the ability to render overlays on top of it for themes.
Video here:
I've forked the code, and added a few quality of life changes to it, as well as implemented a few ideas around random game selection that stemmed from @Zigurana 's great work on the Kids-Friendly EmulationStation fork. This had been a major thing for me as I have a large library and sometimes get stuck with the paradox of choice - too much choice leads me to not really know what to play on a given occasion.
A big thanks to the two of them for coming up with the foundation for these small tweaks.
Hope you all have fun, and thanks everyone in advance for your time and contributions :)
What's included in this build:
- Random Game Video Screensaver, with game name and system name captions.
- The ability to directly launch a game from the screensaver (i.e. the one that's showing) by pressing "start", or choose another random game by pressing "right" in the screensaver.
- You can launch the random game video screen saver directly from the system select view, by pressing the "select" button or equivalent in ES, to get a random game video.
- OMXPlayer is used for the screensaver (better performance, no overheating, and effortlessly supporting videos at higher fps or resolutions), and can be used for the Video Gamelist view as well (option in the menu) instead of VLC, but at the expense of overlays on top of the video.
The binary was compiled on a RPi 3, so it might only work on a RPi2/3 at the moment. If you compile it from source, you may get it to work on a Pi 1 or a Windows/Ubuntu system.
Get it here:
https://github.com/pjft/EmulationStation/releases/tag/v0.2-ES-OMX-Apr17Thanks in advance :)
Instructions (adapted/copied from the other posts from @fieldofcows):
-
Either download a fresh copy of retropie from https://github.com/RetroPie/RetroPie-Setup/releases/download/4.1/retropie-4.1-rpi2_rpi3.img.gz and install it on an SD card or use a pre-configured (and backed up) configuration.
-
Connect the raspberry pi to the network
-
Boot the raspberry pi and exit ES back to the terminal
-
Download or copy the new ES build https://github.com/pjft/EmulationStation/releases/download/v0.2-ES-OMX-Apr17/emulationstation into the home directory, e.g.
wget https://github.com/pjft/EmulationStation/releases/download/v0.2-ES-OMX-Apr17/emulationstation
-
Make executable and replace the original ES
chmod +x emulationstation
sudo cp emulationstation /opt/retropie/supplementary/emulationstation/ -
Install your ROMS and configuration including <video> tags and a video supported theme. More important than having a working video theme, though, is actually having videos in the gamelist files. I suspect you may be using a non-video theme for the purpose of benefiting from the video screensaver and launch.
-
Restart your Pi.
If using RetroPie 4.2 or later, you may want to install a separate version of the Carbon theme for this particular build, as it doesn't have the most recent changes to themes and such:
https://mega.nz/#!MJEXUZpT!kEBemgjgE_LIkXDHPmPoPu-GhB9pMAUlPWGPoYSs_so
Detailed Change Log:
- Pressing "select" in the System Select menu launches screensaver. It's an option in the menu, so it can be disabled, and only works for if "Random Video" is the selected screensaver. Help menu updates accordingly.
- Added "right" during video screensaver to select new random video, and "start" to launch it (or just navigate to the gamelist position where it currently is). These are options in the menu, and can be disabled.
- Added the OMX Player option in the menu (it's called "Use Experimental Player" - the default is VLC, which means it defaults to OFF) so we can change it on the fly.
- Added game name and system on screensaver, and option in menu. If enabled, it will show the game title and system as a subtitle for the first 5 seconds of the video screensaver, and the last 5 seconds as well.
- Fixed the legacy screensavers (dim and black) that had stopped working with the recent screensaver refactoring. Hopefully I haven't brought about new problems.
Changes from previous release:
- Keep aspect ratio for videos in OMXPlayer. Vertical games are no longer stretched. Haven't fixed it for VLC yet, but may look into it in the future.
- Made OMXPlayer the default screensaver player for the RPi. VLC is still the default player for the themes.
-
RetroPie 5 is going to be awesome with all the Emulationstation work that is going on (!). Here's hoping for a speedy merging into the master branch :) Unfortunately I don't have the time to test it myself, but I'll be closely following this :)
-
@pjft said in Please test: Random Game selection/launch via Video Screensaver:
Random Game Video Screensaver, with game name and system name captions.
The ability to directly launch a game from the screensaver (i.e. the one that's showing) by pressing "start", or choose another random game by pressing "right" in the screensaver.Might this also be possible for images in case of no videos available at all? Thinking on systems without video, it might be nice to have rotating images with the same functionallity.
-
@daeks Hm.
It is certainly "possible" in the sense that it can be feasible. :) It is not my area of expertise, but doesn't look too complex (famous last words) at first glance.
I may certainly take a look at it in the coming weeks. I might just create a separate screensaver which would be "Random Image". I'm not sure how I feel about mixing videos and images on the same screensaver experience.
Thanks for the suggestion!
-
How about a screensaver, like the windows ones. But pressing "Right" will launch a random game.
-
@lilbud said in Please test: Random Game selection/launch via Video Screensaver:
How about a screensaver, like the windows ones. But pressing "Right" will launch a random game.
Sure, a screensaver rotating random images, like the Windows ones, though I take it that pressing a key will launch the game on display at the moment in the screensaver?
Otherwise, that doesn't really need to be tied in any way to the screensaver, I take it, and it's just a completely different use case altogether?
-
Yeah, like the random game option in the ES-KIDS branch.
-
@lilbud Got it.
The intention behind this particular experiment here is to merge that with the video (or, maybe in the future, image) screensaver capabilities built by @fieldofcows .
Currently, you can do exactly what the random game option in the ES-Kids branch does, in this experiment - that was part of the inspiration here.
In ES-Kids, you'd:
- Open a menu
- Select the "Surprise Me" option
- Be shown a random game in the gamelist view
- Press start to launch, or go back to step 1 if you wanted a new game.
In this experiment, you'll:
- Press "select" on the system view screen
- Are shown a random game in full-screen video
- Press "start" to launch it, or "right" to get a new game.
That's the implementation here. It's not conceptually different to what you're proposing, in the sense that allows you to achieve the same purpose. The difference that @Zigurana's implementation was for the time being inside a menu, and would take you to the gamelist view, whereas this one is accessible via a single button, and takes you to a full-screen video of the random game. It also simplifies selecting subsequent random games. And, if the video screensaver is active, it just uses that so you can immediately launch the game on display.
Hope that makes it clearer.
In any sense, there's a Pull Request from Zigurana to merge his implementation with fieldofcows' work, I believe, in case that's most appealing to you!
Hope that makes it clearer, but definitely give it a shot and see what works for you and what doesn't :)
-
Since I don't use videos, is there a chance you could add "Random Game Launch" in the Retropie menu? It would be cool if this was implemented without the need to custom compile ES. If you could point me in the right direction I would love it do this! I'll look at the code after work and see if I can mod it, hence the name ;)
-
@madmodder123 I'll try to look into adapting this for using images rather than videos only, so that you could achieve something similar, and to make "select" select a random game from the system view, then, if you don't want any of these screensavers.
That will take some time, though, as my free time is unfortunately quite limited. But noted, I will look into that.
My best suggestion for that currently, though, is to use @Zigurana 's ES-Kids fork, as he has that built-in already. There's a page on the Wiki under Kids Friendly EmulationStation, I believe.
Thanks!
-
Update on the random game launch:
@Zigurana has already done a lot of work on that in his branch, and has submitted a pull request to merge with fieldofcows' branch as well, in a much more elegant way than I could. As such, I won't be reimplementing that, but rather wait until that is merged over.
For reference, the pull request is
https://github.com/fieldofcows/EmulationStation/pull/16/files
in case you're curious.
For the time being, I'll likely just consider adapting my code to allow an images screensaver as well, as others have already done a much better job at implementing a random game selection :)
For those just looking for that, for the time being the ES Kids fork is the way to go - and I highly recommend it, if you're not using videos. If you are using videos, you may try the release I put here.
Hopefully one day the majority of these things can be merged back to the main branch :)
-
@pjft :
Thanks for the praise, not sure if I deserve itπ . I added the random game stuff as a PR to @fieldofcows screensaver work, as that was the I was initially envisioning it: as a type of attractive screensaver mode that serves up random game items when idle.
The manual approach was really a test-mode to see if the goto_random function worked well, which turned out to be rather useful, esp. with larger libraries.
I see no problem with adding the button functionality, as I can see how going through the menu is a bit of a pain after 10 games or so.
In that regard, I think we should not make it anymore complicated than necessary, and it does not need to be conflated with the video improvements at all. When using the manual mode, ES will simply jump to a random item, if your setup has videos fine, otherwise it will just show the static art (or even just the single line entry, in case of basic view).Maybe I will have a look at adding the button from the systemview, should not be difficult. Although now that I think about it, we might want to opt for X or Y, rather than 'select', as that way we can use it in both the systemview and gamelistviews.
Also in my mind 'select' should be a button that 'works' on the selected item. So for instance, pressing 'select' while focusing on the NES system, should/could give a popup window with some additional info on the system, maybe some options related to the system, etc. -
@Zigurana Thanks for the notes. I fully agree it shouldn't be more complicated than it needs to. I also agree with the "select" button semantics you chose - the reason I attached it to that button was because of a chat we had had in GitHub, where you were stating that with the ES-Kids version we already had all face buttons used, so I was more planning for the future.
However, I believe we can reach an interesting compromise/balance here.
We can assign square (Y?) to the random game/video, and use triangle (X?) for the metadata shortcut, as a 4-state toggle:
<None> - <Favorite> - <Kid Friendly> - <Favorite and Kid Friendly>
More than happy to make that change on my end.
What I'd like to consider, though, is how do we eventually get all of this merged back to the main branch. All the stuff you did on ES-Kids should be able to be merged there, provided it is broken down in smaller PRs, and that we fix the few 0-length-index errors that persist when some systems don't have favorites/kids games, and maybe one or two other remaining performance considerations, if relevant.
And same for @fieldofcows ' work on video screensaver. Right now, since I forked my code from @fieldofcows 's fork, I imagine it'd be hard to get my code to go straight to the master RetroPie branch - even if because I'd be submitting code that I did not in any way develop.
Would the two of you be up to considering this - either individually or in a shared repository, and come up with a proper roadmap (more in terms of sequence rather than actual timelines - my day job already has enough of those)? :)
I'm more than happy to work together in the same repository as you, if you feel it'd be the best thing to do. And, for the sake of sequence and stability, I'd definitely believe that the ES-Kids stuff should be easier to be committed, as it's been more thoroughly tested by several people throughout the last year or so at this stage.
And I personally would want to have some sort of closure on the videoplayer before we invest more into merging with the main branch. That's my next investigation in terms of where I'm going to sink some time on, with my limited ability.
Let me know your thoughts.
-
@pjft :
Thanks for your considerations, I think the four-state toggle is inventive!My thought-process when thinking about the Kid-Kiosk UI mode branch goes something like this:
Optimist: "Ah, yes, Kidmode stuff to do, let's go team, crush some bugs!"
Pessimist: "Don't you remember that was that part of the code that you rather not look at again, not only because its a mess, but also because you probably wrecked it even more with your so-called features?"
Optimist: "Yes, but this time it will be better, I've got more experience in C++ now. I actually know something about classes this time!"
Pessimist: "Remember, you've started a redesign of this code two times already"
Optimist: "Yes, but this time I've got this great idea!"
Realist: "@fieldofcows is probably much more able to implement a filtering framework, which will make the difficult part of the kid-modes stuff obsolete anyways."
Optimist: "Yes, but..."
Procrastinist: "Hey, look at this new thing you could try to implement, what about chiptune bg music support in ES?"
Optimist: "Wow!"
[/me listens to chiptune music while reading up on SDL_mixer]Kidding aside, I agree fully with your sentiments, and things have changed a bit since last year. Nowadays there is much more active development in ES going on, and I must say, that is tremendously motivating. Another big change is that I can now do debugging in windows, which should make crushing the bugs at least a feasible proposition. A year ago, I used to do this with logging statements only, not a pretty sight X-P.
I think the kidmode branch could be separated into roughly two deliveries, one focusing on hiding the menu's, and one focusing on the added metadata elements and subsequent filtering of items in the gamelist view. Splitting it up smaller does not really constitute a useful standalone features I think.
My first steps now is to man up, turn up the chiptune noise, and fire up the debugger. I think most people would already be happy with an updated/rebased version of the kidmode branch.
-
@pjft said in Please test: Random Game selection/launch via Video Screensaver:
sudo cp emulationstation /opt/retropie/supplementary/emulationstation/
I've completed your instructions, but getting nothing when pressing select in the system select screen? Is this just for kids/kisok mode?
-
@__Scannigan__ Hi Scannigan!
Thanks for trying it out.
No, not at all. You may be perfectly right. You may need to go to the menu, UI settings, and select "Random Video" as your screensaver. Sorry about that omission. Let me know if that fixes it and I'll update the first post.
-
@Zigurana :)
Sorry for the delay, yesterday was a chaotic day. I fully empathize with your thought process :) I've been there quite a few times, to be honest, so I don't blame you whatsoever. I'm also at the moment debugging via logging statements, sigh. But chiptune music rocks ;)
I agree that the kidmode branch could probably be split in a couple of deliveries:
- Metadata additions (favorites and children)
- Filtering based on metadata (favorites and children)
- Hiding the menus
- Random game (because, why not) :P
But I'm obviously not fully familiar with the architecture. I see these as being fairly isolated yet robust additions to the main branch in their own right.
I'd love to give some feedback on the PR you sent to @fieldofcows , as there are some considerations I'd like to make on it. I'll probably add them there on that conversation. :)
Anyway, good times ahead for ES.
I'm now at least focusing on trying to come up with a future-proof solution for the video player on the Pi. If we decide to move things forward with any of these features, I'm happy to work on these some more, but without solving the video player issues first any further "quality of life" improvements are marginal. :/
-
@pjft Don't have an option for Random Video just Black or Dim
-
@__Scannigan__ Hm. That's unfortunate.
I can't claim that there wasn't something wrong with the binary I uploaded. There's a possibility that I uploaded the wrong binary. I will try to check later today.
That being said, there's also the chance that one of the steps is either missing or went wrong, meaning that you may still be running the old emulationstation binary version.
In the current version, you should not only have a "random video" option, but also - if you scroll down in the UI settings menu - you should have three new options: screensaver controls, show game name on screensaver, and launch game from screensaver (or something to that effect). Oh, and there should be an option for "use experimental video player".
If you don't see these there, it's likely something went wrong.
Can you check the contents of .emulationstation/es_settings.cfg , and see if there are any options around OMXPlayer, ScreensaverControls or such?
If you do
ls -l /opt/retropie/supplementary/emulationstation/
What's the date of the emulationstation binary there?
Could you try downloading it on your desktop and copying it to your Raspberry Pi in some other way?
Let me know. I want to make sure I can help you!
-
Nope nothing about OMXPlayer in es.settings.cfg
and this is what I get: -
rw-r--r-- 1 root root 451 Feb 4 00:54 CREDITS.md
-rwxr-xr-x 1 root root 4331160 Mar 10 12:02 emulationstation
-rwxr-xr-x 1 root root 444 Feb 4 00:54 emulationstation.sh
-rw-r--r-- 1 root root 5667 Feb 4 00:54 GAMELISTS.md
-rw-r--r-- 1 root root 11862 Feb 4 00:54 README.md
drwxr-xr-x 3 root root 4096 Mar 10 11:48 scripts
-rw-r--r-- 1 root root 19449 Feb 4 00:54 THEMES.md
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.