Please test: Random Game selection/launch via Video Screensaver
-
@TMNTturtlguy in the last few months alone the development of ES has come leaps and bounds with so many people working on so many new features​, this is exciting times :)
-
@TMNTturtlguy Hi, and thanks for the message! Yes, the family is doing better - the youngest one is hopefully fully recovered now, at least until the next thing :)
As for getting this back into the main ES branch, as I mentioned earlier, that is not something that's on my plans until we have a proper solution for video that suits everyone, and not until @fieldofcows determines it is the right time to do so, as ultimately my changes depend on his code.
I could consider doing so - i.e. creating PRs for the current version into the main ES branch - only if for whatever reason:
- @fieldofcows feels that he doesn't have time to continue with this work in the coming months, and that it would help him that someone else makes those changes (i.e. maybe he hasn't done so because of lack of time);
- and only if he would fully approve of me doing so (as it is ultimately his work). If there's another reason for it not to make it there in his opinion (i.e. not tested enough, maybe it isn't complete yet, or just isn't the right solution in his view), then this isn't something I would do. I do not like the idea of committing other people's code to the main branch - it kind of feels like stealing, and (I personally feel) it goes against the whole spirit of the community here.
That is why I:
- Have provided this particular build, for people to test and use, as I personally have it as my main ES version.
- Have not been doing a lot of new development in this particular build (only ironing out some kinks), as it feels kind of moot to go so far in this direction and later on having to do a lot of work to merge it into the main ES branch.
- Have been focusing on other improvements that are based on the main branch, since those will be able to make it to the wider audience sooner rather than later. The things I'm working on now have nothing to do with videos or screensavers, for better and for worse :)
I hope you understand that. I have faith that we will have a much better off ES in 6 months' time than we do right now - we just have to be patient and wait. :) After all, this is mostly worked on by people in their spare time, and - as @Scannigan mentioned - it has come leaps and bounds in the last few months. Exciting times indeed.
I know it's not the answer you might have wanted, but it is the answer I have for now. :)
I'm very happy to learn that you have decided to work on a theme - I'm very much looking forward to seeing what you come up with!
Have a great Sunday everyone - and, in case it's relevant and in case some of you are not aware, it's Mother's Day today in some parts of the world. Don't get in trouble with your mothers and significant others by forgetting that, if applicable :)
-
Hey,
I had offered this PR, to the screensaver branch of @fieldofcows.
He has not accepted it as of yet, but I could also just try to add a hotkey (say X), and submit a PR to the RetroPie master instead.What do you think? That way at least, we would have delivered the go-to-random game feature.
The difficulty with building it on top of another feature-development branch is that it becomes difficult to disentangle, and thereby difficult to review/test. -
@Zigurana Hi! Glad to hear from you :) I've been watching your adventures on the carousel changes - well done!
I think that is a worthy effort. I apologize - I never commented on your PR. Would you think it'd be useful at this stage?
My main comment was functional. only, in terms of the random selection (and I say this without knowing how your previous implementation worked) if I'm reading it correctly - and I may be reading it wrong, so just say so :)
The fact that your random selection is [select random system] x [select random game within system] makes for a less-than-optimal random distribution, as systems have a different number of games.
Case in point:
Assuming someone has two systems with the following specs (random numbers, but just to state the example):- System A (MAME): 99 games;
- System B (Dreamcast) 1 game;
The ideal scenario would be that each game would have an equal probability of being selected - 1% - but in the proposed implementation what actually happens is that the Dreamcast game has 50% chances of being selected, and each of the other games has a ~0.5% chance of making it.
I know I deliberately made up numbers for the sake of clarity, but the case still stands. I imagine some people will have systems with hundreds or thousands of games (MAME is a good case), with others with few games (PC engine only has something like 30 games in total, or Ports with just a few as well).
I know it requires a change to the logic, but I hope it's not a significant one.
But hey, even if it doesn't get changed, it's already better than not having anything :)
Would love to hear your thoughts. I've been mostly silent as asides from going through a more intensive work period, I'm doing a bit of work on some ES changes as well, for the main branch. Nothing as sexy as the theme and video changes, but something that hopefully will be helpful to the community :)
-
@pjft
You are completely correct, currently the distribution is heavily skewed towards games in systems with fewer items. Without the redesign for gamelist database in place, I'm not sure how to fix that easily. I'd rather not build a separate list with all possible games to sample from, if I can at all help it. Would you have an idea of how to tackle that without creating a shadow-archive? -
@Zigurana I actually have one, as I had thought about that after reading your CR - and wanting to improve fieldofcows' implementation, just because it is constantly iterating through the entire library, even though it's not slow in reality - which at high level could be the following, in pseudo-code:
-
Store an index variable with the count of all games, at initialization (or, on get, if it's zero, initialize it once so you don't do it more than that).
int idx = 0;
for each system
idx += system.getGameCount(); -
Then, on randomization,
int r = rand()*idx; // or whatever the right syntax is in C++
for iterator it over each system
if (it->getGameCount() < r) {
r -= it->getGameCount() // this will decrease the counter until we are within the right system
} else {
// the random number falls within this system
return it->getRootFolder()->getFilesRecursive()[r];
}
Thoughts? I did not implement this, but I think this should work in principle. The indexing is also likely not needed, if you'd rather calculate the game value all the time. It shouldn't be too expensive, computationally speaking, but if possible I try to optimize computer cycles :)
EDIT: once again, just to clarify, this is pseudo-code. I know some of the methods actually exist, as I've been diving deep into SystemData and FileData, but this will not compile as it is :)
-
-
@pjft
Allright, that seems a feasible approach, I'll have a stab at it tomorrow, as my brain is fried right now.
Thanks for the suggestion. -
@Zigurana Not at all, please. Thank you for asking :)
Very much glad to help.
-
hello,
Thanks for this great feature.
I'm having a question, is it possible to somehow "mute" the sound of the videos ? (or even better mute every sounds from OMXPlayer)
Thanks :)
EDIT: oh, and I came across a little problem, some of the videos seems to replay for 4 or 5 seconds when they end, I've checked some on my main computer and they don't have any loop or something. Does someone else have this problem ?
-
@airainchoc Thanks for the note - yes, that is certainly something that I've been meaning to do for a while. I'll look into adding a "mute video" option!
As for the videos replaying, I am unsure what you mean - maybe you can take a video and send it over? Is it during screensaver, or in the gamelist? What steps are you taking to replicate that? And are you using the experimental player (i.e. did you select that in the options) or the main one?
Thanks!
-
@pjft Thanks for your reply.
In screensaver mode, some videos when then end, don't go to the next directly, but instead they play again from the beginning during 4 or 5 secs.
To replicate that, i can either let the screensaver come after 2 minutes, or, call it by pressing select.
I'm using the experimental player as VLC gives me more arctifacts than good images.I'll try to take a video tonight.
Thanks for support
-
@airainchoc the length of your preview video is shorter than the set period of time the screensaver plays the video which means the video starts to loop before going to the next video, I had a similar issue but i thought it was so little not to bother @pjft with it
-
I agree with @Scannigan as I have noticed the same thing on a small number of my videos. It does not bother me at all that this happens because in all honesty, who sits and watches the screensaver videos for an extended period of time anyways? This is a very cool feature that works really nicely in my arcade cabinet build in my arcade room. It is more about the ambiance and nostalgia of the screensaver than a few seconds of the video replaying. I have had no comments this from anyone who has seen my setup, only positive feedback!
-
Oh, I see. Yes, that is correct. The screensaver loops videos every X seconds (I think 35?). If the video is shorter it'll loop, if it's longer it'll cut it short.
Thanks for clarifying all!
-
Thanks everyone for your answers and explanations
I agree with you that it's not really a problem, but as everything else seems to work very nice... Devil is in the details ;)
-
@airainchoc @TMNTturtlguy @Scannigan @incunabula
So, here's a small update that hopefully will serve as a good Easter present for everyone.
I have added the mute options (under "Video Player Settings" now), as well as reduced the video time to 30 secs rather than the previous 35 secs.
It also includes the Filter by Genre, Publisher/Developer, Players and Rating feature I developed a few weeks ago and is still being approved to be merged in the main branch.
But, more importantly, this build should now be up to date on everything present in the main branch up to yesterday (April 14th). That means - yes - carousel themes, maxSize, etc.
So with this current build you can - hopefully - get the best of both worlds, at least as of this date. Please test and let me know if anything that works in the main branch doesn't work here.
I don't plan on updating this regularly, as there is usually some work involved and I can't commit to that, but I may revisit if there's anything particularly big and new that would be helpful to incorporate, and that doesn't break everything :)
You can get it at
https://github.com/pjft/EmulationStation/releases/download/v0.2-ES-OMX-Apr17/emulationstation
I'll update the instructions in the main post!
-
@pjft you legend
-
@__Scannigan__ I recall you had the problem of wanting screensaver and OMX but also wanting the latest features from the main branch, so while this isn't ideal - in the sense that it's not incorporated in the main branch for good - hopefully it's good enough for now until things are properly merged:)
-
@pjft you are the best! I am away for the holiday weekend, but I will be testing this out next week for sure! This is amazing! Thank you so much
-
thanks for this last release,
just a question, is there a way to update emulationstation from an older release of yours ? seems it doesn't update if I do it like you told on 1st post
EDIT: Self answer:
mkdir /home/pi/tmp-es cd /home/pi/tmp-es rm emulationstation wget https://github.com/pjft/EmulationStation/releases/download/v0.2-ES-OMX-Apr17/emulationstation chmod +x emulationstation cd /opt/retropie/supplementary/emulationstation sudo cp /home/pi/tmp-es/emulationstation /opt/retropie/supplementary/emulationstation
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.