Help regarding multi window game in Cocos Creator!

Help regarding multi window game in Cocos Creator!
0

I aim to create this pattern of game play with one main Lobby Scene and other GameScene opening through window.open.

But even when i try this with empty hello world project to open multiple window, I get restricted due to high drop in FPS.

So basically I need to know is this setup possible in cocos creator , that can even four windows render simultaneously without FPS taking a hit.
Any guidelines if any can be provided to help achieve this will be appreciated.

The game in reference pic i think is made via angular ,maybe thats why it is so smooth even after ten windows.

@slackmoehrle Help me out man.

Yeah, totally. @jare can you take a look at this?

Sorry, I have no idea. We will release Creator 2.0 in June, please try it.

I would have each window be a different app, and have them all communicate to a central server, through whatever method. You can link things together via user account.

@Kiori
Yeah, thats basically the idea.
Anyhow , this problem is boiling down to the CPU Usage of OS.
in i3 opening 4 windows in quarter screen size makes almost 90+% cpu usage.
And in i5 , the situation is better.

ie, the problem is not concerned with multiple windows opening from a single window rather
the problem generally is displaying multiple instances of cocos game simultaneously,(whether same game or different, doesnt matter.)

The only thing I have tried with success till now regarding this is to limit the size of the window so FPS takes small drop in all windows.

@jare Does this reasoning throws some light in my issue?

1 Like

@shishir451 how did you create more windows? Could you please show some codes?

@zhangxm
Earlier I was using windows.open with url of gameplay build.

But now like I said what I ve boiled it down to

the problem is displaying multiple instances of cocos game simultaneously,(whether same game or different, doesnt matter.)

ie, opening any build multiple times in multiple browser windows.

@zhangxm

Check this also,
https://discuss.cocos2d-x.org/t/low-fps-in-case-of-multiple-windows-originated-from-window-open/41731/19

@shishir451

Hi, just to try and understand this more, you are opening a new url, that has a different html+cocos game instance correct? Did you use ‘toolbar=0,location=0,menubar=0’?

I did some tests here locally, loading some phaser 2 examples, from their site, opening them in 4 different windows, nothing special, just to see what that was like. And frankly the results are similar, like 90->70% on i3.

I’m thinking each browser instance will simply each too much cpu and ram, and that’s that.
If I open regular web pages on them it’s a different story though, so that leaves room for thought.

If the example you shared works(the pictures), my guess is they have a very basic update cycle, minimizing what is done per ticks, maybe the engine uses pure canvas(no webgl)?, maybe who knows…
For instance, lets say the game is always waiting for the server, and instructions per say will only come from the server. Maybe that is a way to reduce what is being done in each instance, you’ll have to try different things.

If nothing works you can try other engines, maybe it is a performance issue with cocos, but I would also consider a redesign, maybe building an interface that doesn’t require multiple windows and gives the same benefits.

I’ll be keeping an eye on this post, I’m curious on how this turns out.
Good luck!

@shishir451 it seems you opened multiple windows in browser, so it is an html5 game? I thought it is a native game, so i have not idea about it. Sorry about it.

I have no idea too. Sorry.

@zhangxm Hi, do you have any multiple-window solution for native Win&Mac games? I’m very interested in it. Can you give me some guild lines?
I’ve done some search, like:


Do you think this will work?

Hello Everyone,

Any update on it or any possible solution which we can try? Also is there any way to make a canvas build instead of webgl from Cocos Creator, might be it will not decrease a fps.

I haven’t seen anyone doing this. @jare is in national holiday. Perhaps he can take a look when he returns.

hey
any update?

We don’t support canvas build since v2.0.0. Sorry.

Ok. Can we do multi window which @shishir451 asked.