General slowdown with larger project?

For questions about using Classic.

Post » Sat Aug 20, 2011 8:25 pm

Three more test ideas:

What happens if you try making a whole bunch more event sheets that aren't included/attached to anything, and copying and pasting code from other event sheets into them?

What happens if you make a new layout, and add a whole bunch of new unique objects to it?

And what happens if you add lots more layouts?
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sat Aug 20, 2011 8:32 pm

Not much happens, but there's still the matter of running a single, new, blank layout and only reaching ~500 than the ~2500 I get if I remove everything except a layout with maybe one or two sprites in it.
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Sat Aug 20, 2011 10:53 pm

It's just natural that you get much lower framerates in a project compared to a nearly empty project.

What basically counts is the balance between cpu and gpu usage.
Every event of a layout (+ the included event sheets) will be checked on every tick. If the condition results to true, the actions are performed, otherwise ignored. So even an event that has no actions costs cpu time. We are talking of microseconds, but overall it can sum up to a reasonable value.
It is common practice to just set values/colors/sizes/etc on every tick. This is ok, because most of the time the gpu needs far more time than the code. But when you are about to finetune your project it might help to group these actions under an event that results to true only when a change is needed. This way only the condition costs time (a much smaller amont of time) when there is no need for a change.
On the gpu side, the more shaders you use the less effective the card. A pixel shader applies its code to every pixel (even the transparent ones) of the object it is applied to. This costs a lot of the gpu's processing power. Gfx cards have a limited amount of shader units to prevent overloading, but even if you just use a few shaders they will drop the framerate at a high amount. (Just try a clean new cap and apply the warp fx to the layer)
So try to avoid to much shaders. If you need an effect for a few dozen of objects, it is the better way to group those on a layer and apply the effect to the layer, instead of having a few dozen effects applied to the objects.

That's what comes to my mind right now, maybe there's something I forgot.tulamide2011-08-20 22:53:29
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Aug 20, 2011 11:07 pm

Thanks for helping, but the problem, as discussed, still occurs on levels not using any events at all, and I don't use pixel shaders except for one place.
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Sat Aug 20, 2011 11:34 pm

Speaking of "levels", do you mean Contruct's layouts, or your external levels, which loads into single "playground" layout with a number of included sheets and events? If so, try load every single level in separate layout and include events only specifed for this level.
I mean, if you load, for exemple, "level 1-1", and layout which load that level has included sheets like "level 1 Boss", "level 2-2", etc., it probably will use extra CPU even if it doesn't perform any actions (well, as I think)
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Sat Aug 20, 2011 11:36 pm

So if you add a new, empty layout with no events, running it unlimited is slower than a blank cap? That's odd. I think a while back Davo was investigating a bug where overall performance was dependent the number of different object types in the project. I guess he didn't solve it.

I guess I should take a look back at Classic to solve this - it seems to have held up the biggest and best projects in Classic. If you send me your .cap (obviously I won't share it) I'll run it through a profiler and see what's going on. We're doing the big C2 launch on Monday so I can't guarantee I'll be able to fix this soon though.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sat Aug 20, 2011 11:45 pm

I just checked it with my current project - yep, empty layout runs at almost same speed as playable layout (slower than empty cap)
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Sun Aug 21, 2011 12:42 am

Thanks so much for taking a look at it, Ashley!

Also, at least for me it doesn't matter if it's fixed immediately since my game has a few more months of dev time. Obviously the C2 launch comes first in importance!

I'm trying to contact Kayin, so you could have an extra .cap to look at.

This does affect my .cap as well, so I'll send mine if you need it, but since my .cap isn't affected nearly as much (about 850 from about 1150), I'm not sure if it will be as much help. Not to mention it's stupidly huge, and I would prefer you don't have waste your time waiting for parts it to open and such.

I also tried making a .cap with every default plugin type in it but it didn't seem to affect performance. Thought it might be useful to know.Arima2011-08-21 00:46:21
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sun Aug 21, 2011 12:52 am

I was having a quick look and almost immediately found something that may have been the problem - if anyone else wants to try, have a play with these runtimes:
http://dl.dropbox.com/u/15217362/fasteruntimes.zip
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sun Aug 21, 2011 12:58 am

Erm...I cant run any of them.

"Error loading 'APPBLOCK' (1813)" is the error I get on all three apps.

Huh? :(
B
26
S
7
G
5
Posts: 202
Reputation: 5,235

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest