Player
Player copied to clipboard
Add Scene_Settings - Config 3 of N
This is a WIP to add a settings menu. Early feedback is welcome on the general layout and feature set this should have.
Input:
- [x] Add input remapping for keyboard
- [x] Add input remapping for gamepads
Audio:
- [x] BGM Volume
- [x] SFX Volume
Not planned:
- [ ] Configure Midi backend to use
- [ ] Configure Midi soundfont to use
- [ ] Configure which system audio device to output to.
- [ ] Number of output channels
- [ ] Output sample rate
- [ ] Output bit depth
- [ ] Bit-perfect output toggle?
Video:
- [x] Show which renderer is active and leave future support for multiple renderers
- [x] Fullscreen
- [ ] Screen Resolution
- [ ] Vsync
- [ ] Frame Limiter
- [x] Show FPS
Access:
- [x] Game Browser
- [ ] Title Screen
- [x] Menu Scene
- [x] OpenVideoOption event command
- [x] Add a key to open the settings menu
Persistence:
- [x] Load settings to user config file
- [ ] Save settings
Others:
- [ ] Refresh UI if video options changed by key press
- [x] Show title screen in background
FYI, there is a setting menu in the yumebooru's multiplayer mode which already include some features (i.e. SFX Volume). https://github.com/CataractJustice/ynoclient/blob/master/src/game_multiplayer_settings_scene.cpp
Jenkins: Test this please <3
So far so good :+1: . In games without title scene, is it showing the default pixel background color? What about games skipping title scene?
Fullscreen does not toggle on Emscripten yet, likely expected (disabling it on emscripten for now might be worth).
Regarding the checklist, output channels is relative to single sample output channels? (16 unique samples, 4 exclusive same-sample channel, total up to 64) or midi poliphony? (fluidsynth default is 256) or just global output channels meaning mono (1) / stereo (2) / surround (n)?.
Additional ideas, for this or for later (config 4 of N), e.g. toggle pause on focus lost and other: Click here: https://github.com/EasyRPG/Player/labels/Settings
Hey guys, silly suggestion:
what about making the look of it like this:
It's a mockup based on the game select window:
I just saw the Yumebooru multiplayer menu and it's closer to in-game menus as in my suggestion.
I actually thought about the opposite: Moving the options from the game browser in a single top row to win more horizontal space for text (game names in the list) 😅.
Aligning values to the right as in Yumebooru modification keeps the content cleaner and more readable for both keys and values. The selectable line cursor helps reading the key-value association when the separation is significant.
I decided to not implement most of the planned functionality by fmatthew because this is too much work to do.
My remaining todo list:
- [x] Proper storage location for all the stuff (emscripten needs a new mount here to ensure it is remembered on the entire domain)
- [x] Numeric inputs should use the number input window
- [x] Frame limiter support
- [x] Vsync ON/OFF (Restart required)
- [x] Audio: Global BGM & SE Volume
- [x] Input: Swapping Primary & Secondary Analog Stick (for Lefties)
- [x] Input: Swapping AX with BY without remapping manually (for Nintendo fans)
- [x] Configuration option where the config scene access appears, e.g. Menu and Title screen
- [x] Input: Reset feature (button combination) for input when it is messed up
Test implementations of features on the devices:
- [x] SDL2
- [x] SDL1
- [x] Android (SDL2 but yeah...)
- [x] emscripten (SDL2 but special ;))
- [x] Wii (SDL)
- [x] 3DS
- [x] PSVita
- [x] Switch
Regarding the Video Options: In Windowed Mode it would be great if you could choose between all integer scalings (x1,x2,x3,x4,x5...) up to the biggest possible that fits inside the display resolution. In Fullscreen it might be enough to give the option between the biggest possible integer scaling and one that fills the (vertical) screen space completely even if that means uneven/blurred pixels. The icing on the cake would be an option for shader effects like CRT/LCD ones. But might be out of scope.
@Ghabry How to modify global audio volume?
Ghabry How to modify global audio volume?
There does not seems to have currently a global audio volume, just BGM or SFX, so you have to manually edit both. Seems to be planned though.
This is a WIP to add a settings menu. Early feedback is welcome on the general layout and feature set this should have.
Was thinking, maybe adding an option to choose a translation for Easy RPG Menu and settings + translation to load if it exist for a game could be added to the menu ? (and if this is something that can't be edited while in-game exceptions for options could be added)
@Mimigris I saw when playing bgm there is a volume parameter, but how can I modify its volume when the bgm is playing?
@Mimigris I saw when playing bgm there is a volume parameter, but how can I modify its volume when the bgm is playing?
Not sure if you are really talking here about the setting implementation planned for Easy RPG Player or just talking in terms of coding for a RPG Maker game, so: Easy RPG Player: Not currently available directly as a build, but this should be available in the settings menu of the Player. Coding in RPG Maker: You have to manually edit each song that play to edit the volume.
If all you want is making your game being less loud when playing you can still change the volume setting of the app in the Volume Mixer of your OS I guess.
Well, imo this is "feature complete" now on Linux if you want to test.
Have to unbreak the build now for the other platforms and provide a config directory everywhere.
Well and the code needs cleanup & documentation at some parts :)
Suggested input UI by Jetrotal:
That suggestions requires always having a system2 hand-icon png.
Maybe the grayed out up
text could be default input: keyboard up
?
About naming the options, i would call them:
Controls
for the button mapping screen
Command
for what is the action perfomed when a button is pressed (decision, cancel, up, etc)
input
for the button (keyboard enter, joystick 05, touch button 01, etc)
I'd also suggest limitting the inputs quantity or testing single page per command,
for cases when the inputs are all huge text chunks like the JOY_STICK_PRIMARY_UP
Not as colorful as the suggested one but at least fits on one screen ;)
Also pretty close to finishing this (finally!). Only missing is adopting certain homebrew port features to the config scene (stretch, touch ui).
Was just thinking, maybe an action to reset all the keys mapped outside of the menu could be added (like an action triggered by holding several keys)? Just made an attempt by editing very dumbly my configuration on purpose and without manually resetting the game you might end up with a useless configuration.
Just found an issue while testing this too: Opening the settings menu (F1/assigned key - Open Video Options command) while the screen should be hidden will make the screen be shown to the player once said menu has been closed, while this should not be the case. Seems to be a leftover from opening the default menu.
@aleck099
In this PR is a new API on the Audio interface BGM_SetGlobalVolume
. This writes in the configuration so it is preserved across sessions.
Right now there is no supported way to do it.
(Not commited yet)
Added a backlight control setting for the 3DS. Yes. There is already one on the touchscreen. They are kept in sync and are saved in the configuration file.
Not tested yet as citra does not emulate this (???).
Custom names for the keys are now implemented:
@Mimigris
Thanks. Screen fade-in is resolved. Missed that edge-case :)
Added the emergency reset sequence (I wanted this option anyway. As I want to prevent the typical RetroArch situation where the Ui becomes unusable due to a button mapping error). It is activated by holding 4 arbitrary keys at once. Is displayed in the input remapping as a hint.
There are still ways to make the Player uncontrollable (by leaving the settings while the input is broken) but this is already close to idiotic user error and you can fix it by (somehow) reentering the settings and doing the reset sequence.
Jenkins: Test this please
First test results:
- ~~if you swap [AB], it'll swap them then quit the menu (probably because it then consider the "new" input right after), not a major thing but a funny quirk~~
- ~~The window size is not preserved right now (maybe add this?)~~ SDL2 only
- ~~vsync not saved (?)~~ Likely system issue
- ~~If you put garbage on config.ini none of the keys works~~
- ~~submenu for key mapping should be a good idea: game, developer/test, other~~
- ~~mouse scroll cannot be mapped~~ Postboned Problem with how mouse & touch are handled
Suggested by @jetrotal . This was simple to add
@Ghabry That's great
Getting close. Just few bug fixes and platform tests missing.
Redesigned the Game Browser to ensure all menu items fit. You will get used to it.
New settings category "Engine" that contains a few entries that fit nowhere else:
Except for checking some ports this is now feature complete and ready for review. :tada: This took over a year to finish with multiple long breaks because this was so frustrating to program.
Sorry for so many LoC changes and 50+ commits. There was no existing code in the Player to handle persistent configurations so everything had to be written from scratch.
At least further additions of config options will be much less code...
There are so many things that could still be added. Almost all the ideas about audio config are missing and game specific configurations wasn't even started.
Had to retest Vita and Switch to solve some final bugs.
Only pending tests are Android and a retest on Windows
Only pending tests are Android and a retest on Windows
The only issue I've found on my side while re-testing the latest version on my Windows is that the cursor while in the Settings menu part where you can remap your keys "Input -> Key/Button mapping" and then Game / Engine / Developer is not properly tracked like the other menus (If your cursor is on the 22th item in the Engine part, when opening the Developer part your cursor will also be on the 22th slot although it is not possible normally).
Also finished Android now.
@Mimigris your reported bug should be resolved
I'm done with this. Please test and review.
As this is a large PR: 2 weeks