It is currently November 28th, 2022, 2:19 pm

Game mode revisited

Changes made during the Rainmeter 4.4 beta cycle.
rick-t-fiedrain
Posts: 26
Joined: February 15th, 2014, 9:53 am

Re: Game mode revisited

Post by rick-t-fiedrain »

Is there a reason that I'm getting an

>> Initializing "Game Mode" (v1)

message in About Rainmeter (Debug Mode) when I've done nothing to engage game mode (at least that I'm aware of)? I did not see any references to this kind of thing when I skimmed through the docs / posts about game mode.

Here is the view from "About Rainmeter"
game mode initialized.png
And this is what my game mode tab looks like in the Rainmeter Manager.
game mode tab.png
The google news skin and a personal refresh of 'the professional' (created before game mode was born) are the only two items running.

It's probably something I've done .. but don't realize it. Any help appreciated.

RICK
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 4817
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Game mode revisited

Post by Yincognito »

rick-t-fiedrain wrote: May 19th, 2021, 6:12 pmIt's probably something I've done .. but don't realize it.
I don't think it's anything you've done. My guess is that it's a normal Debug Mode log message, pretty much like the messages detecting system configuration details. I'm getting this too when I check Debug Mode in Rainmeter's Settings, and I'm pretty sure nothing is "wrong" or anything like that.

Unchecking Debug Mode in Settings will probably prevent this log message from showing up. There is also a C:\Users\[User]\AppData\Roaming\Rainmeter\Rainmeter.data file on the hard drive that's most likely related to the Game Mode operations (you can see similar messages there if you open it with Notepad and such).

The developers would be able to offer more details on the matter, but I don't think they'll be too concerned about it, since the message, apart from the slightly different format compared to others, seems to be both normal and harmless.
User avatar
Brian
Developer
Posts: 2535
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Game mode revisited

Post by Brian »

rick-t-fiedrain wrote: May 19th, 2021, 6:12 pm Is there a reason that I'm getting an
Yincognito is correct, this is just an a simple debug "informational" type of message letting the user know that game mode is available and which settings version it is using (in case we change things down the road).

There is nothing to worry about.

Also, when game mode is started/stopped, you will see a regular "Notice" message in the log.

-Brian

BTW - There is a typo in the word "Initializing" that will be fixed in the next beta.
jberth
Posts: 3
Joined: February 28th, 2022, 10:34 pm

Re: Game mode revisited

Post by jberth »

Have you given any thought to adding a dynamic boolean variable for "Game mode enabled"?

As a concrete example for where this could be useful, I have a skin with a default refresh interval set in a variable (i.e. 100ms). When I'm in game mode, I would like to increase the refresh interval (i.e. 2000ms) in order to decrease my resource usage. But I don't want to unload the skin completely.
User avatar
Yincognito
Rainmeter Sage
Posts: 4817
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Game mode revisited

Post by Yincognito »

jberth wrote: February 28th, 2022, 11:15 pm Have you given any thought to adding a dynamic boolean variable for "Game mode enabled"?

As a concrete example for where this could be useful, I have a skin with a default refresh interval set in a variable (i.e. 100ms). When I'm in game mode, I would like to increase the refresh interval (i.e. 2000ms) in order to decrease my resource usage. But I don't want to unload the skin completely.
I guess you meant "default update interval", right? Cause there's no default "refresh" rate, as far as I know.

Anyway, you don't have to unload skins (or any skin, for that matter) completely during the time when Game Mode is active. You can load a previously saved Layout with a variant of your skin set to update at 2000 ms (this will unload the 100 ms variant and load the 2000 ms variant, of course, but the variant that you update at 2000 ms will stay loaded afterwards during Game Mode). Similarly, you can set to load back the Layout where your skin updates at 100 ms on stopping Game Mode, assuming you saved that layout as well previously. A Layout can be loaded from your skin as well, but naturally doing this way won't be "automatic" as above, but manual, and you won't be able to detect when the Game Mode triggers (unless you enable Debug Mode and Log To File and try to parse the local log file yourself to look for clues about it there, if there are any).
jberth
Posts: 3
Joined: February 28th, 2022, 10:34 pm

Re: Game mode revisited

Post by jberth »

Yincognito wrote: February 28th, 2022, 11:59 pm I guess you meant "default update interval", right? Cause there's no default "refresh" rate, as far as I know.

Anyway, you don't have to unload skins (or any skin, for that matter) completely during the time when Game Mode is active. You can load a previously saved Layout with a variant of your skin set to update at 2000 ms (this will unload the 100 ms variant and load the 2000 ms variant, of course, but the variant that you update at 2000 ms will stay loaded afterwards during Game Mode). Similarly, you can set to load back the Layout where your skin updates at 100 ms on stopping Game Mode, assuming you saved that layout as well previously. A Layout can be loaded from your skin as well, but naturally doing this way won't be "automatic" as above, but manual, and you won't be able to detect when the Game Mode triggers (unless you enable Debug Mode and Log To File and try to parse the local log file yourself to look for clues about it there, if there are any).
Yeah sorry, I meant "update" and not "refresh". Had my terminology mixed up.

I'm aware that you can set a different layout on starting/stopping game mode, but this zeroes out all of the meters and loses all of the historical data (i.e. for Line Meters), which is why I was searching for a way to accomplish this without unloading/reloading any skins.
User avatar
Yincognito
Rainmeter Sage
Posts: 4817
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Game mode revisited

Post by Yincognito »

jberth wrote: March 1st, 2022, 2:25 pm Yeah sorry, I meant "update" and not "refresh". Had my terminology mixed up.

I'm aware that you can set a different layout on starting/stopping game mode, but this zeroes out all of the meters and loses all of the historical data (i.e. for Line Meters), which is why I was searching for a way to accomplish this without unloading/reloading any skins.
Yep, I know. :confused: I partly share your point of view, though for a different reason, because I have a skin that for a second or two when loading intensively uses the CPU to get and manage multiple feeds from multiple sources, and that higher CPU usage is not exactly recommended right after a game already worked out the processor for a while. This wouldn't happen if the said skin wasn't unloaded and then loaded again via Game Mode. Of course, it's not so much a concern to be honest with my current CPU, but the concern exists nevertheless.

Like I said, you COULD achieve what you want IF there was an option to do NOTHING when starting and stopping Game Mode (without having to disable Game Mode entirely), but you'll have to:
- set Game Mode to do the assumed "nothing" instead of unloading all skins or loading a layout
- set Rainmeter to Log to file (this can be done from the skin as well, by !WriteKeyValue to C:\Users\[User]\AppData\Roaming\Rainmeter\Rainmeter.ini though a Rainmeter restart is required for it to get into effect):
Logging.jpg
- use WebParser to parse the local file C:\Users\[User]\AppData\Roaming\Rainmeter\Rainmeter.log and check for the lines marked above to do stuff like dynamically changing the update dividers in your skin to the desired values (this could also be achieved via a little plugin similar to ConfigActive, but which would detect whether Game Mode is active or not in a measure, probably also by using reading files from Lua)

Of course, for that, such a "Do Nothing" option for Game Mode would have to exist in the Rainmeter Settings. Personally, I support the idea, since it should be trivial to implement, give even more control to the user as the developers pointed out, and wouldn't involve allowing abuse by adding bangs or command line options to set Game Mode - just the ability to "get" its current value and act accordingly.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 14744
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Game mode revisited

Post by balala »

jberth wrote: February 28th, 2022, 11:15 pm As a concrete example for where this could be useful, I have a skin with a default refresh interval set in a variable (i.e. 100ms). When I'm in game mode, I would like to increase the refresh interval (i.e. 2000ms) in order to decrease my resource usage. But I don't want to unload the skin completely.
Note that you can modify the UpdateDivider option of some or all measures and / or meters, but unfortunately you can't dynamically modify the Update value of the [Rainmeter] section. In fact none option of [Rainmeter] section can't be dynamically altered while the skin is running (well, excepting the ContextTitle and ContextAction option, which indeed are dynamic).
User avatar
Yincognito
Rainmeter Sage
Posts: 4817
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Game mode revisited

Post by Yincognito »

jberth wrote: March 1st, 2022, 2:25 pmI'm aware that you can set a different layout on starting/stopping game mode, but this zeroes out all of the meters and loses all of the historical data (i.e. for Line Meters), which is why I was searching for a way to accomplish this without unloading/reloading any skins.
One other thing: if you just want to monitor things like CPU, GPU, RAM, FPS and all that while within a game, you can do that via Riva Tuner Statistics Server (similar to Fraps), which is included in MSI Afterburner (not sure if in HWiNFO as well at the moment):
GameSkin.jpg
I use this way for years to have "skin-like" monitoring in both the desktop mode (via Rainmeter and my skins) and in D3D applications (via MSI AB + RTSS). You can format the displayed data for the latter (not as extensively as with Rainmeter, but still), and MSI AB has a plugin for Rainmeter as well (which I also use to detect CPU and GPU temperatures and all that). Again, not sure about the HWiNFO, I remember at one time reading that they added RTSS to their "extended" download, but I don't know if they still have that option now.
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4879
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Game mode revisited

Post by eclectic-tech »

jberth wrote: March 1st, 2022, 2:25 pm Yeah sorry, I meant "update" and not "refresh". Had my terminology mixed up.

I'm aware that you can set a different layout on starting/stopping game mode, but this zeroes out all of the meters and loses all of the historical data (i.e. for Line Meters), which is why I was searching for a way to accomplish this without unloading/reloading any skins.
As mentioned by balala, you can control the UpdateDivider in your skin's meters and measures.

You cannot modify the update rate in the [Rainmeter] section dynamically; whatever is initially set as, is what the skin will use unless refreshed, which you want to avoid.

One method would require editing all of your skin's measures and meters:
Create a new skin variable: Rate=1

Then add the lines: UpdateDivider=#Rate# and DynamicVariables=1 in each measure and meter.

By changing the value of the #Rate# variable, you essentially set UpdateDivider=1 for normal use on all measures and meters, or set UpdateDivider=-1 to stop all updates while retaining all of the historical data.

You could manually change the skin update with a Bang:
LeftMouseUpAction=[!SetVariable Rate "-1"][!UpdateMeasure *][!UpdateMeter *][!Redraw]
to pause the skin updates, then
LeftMouseUpAction=[!SetVariable Rate "1"][!UpdateMeasure *][!UpdateMeter *][!Redraw]
to resume normal updates.

Or use the procedure Yincognito suggested to detect game mode and set the 'Rate' variable in your skin based on that, using the same bangs only directing them to your skin config name.

Here is a simplified code showing the pause and proceed effects of changing a 'Rate' variable on measures and meters.

Code: Select all

; ========= Variables ==========
[Variables]
Rate=1

; ========= Skin Settings ==========
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
Group=#RootConfig#


; ========= Measures ==========
[MeasureCalc]
Measure=Calc
Formula=MeasureCalc+1
UpdateDivider=#Rate#
DynamicVariables=1

[MeasureCPU]
Measure=CPU
UpdateDivider=#Rate#
DynamicVariables=1

; ========= Meter Styles ==========



; ========= Meters ==========
[MeterCalcCPU]
Meter=String
MeasureName=MeasureCalc
MeasureName2=MeasureCPU
FontSize=20
FontColor=255,255,255
SolidColor=0,0,0,1
Text=%1 CPU:%2

[MeterPause]
Meter=String
Y=R
FontSize=20
FontColor=255,255,255
SolidColor=0,0,0,1
Text=Pause
LeftMouseUpAction=[!SetVariable Rate "-1"][!UpdateMeasure *][!UpdateMeter *][!Redraw]

[MeterProceed]
Meter=String
Y=R
FontSize=20
FontColor=255,255,255
SolidColor=0,0,0,1
Text=Proceed
LeftMouseUpAction=[!SetVariable Rate "1"][!UpdateMeasure *][!UpdateMeter *][!Redraw]
pause.gif
You do not have the required permissions to view the files attached to this post.