Detect Mirror Usage

In my measurements, I've found that the mirror app can take up to 11ms of time on a per-frame basis. For many games, its performance may be fine, but for action games (often running at 40+ FPS (50 in my case), with full screen redraws), it isn't usable in my opinion.

To this end, it would be useful to have a programmatic way to detect mirror usage, either to disable it as a developer, or to tweak game behavior to accommodate its poor performance.

cc @marc who touched on this a bit in this thread (Mirror App Garbled Audio and slow fps Error - #3 by marc)

Notably this idea could possibly be extended to such an API.

6 Likes

Good idea. The dev could even just write a warning to pop up on screen, like "Performance may not be ideal when using Mirror."

The dev could even offer two choices, like "(B) Play with full effects anyway," "(A) Play with reduced effects."

The user/streamer/reviewer could then proceed as they wish, and even people watching the recording later would know the situation.

1 Like

I agree on this.

I added a “low graphics” mode in my game especially for Mirror, currently I show a message when FPS is too low, but it’s not ideal.

1 Like

Great idea.

Better still would be to boost performance to compensate. Like a cpu overclock or turning off the screen.

Since the pd is powered from usb, energy use is no objection

2 Likes

Oh I agree, I just felt this would be a helpful stopgap until they can do that work.

Based on my reading of the USB spec and some napkin math, it should be achievable.

Bumping this, cc @dave

1 Like

+1 on this. The game I'm working on now runs at 50 fps on hardware and its performance is very sub-par with Mirror. I'm considering adding a "mirror mode" option to compensate for the reduced frame rate, but even then the game does not shine running under Mirror's limitations.

6 Likes

Hmm, I wonder.
If its possible to have separate screens for both Playdate and the Mirror app.
Kinda like a proto Game Boy Advance to GameCube adapter. However, I doubt its possible to render two screens at once and plus ruins the simplicity of the Mirror app. But yes, Mirror performance is a bit... heavy. I played Boogie Loops from Season 1 and it is, extremely slow on Mirror. Mostly due to particles.

circling back on this, as my release is coming soon, and mirrors performance is quite detrimental to the experience.

is there any way we could get a way to detect mirror usage?

cc @dave @willco @james @sally

one way this could work, would be as an event we can handle in our game loop, I'd really like that approach.

I'd also appreciate this.

We have logged this in our tracker; I agree it would be nice to have.

5 Likes