Game working in background

Get help using Construct 2

Post » Sun Sep 15, 2013 11:33 pm

Hello - I tried to find topic about that but I could not ^^

How can you make game work in background? By that I mean when the user is using another tab in browser, the game would not pause etc.

I have some ideas that would utilize leaving the game on for some time ^^.
The creator of Gurgosus card universe!
Visit Gurgosus.eu for more info.
B
18
S
2
G
2
Posts: 49
Reputation: 1,989

Post » Tue Sep 17, 2013 8:35 am

Within project settings there is a "pause on unfocus" this is set to yes/true as a default. If you change this it should run in the background
B
10
S
2
G
1
Posts: 77
Reputation: 1,278

Post » Tue Sep 17, 2013 10:41 am

That only applies to preview. As far as I know there is no way to do this with an exported project.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Wed Sep 25, 2013 8:02 pm

Too bad, it could be very limiting... Is there a way around it with streams? For example, I want the counter to add 1 to "points" every 1 second the page is open. then, when the user reopens the tab, the "points" will be updated :3. The counter will work outside Construct 2, and send int value to it.
The creator of Gurgosus card universe!
Visit Gurgosus.eu for more info.
B
18
S
2
G
2
Posts: 49
Reputation: 1,989

Post » Wed Sep 25, 2013 10:03 pm

You could use something like rexrainbow's System Time Plugin - calculate the elapsed time between visits compared to a timestamp that's constantly ticking away. If the timestamp and the system time are different, you know some time has passed.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606


Return to How do I....?

Who is online

Users browsing this forum: dop2000, gonzdevour and 38 guests