Skip to content

Conversation

@florianessl
Copy link
Member

Periodically take automatic screenshots

screenshot_2

screenshot_3

Timestamps in filenames

This was also requested recently & is pretty easy to implement, so I added this option as well:

screenshot_20250426_140147
If there is a naming conflict (multiple presses of the screenshot key in a single second), file names will still be indexed (starting with "_1.png", rather than "_0.png")
image

@github-actions github-actions bot added Window/Scenes Emscripten WebAssembly/JavaScript port for web browsers Settings All about customizable features, storing and applying them labels Apr 26, 2025
@Ghabry
Copy link
Member

Ghabry commented Apr 26, 2025

This slowly needs a submenu just for screenshots :D

@Ghabry
Copy link
Member

Ghabry commented Apr 29, 2025

Open for discussion: Is that screenshot timestamp setting even needed or should it just become the default and replace the old naming?

@florianessl
Copy link
Member Author

Open for discussion: Is that screenshot timestamp setting even needed or should it just become the default and replace the old naming?

I would be fine with changing it to the new timestamped naming scheme by default.
Though, I'd keep the extra new function "GetScreenshotName" & the added preview display on the bottom anyway, because we might want to extend it later when we want to allow the user to configure the storage path for screenshots. (Maybe for a setting to optionally use either project or folder name as part of the filename)

@jetrotal
Copy link
Contributor

I've seen different examples of people using the screenshot feature ingames, things like a dynamic battle bg based on map screenshots from dynrpg, or the maniacs screenshot command.

I never tooka look at those tho, to see if they allow reusing the screenshot default filename

Copy link
Member

@Ghabry Ghabry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be approved after adressing the nitpicks

auto fmt_sample_name = [](bool is_auto_screenshot) {
auto name = Output::GetScreenshotName(is_auto_screenshot);
if (Player::player_config.screenshot_timestamp.Get()) {
//return name + "[_1].png";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment can be removed

BoolConfigParam lang_select_in_title{ "Show language menu on title screen", "Display language menu item on the title screen", "Player", "LanguageInTitle", true };
BoolConfigParam log_enabled{ "Logging", "Write diagnostic messages into a logfile", "Player", "Logging", true };
RangeConfigParam<int> screenshot_scale { "Screenshot scaling factor", "Scale screenshots by the given factor", "Player", "ScreenshotScale", 1, 1, 24};
BoolConfigParam screenshot_timestamp{ "Screenshot timestamp", "Add the current date and time to the file name", "Player", "ScreenshotTimestamp", false };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets change this to default true as is obviously the better default

auto diff = std::chrono::duration_cast<std::chrono::seconds>(Game_Clock::now() - last_auto_screenshot);
if (diff.count() >= Player::player_config.automatic_screenshots_interval.Get()) {
last_auto_screenshot = Game_Clock::now();
Output::TakeScreenshot(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(just a suggestion, not something you have to add here)

Slightly more useful (for me) would be when this is based on game frames and not by time.

My current workflow to create these comparison videos in the blog post is:

Create a recording via --record-input rec and the record the session in the old and the new player executed via --replay-input rec.

Then I manually sync both recordings in kdenlive.

The recording stuff could be automated via this screenshot feature. (but I guess this will kill the performance when taking 60 screenshots per second, so is maybe a bad idea xD)

@Ghabry Ghabry added this to the 0.8.2 milestone May 7, 2025
@Ghabry Ghabry force-pushed the features/AutoScreenshots branch from b75ff8a to a6cf6ee Compare May 13, 2025 17:00
@Ghabry Ghabry merged commit b5c3413 into EasyRPG:master May 20, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Emscripten WebAssembly/JavaScript port for web browsers Settings All about customizable features, storing and applying them Window/Scenes

Development

Successfully merging this pull request may close these issues.

3 participants