Performance Question in CocoonJS

Discussion and feedback on Construct 2

Post » Tue Apr 29, 2014 5:55 am

Hi,

I wonder if someone have the same issues with cocooonJS, let me explain:

I have a game that runs fine in my tablet (nexus 7 old version) in the menus, then i begin to play and the first 5-15 seconds the fps are low, like 10-20. After that, the game runs fine, 50-60fps and then if i don't close the game i haven't more slowdowns, but that first seconds of gameplay are horrendous.

Someone know if there is a solution? Like make a loading screen showing all diferent enemies/sprites in a hidden layer (so memory can load all before play) or something?
B
32
S
7
G
2
Posts: 164
Reputation: 3,774

Post » Tue Apr 29, 2014 8:32 am

Just delay game start or logic for 5s .. show a "Stage 1" text then fade it out. Then game starts and players can move/do stuff etc.

You can do this with a global variable, GameStart = 0, then On Start of Layout => Wait 5s, Set GameStart = 1 etc. Your player commands require GameStart = 1 to trigger.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Tue Apr 29, 2014 1:05 pm

Yup i do something similar, i also put in a fake loading screen when moving from layout to layout.
B
17
S
5
Posts: 144
Reputation: 1,591

Post » Tue Apr 29, 2014 1:11 pm

But i should show (behind the fake loading screen) all the objects or it's not necessary? I thought the problem is that the game is loading the resources in memory so when it finishes, the game runs fine, is this the problem?
B
32
S
7
G
2
Posts: 164
Reputation: 3,774

Post » Tue Apr 29, 2014 4:33 pm

@russpuppy have you faced something like it? your game runs fine, and i'm wondering if you done something different.
B
12
S
3
G
1
Posts: 188
Reputation: 1,377

Post » Tue Apr 29, 2014 4:57 pm

@vitorfgd are you talking about Run from Zombies? I don't think I am really doing anything different--that game is pretty lightweight and doesn't have a lot going on as far as graphics and sound to load. I have noticed what you are talking about though more in some of my other games.
B
64
S
12
G
6
Posts: 456
Reputation: 9,015

Post » Tue Apr 29, 2014 5:14 pm

@russpuppy, interesting, i don't know what might be happening with some games though, but your game runs really clean. I've tryed a bunch of games made in construct in play store and there wasn't any which didn't glitched or something like that.

At least on my phone device.
B
12
S
3
G
1
Posts: 188
Reputation: 1,377

Post » Tue Apr 29, 2014 5:23 pm

@vitorfgd a lot of it is trial and error, i do try to keep down on memory issues. Also my phone is a few years old (htc evo) which I think is good because it means if it works on my phone it will work for most other people's devices
B
64
S
12
G
6
Posts: 456
Reputation: 9,015

Post » Wed Apr 30, 2014 8:22 am

@russpuppy Can you explain on what you mean by memory issues and how you tackle them.

@ByR Keep your layout as it always was, just add a fake loading screen (to be topmost in the Z order). Destroy it after a wait event , you can set the 'wait event' time by testing how long it takes for your game's fps to normalize. I don't know why the fps instability happens at the start tho.
B
17
S
5
Posts: 144
Reputation: 1,591

Post » Wed Apr 30, 2014 12:35 pm

vitorfgd wrote:@russpuppy, interesting, i don't know what might be happening with some games though, but your game runs really clean. I've tryed a bunch of games made in construct in play store and there wasn't any which didn't glitched or something like that.

At least on my phone device.


What's your device?

My C2 games on Android run really smooth on a phone from 2010.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Next

Return to Construct 2 General

Who is online

Users browsing this forum: sydtes and 1 guest