How do I give the APP keep running @ background?

Get help using Construct 2

Post » Tue Apr 29, 2014 10:27 pm

Hello!~
may i ask how can i keep my app running @ background?
(player keep moving when Websocket.io)
1:nodewebkit
2:[email protected]
3:ios browser

Thankyou :mrgreen:
B
17
S
7
Posts: 360
Reputation: 2,202

Post » Wed Apr 30, 2014 12:04 am

You can't. Browsers and Ashley have disabled JS execution when the game doesn't have focus. I totally agree though. I would prefer to set any of my network games to be still running even in the background.
B
92
S
18
G
9
Posts: 2,455
Reputation: 15,113

Post » Wed Apr 30, 2014 6:20 am

jayderyu wrote:You can't. Browsers and Ashley have disabled JS execution when the game doesn't have focus. I totally agree though. I would prefer to set any of my network games to be still running even in the background.

OMG...
this is really really suck!!!
can SCIRRA just add a setting for user to enable background running?
without this
i can't done my Online Game :roll:
@Ashley
B
17
S
7
Posts: 360
Reputation: 2,202

Post » Wed Apr 30, 2014 6:50 am

It would waste battery on mobile devices if this was widely used.

The Multiplayer plugin is the exception - it can keep running if you are the game host, since otherwise it would kill the game for everyone connected - but apart from that, it's probably just obnoxious to the user to have a background tab keep consuming CPU and battery power.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071

Post » Wed Apr 30, 2014 7:56 am

Ashley wrote:It would waste battery on mobile devices if this was widely used.

The Multiplayer plugin is the exception - it can keep running if you are the game host, since otherwise it would kill the game for everyone connected - but apart from that, it's probably just obnoxious to the user to have a background tab keep consuming CPU and battery power.

I use my own design java websocket for my big online game
i make it about half years :roll:
I hope I can set background running myself
B
17
S
7
Posts: 360
Reputation: 2,202

Post » Wed Apr 30, 2014 11:06 am

Are you really running a server from a C2 game? Using WebSockets usually means you have a seperate central server. It shouldn't matter if the client hangs when switching tab.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071

Post » Wed Apr 30, 2014 12:44 pm

Ashley wrote:Are you really running a server from a C2 game? Using WebSockets usually means you have a seperate central server. It shouldn't matter if the client hangs when switching tab.

Yes
becoz this is a big online game
C2 game<>websocket.jar<>C2 server
this is my plan
and working very well
player can't cheat
B
17
S
7
Posts: 360
Reputation: 2,202

Post » Wed Apr 30, 2014 1:55 pm

Why not use the Multiplayer plugin?
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071

Post » Thu May 01, 2014 3:30 am

Ashley wrote:Why not use the Multiplayer plugin?

Too late..
B
17
S
7
Posts: 360
Reputation: 2,202


Return to How do I....?

Who is online

Users browsing this forum: LunaticCat and 6 guests