Test + performance issue, please help

Discussion and feedback on Construct 2

Post » Wed Mar 07, 2012 8:52 pm

Hi there :)

Before I start, I would like to say that my question is not here to get down C2 or something. I just want to understand why and what's wrong with C2 and my computer.

May be some of you know, I work with an home PC and a laptop (poor laptop with an intel gma 3150). I like to make game with my home pc, upload my project and continue it with my laptop when I'm not at home.

But I have a problem : on my laptop I have very very poor performances with C2. Please wait I haven't finished ^^

I thought first of my poor laptop and graphic cards, update drivers etc... but nothing. I found this very strange.

So I made a test, I have taken my pseudo starfield in C2 and I translate it in Game Maker Html 5 to compare and see if the problem persist with Gm Html 5.

Here's the C2 project with capx : C2 Starfield

Here's the same in Game Maker Html 5 : GM HTML 5 Project

All have the "same code and algorithm". The problem is that on my laptop the C2 version is awfull, slow and unplayable.

But the GM HTML 5 version is fast and smooth on the same laptop !? Both can use WebGL or not (automatic). I

know that my laptop badly support WebGL, but if the problem was webgl it would be the same with the Game Maker HTML 5 version (it can use webgl too if it is available), but it's not the case.

What sort of thing C2 use that could be incompatible or something with my laptop ? I send these projects to a friend who has a laptop (a poor too lol) and he saw the same thing.

Is there something that C2 uses witch could be a problem ?

On my Home PC both work correctly.

Thank you for help.

PS : please be cool, english is not my first language ^^

CrystalNoir2012-03-07 20:57:07
B
11
S
2
G
2
Posts: 53
Reputation: 2,244

Post » Wed Mar 07, 2012 8:56 pm

in my laptop the two have the same speed, but the C2 is a little bit lower to load than the GM example.
B
32
S
9
G
6
Posts: 1,467
Reputation: 7,951

Post » Wed Mar 07, 2012 8:59 pm

I don't understand what's the problem. I thought it was webgl, but Game Maker Html 6 can use it if it's available (automatic mode or force mode), but I don't have this problem with it so...I try tu understand.

The loading is ok but the movement is frame by frame with the C2 sample on my laptop. and normal with the gm html 5 version. May be a chipset pb with C2 ?
B
11
S
2
G
2
Posts: 53
Reputation: 2,244

Post » Wed Mar 07, 2012 9:00 pm

my laptop ran it fine in C2...Actually looked pretty cool!
B
26
S
6
G
7
Posts: 67
Reputation: 5,079

Post » Wed Mar 07, 2012 9:06 pm

I know that's the problem is with my poor laptop, it's certain but why C2 and not GM HTML 5 ? there's a thing that make it glitch on C2.
B
11
S
2
G
2
Posts: 53
Reputation: 2,244

Post » Wed Mar 07, 2012 9:12 pm

effectivly i have a same problem with my old notebook... GM run normaly but C2 Project have a problem of FrameRate.

I test with chrome and Ie9 i don't have Firefox or other.

Scuse for my poor english (i speeck french and italian ...)
B
3
Posts: 1
Reputation: 431

Post » Thu Mar 08, 2012 3:12 pm

I'm not alone ^^

So, no idea ? :(
B
11
S
2
G
2
Posts: 53
Reputation: 2,244

Post » Thu Mar 08, 2012 3:39 pm

Both run 60 fps here.

My best guess is:
1) all your 'for each' conditions are redundant except the one in 'on start of layout'. Events naturally run for-each instance, so you only need that condition in corner cases where the event system's default behavior is not enough. Adding 'for each' to an event where you don't need it can cause slowdowns because it forces Construct 2 to repeat the event 250 times with one instance each time, rather than handling all 250 instances in one go. I had to create 5000 stars to get the fps to drop on my computer (!), and the fps nearly doubled when I took out the redundant 'for each's!

2) I can't see the GameMaker project, but I assume you just painted stars directly using some draw function. This is more efficient than Construct 2's sprite object and is one of the areas scripting can get ahead of events. Despite spending a lot of time ensuring sprites are as optimised as possible, they still carry a lot of "weight" like instance variables, collision polygons, and the event system which has to do extra processing compared to what a script would do. (GameMaker's Sprite is not really directly comparable since it represents an image only, its Object is a more appropriate comparison.) In most cases I would think the same thing in both would run about the same speed, but this is one of those specifically-designed cases where a difference can be seen. Not totally sure here, but it's my best guess.Ashley2012-03-08 15:39:24
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,508

Post » Thu Mar 08, 2012 3:52 pm

Hi,

We had have the same reflexion, before read your post, I've just put off the "for each" loop in the capx and make the sprite smaller (I update in Scirra Arcade too...). But I don't have any amelioration without :(

I win a very very little but almost nothing.

I think the problem is somewhere with may be my chipset and C2 ? very fast with GM on my small laptop but not with C2.

If you want, here's the GM HTML 5 Project : Download the GM HTML 5 project

You will see that is the same algo. I don't know why. I reapeat, my laptop is a "small laptop" with gma 3150 graphic card. But I think if I can get it fast with GM I should have the same with C2. That's why I think about a "compatibility issue" but witch ? ^^

Or, how you say may be GM and C2 have their differences that make it work in a different way. I really don't know.CrystalNoir2012-03-08 15:57:38
B
11
S
2
G
2
Posts: 53
Reputation: 2,244

Post » Thu Mar 08, 2012 5:02 pm

I dunno if this the real issue, sense C2 uploaded to Scirra Arcade while GM test on a plain empty site ? sometime the website activities can Eat the game performance so badly, this one of worst flaw for HTML5 apps, if your computer don't have strong graphic card or enough ram like my garbage laptop too, you likely will suffer too :(.

before i had made a platformer with GM HTML5 that run fine on my website and dropbox, but as it's uploaded to a gaming website, they used to have facebook , update news box, chat and many craps cover the homepage, which affect my game performance so badly because it's not flash but an HTML5.

my game link (they remove the website plugins that slow down html5 games which made the problem is less recognizable than it was)

platform gameprinsukun2012-03-08 17:04:39
B
22
S
3
G
5
Posts: 141
Reputation: 5,117

Next

Return to Construct 2 General

Who is online

Users browsing this forum: spy84 and 4 guests