Optimization, Performance HELP

Get help using Construct 2

Post » Tue Feb 18, 2014 1:03 pm

I think i am about to drop Construct 2 for good. I made this little game these days, and it performs poorly, very very bad. On my desktop of course after i rewritten it 2 times, it works well on 60 frames, 3-5% CPU usage, and 7 mega vram usage.

On the laptop the performance(2ghz dual core, 4gb ram, GE FORCE GT 415m - 1gb video) is horrid 20-30 frames based on browser. Chrome being the worse, which is strange. I tested with 155, 158, 162. Things are getting even worse.

Now if any of the more advanced users, can take a look at the capx, and tell me what i am doing wrong, cause i dont get it, if i cant make a simple game work on the casual, portal gamers PCs, how the hell i am supposed to even dream about html 5 on phones ...

The performance of this engine is horrible for regular PC/laptops. I looked at flash, a complex tower defense works flawlessly on my other 7 years old laptop(2 ghz single core, very bad ATI video card, 2gb ram, xp). Construct barely scores 10 fps there. At the same time i took a look at GMC html 5 examples, and they perform much, much better, almost perfectly.

So now two things(3) are happening:

1) I am not developing c2 games the "proper" way.
2) The engine is horrible, even GMC is doing better on html 5 performance, by a lot.
3) a little of both.

Now, somebody please, prove me wrong, look at the capx, and explain to me, i am sure there is a big possibility that i am doing something wrong.



livedemo: http://lw-games.com/stuff/f4 (press F for FPS, S sound off, M music off, P pause)

Thanks
Last edited by lwgames on Fri Feb 21, 2014 8:07 am, edited 1 time in total.
B
30
S
5
G
1
Posts: 125
Reputation: 3,220

Post » Tue Feb 18, 2014 1:22 pm

Solid 48 frames in Chrome for me - the awkward thing is that I'm running an Alienware laptop, and regardless of value for the money, Alienware doesn't skimp on power; so 48 FPS on effectively Flappy Birds is worrying when it runs Crysis at a steady 35.

I'll have a look at your cap later, though from debugger figures you've posted I can't see how it could get faster
B
59
S
21
G
9
Posts: 641
Reputation: 9,787

Post » Tue Feb 18, 2014 1:26 pm

Thanks, the thing is that sometimes it shows me 50-60 fps, but those moving spikes that come at you, their movement is so sluggish...

Also imagine that most of the people have on board cards, those horrible intel gfx. So if the game doesnt perform good on those, these HTML 5 hispter sh*t is useless, since you loose 70% of the players.lwgames2014-02-18 13:28:37
Image
B
30
S
5
G
1
Posts: 125
Reputation: 3,220

Post » Tue Feb 18, 2014 1:30 pm

Constant 60 FPS here, but my comp is optimized for graphic performance.

I'm sorry but I can't open your capx, because of the plugins in it I'm not going to download just for this purpose.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Feb 18, 2014 1:42 pm

55-60 fps with 5 years old laptop. 2Ghz Dual Core, Geforce G210M.
I can't see specific problems from your capx, but recommand "grouping" your events. It's more easy to control events at once.
B
23
S
8
G
1
Posts: 172
Reputation: 2,780

Post » Tue Feb 18, 2014 1:43 pm

my bad, i removed the plugins, thanks!
Image
B
30
S
5
G
1
Posts: 125
Reputation: 3,220

Post » Tue Feb 18, 2014 1:44 pm

Do the dirt spikes that come at you have a sluggish movement?

Thanks
Image
B
30
S
5
G
1
Posts: 125
Reputation: 3,220

Post » Tue Feb 18, 2014 2:52 pm

The performances are good for me, but I'll look at your capx

@lwgames
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Tue Feb 18, 2014 3:04 pm

@lwgames
Only thing I saw in your capx was some collision check unnecessary (you check for collisions during the menu for instance), lots of code being evaluated every tick where a function/behavior would be better (for the background scrolling, use a bullet behavior for example, you will spare some events and lighten the logic), some big sprites for the background (I don't see how to optimize this), or some group activation that would benefit the project. All this can be optimized, but shouldn't be a problem for a standard computer. For a mobile device though, changing some of the backgrounds for lighter, more standard sized images would be better.

The bullet behavior I talked about is used in the "infinite runner" template, you should look at it. it can be used for everything moving on the screen in your game : spikes, backgrounds, ...
B
17
S
8
G
4
Posts: 461
Reputation: 6,157

Post » Tue Feb 18, 2014 3:28 pm

Same as Guizmus for the most part, I edited and added some comments, it is not the best I could have done (I don't even know if it will run better for you), but I just wanted to be able to explain which changes I've made and why:

https://dl.dropboxusercontent.com/u/10035971/Nouveau%20dossier/flappynator%20commented.capx

Also try to search for groups, functions, and includes, that could help you a lot I think (since everything is on the same layout, being able to deactivate a entire group of event is very useful, also, try to see where a trigger once is enough sometimes)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Next

Return to How do I....?

Who is online

Users browsing this forum: David181 and 18 guests