large levels peformance

Discussion and feedback on Construct 2

Post » Tue Feb 25, 2014 5:46 am

@Arima

Hey, thanks for that comparison! Really interesting...what is up with groups? It might be insignificant on desktop in most cases...but on mobile...

What happens if you have a 1000 inactive groups?

@Ashley

Why do empty groups use up CPU?
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Tue Feb 25, 2014 5:57 am

1000 inactive groups is the same as if they're active, about 18-28.

I did another check - it makes sense that a group would use some CPU, as it's got to check if it's active or not. However, comparing against 1000 events checking if a global var=0:
5-10

It makes we wonder if they can in fact be optimized more - I don't understand much about C2 at the JavaScript level, though.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Tue Feb 25, 2014 5:58 am

Actually, scratch that. It seems like it only uses up cpu in debug mode. On export to node webkit, it registers virtually no cpu usage. Same for active and inactive groups.

@Arima

If you export to node-webkit or html5 page, does your cpu still lag down w/ 1000 empty groups?
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Tue Feb 25, 2014 6:05 am

Oh, duh - of course the debugger hits the CPU in relation to groups, it's doing tons of performance tracking and such. Yeah, in preview but not in debug mode it's down to 0.2 with 1000 groups.

@jayderyu - try using the cpuutilization expression instead of the debugger.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Tue Feb 25, 2014 6:09 am

@arima
good catch. I do find this amusing on the groups :D
B
92
S
18
G
9
Posts: 2,455
Reputation: 15,113

Post » Tue Feb 25, 2014 7:24 am

Thanks for all the replies.

As much as I don't want to, I think I will have to try GMs

If I can't achieve what I want to do then I could ty learning torque 2D since its now open source.

And ultimately unity now has native 2D capabilities, and learning unity sounds like the most sustainable option.

I love construct 2 but its early days in my opinion
B
6
S
3
Posts: 39
Reputation: 632

Post » Tue Feb 25, 2014 8:17 am

Very interesting observations about groups. I had no idea they impacted performance, as I use them only for organisational purposes, not for switching events on and off. Certainly something to be aware of.

@jayderyu, so are you saying that if C2 had been designed to be more objected orientated, with event sheets being attached to objects rather than scene level, then it would potentially have much better performance? Would be a nice option to have it both ways, but I guess that would require a complete architectural change. One of the things that is cool about Godot is that you can attach scripts at the scene level or the object level, which gives you a lot of creative options. GMS can certainly get confusing at times, when you come back to an old project and wonder where the hell you attached your code!

Would have been interesting if C2 had gone down the Haxe/OpenCL path, but if the compile time is anything like Stencyl 3 then maybe not the best idea.
I still think Scirra should hire an extra dev to just do native exports (most people just want Android/IOS/Windows in addition to html5) and then charge $100 for each exporter. It would solve a lot of problems.

@serpent ....If you want to go down the open source path, I would steer clear of Torque. Try the new Godot Engine, or even Enigma, which is a GMS clone. Or the free GameDevelop, which is very C2-like, but not as good.
B
11
S
2
G
1
Posts: 108
Reputation: 1,899

Post » Tue Feb 25, 2014 8:37 am

@zendorf - perhaps you missed the posts above where it was discovered that groups actually have almost no performance impact at all - it's only while debugging that it uses a lot of CPU time.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Tue Feb 25, 2014 9:08 am

Arima wrote:@zendorf - perhaps you missed the posts above where it was discovered that groups actually have almost no performance impact at all - it's only while debugging that it uses a lot of CPU time.


Good to know, I was worried then since I like to group stuff. hehe
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Tue Feb 25, 2014 1:09 pm

@jayderyu - I don't understand your point about event sheets. If you put an event sheet in an object, how does that actually change anything? If it does not check the events every game loop, it's not remotely useful, because none of the events will work. If it does check the events every game loop, it's no different performance-wise to just having those events in a main event sheet anyway. Performance is just hard, period, and learning techniques to best optimise events can take time.

With WebGL I am sure the engine will perform at around the same level as native engines. (Asm.js should do the same for heavily physics-based games.) The main problem with WebGL support is driver blacklists and reverting to software rendering, but that should recede over time - and it can actually be useful, since it works around severely broken drivers that would otherwise make the game unplayable. There are lots of other browser improvements in the works, like Chrome for Android gradually replacing the crappy stock Android browser, also getting asynchronous Javascript compilation, better garbage collection in Firefox, and so on. We also keep making performance improvements to the engine, such as with collision cells and segmented tilemaps to support extremely large levels like the OP describes.

BTW the performance of groups in the debugger makes sense - the profiler will make extra calls to measure the CPU time of every group, which adds overhead that isn't there in normal preview or export mode.
Scirra Founder
B
402
S
238
G
89
Posts: 24,628
Reputation: 196,023

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: JesusJ, TheRealDannyyy and 1 guest