How do I stop android screen from dimming during gameplay

Get help using Construct 2

Post » Mon Jan 30, 2017 8:33 pm

I tried using cranberrygame's power management plugin using something like:

Ball - is on screen > CordovaPowerManagement - Acquire

Ball - is NOT on screen > CordovaPowerManagement - Release

But the screen still dims.

Anyone know how to stop the screen from dimming during gameplay when there is no touch involved during gameplay?
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

Post » Mon Jan 30, 2017 8:58 pm

Does the browser > focus action work? And let it go off now and then so if doesn't dim the screen.

Never had that problem before as my mobile games always require touch inputs but I guess you are using gyro or something as controls?
B
58
S
25
G
14
Posts: 784
Reputation: 13,284

Post » Mon Jan 30, 2017 9:12 pm

Anonnymitet wrote:Does the browser > focus action work? And let it go off now and then so if doesn't dim the screen.

Never had that problem before as my mobile games always require touch inputs but I guess you are using gyro or something as controls?


Yeah, there's no touch during gameplay, only need tilt.

I am using @cranberrygame plugin. It only has acquire an release. Not working.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

Post » Mon Jan 30, 2017 9:19 pm

I would just include an is in touch condition to the game.
If you set it to set timescale to zero when not in touch you have an effective pause feature.
Image ImageImage
B
172
S
50
G
182
Posts: 8,432
Reputation: 115,083

Post » Mon Jan 30, 2017 9:26 pm

newt wrote:I would just include an is in touch condition to the game.
If you set it to set timescale to zero when not in touch you have an effective pause feature.


Thanks for the reply, but how do i add an "is in touch" if the user does not have to touch the screen during gameplay?

Not including the Menu, Options and Store, and only during the actual playing of the game, the user only has to roll a ball around the screen. Sometimes it last a few seconds, sometimes minutes.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

Post » Mon Jan 30, 2017 9:34 pm

jeffige wrote:
Anonnymitet wrote:Does the browser > focus action work? And let it go off now and then so if doesn't dim the screen.

Never had that problem before as my mobile games always require touch inputs but I guess you are using gyro or something as controls?


Yeah, there's no touch during gameplay, only need tilt.

I am using @cranberrygame plugin. It only has acquire an release. Not working.


I see, but try adding the browser plugin as well and try the focus action. No need changing anything else just use it for the focus action.
B
58
S
25
G
14
Posts: 784
Reputation: 13,284

Post » Mon Jan 30, 2017 9:42 pm

Anonnymitet wrote:
jeffige wrote:
Anonnymitet wrote:Does the browser > focus action work? And let it go off now and then so if doesn't dim the screen.

Never had that problem before as my mobile games always require touch inputs but I guess you are using gyro or something as controls?


Yeah, there's no touch during gameplay, only need tilt.

I am using @cranberrygame plugin. It only has acquire an release. Not working.


I see, but try adding the browser plugin as well and try the focus action. No need changing anything else just use it for the focus action.



Okay. i'll try that and update soon.

Thanks for the replies.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

Post » Mon Jan 30, 2017 9:48 pm

jeffige wrote:
newt wrote:I would just include an is in touch condition to the game.
If you set it to set timescale to zero when not in touch you have an effective pause feature.


Thanks for the reply, but how do i add an "is in touch" if the user does not have to touch the screen during gameplay?

Not including the Menu, Options and Store, and only during the actual playing of the game, the user only has to roll a ball around the screen. Sometimes it last a few seconds, sometimes minutes.


Im imagining in landscape mode the user placing both thumbs on the bottom corners of the screen.
Like a pinch.
Image ImageImage
B
172
S
50
G
182
Posts: 8,432
Reputation: 115,083


Return to How do I....?

Who is online

Users browsing this forum: dop2000, max2612 and 9 guests