How do I Run The Game When Browser Is Out Of Focus?

Get help using Construct 2

Post » Mon Aug 21, 2017 6:13 pm

hello guys. I went through answers in previous forms but didn't seem to get a grip. i tried Rex Rainbows Time Away L plugin but didnt know how to make it work. Can someone give me a detailed solution for this with/without Time Away plugin to solve this . Thanks, much appreciated. :( :( :o :)
B
5
S
1
Posts: 17
Reputation: 361

Post » Tue Aug 22, 2017 4:07 am

If I got it right... you want the game not to pause when you aren't with the browser focused.

Just go to your project properties, and set Configuration Settings >> Pause on Unfocus to false.
Howdy, I'm HenryPK! I love helping people and making games... Hope we can be friends. (Also check my game: Blue)
B
10
S
2
G
1
Posts: 60
Reputation: 1,233

Post » Tue Aug 22, 2017 11:17 am

HenryPK wrote:If I got it right... you want the game not to pause when you aren't with the browser focused.

Just go to your project properties, and set Configuration Settings >> Pause on Unfocus to false.


i think that option is only available for the preview
B
5
S
1
Posts: 17
Reputation: 361

Post » Tue Aug 22, 2017 1:16 pm

No. I already tested it, and the game continues to "work" on Scirra Arcade as well.
The problem is that you can't move or give any inputs and have that text.

However, I don't think we can remove that black screen and "Click here to refocus game" text because this is a Scirra Arcade thing, so you can "leave" the game and do other things, and then go back to the game. :/

(But if you want the game not to lose focus, you can use a Javascript event or a Browser >> request focus in an Every Tick loop)
Howdy, I'm HenryPK! I love helping people and making games... Hope we can be friends. (Also check my game: Blue)
B
10
S
2
G
1
Posts: 60
Reputation: 1,233

Post » Tue Aug 22, 2017 4:07 pm

Oh I think I forgot to mention that there are numbers. Inside the game and those numbers decrease steadily . I wanted decreasing to continue even when out of focus .does that configuration setting change enable me to do this too ?
B
5
S
1
Posts: 17
Reputation: 361

Post » Tue Aug 22, 2017 6:48 pm

Oh! I got what you mean...

Unfortunately, this is a function of the browser/system itself, that freezes the game when you switch tabs or go to home menu (in mobile). To save battery and memory.

You can kinda use "wallclocktime" to calculate how much the game was left backgrounded, anyways.
Howdy, I'm HenryPK! I love helping people and making games... Hope we can be friends. (Also check my game: Blue)
B
10
S
2
G
1
Posts: 60
Reputation: 1,233

Post » Tue Aug 22, 2017 7:31 pm

By Calculating the time , the browser was suspened , so for each second it was suspened the points can be added is the most efficient way i assume. I have tried out all combinations for that but it doesnt seem to work. can you help me out with it ? Thanks .
B
5
S
1
Posts: 17
Reputation: 361

Post » Tue Aug 22, 2017 7:34 pm

sublimate wrote:Oh I think I forgot to mention that there are numbers. Inside the game and those numbers decrease steadily . I wanted decreasing to continue even when out of focus .does that configuration setting change enable me to do this too ?


Oh btw i checked out your game blue, looks amazing, loved the many elements in it and the arcade style music brought back memories ^.^
B
5
S
1
Posts: 17
Reputation: 361

Post » Wed Aug 23, 2017 9:15 am

" Oh, you did? That's awesome because that's the idea ;( ! With my age, I didn't get this era of arcade games :( but making people remember this good time is cool XD. "

Now, I remembered that some games, because of this, used storage of estimated real-world end date only. For example:

I have a gate that will open in 2 minutes. I just store the hour/date the gate will open, and show on screen the countdown in something like that:

Every Tick >>
Timer set text to: FinalTime - CurrentTime

Well, its what all the mobile games use.
Howdy, I'm HenryPK! I love helping people and making games... Hope we can be friends. (Also check my game: Blue)
B
10
S
2
G
1
Posts: 60
Reputation: 1,233

Post » Wed Sep 06, 2017 5:55 pm

HenryPK wrote:" Oh, you did? That's awesome because that's the idea ;( ! With my age, I didn't get this era of arcade games :( but making people remember this good time is cool XD. "

Now, I remembered that some games, because of this, used storage of estimated real-world end date only. For example:

I have a gate that will open in 2 minutes. I just store the hour/date the gate will open, and show on screen the countdown in something like that:

Every Tick >>
Timer set text to: FinalTime - CurrentTime

Well, its what all the mobile games use.


henry my man , i am not able to reply to your messages due to me not having 500 reps to send PM. if you got a facebook profile or anything , ill add you there. much love.
B
5
S
1
Posts: 17
Reputation: 361

Next

Return to How do I....?

Who is online

Users browsing this forum: warmty and 19 guests