Construct 2 and cores

Discussion and feedback on Construct 2

Post » Sun Aug 04, 2013 3:27 pm

When you run a C2 game in Chrome, I know that only a single processor core is utilized for the game. However, I was just wondering that if Ouya gets supported by Cocoonjs, and I port it to the Ouya, will it only take advantage of one of the four cores of the Ouya's Tegra 3?

So in other words, are C2 games always ran on a single processor core or are there exceptions to this?
B
7
S
2
G
3
Posts: 113
Reputation: 1,932

Post » Sun Aug 04, 2013 7:34 pm

As far as I understand it, C2 games will run all game logic on one core except for pathfinding, which uses a web worker to run on a second core if it's available, but it will not utilize any more cores than that.
Moderator
B
94
S
33
G
33
Posts: 3,006
Reputation: 27,749

Post » Sun Aug 04, 2013 10:48 pm

The rendering will utilise all available GPU cores. Most logic processing happens on a single CPU core, except for pathfinding as @Arima notes, but depending on the browser engine it may be able to use additional CPU cores for other purposes. For example IIRC Chrome forwards all WebGL calls to another thread, so they can happen on another core. Other processes like audio and image decoding are likely to use other cores. However the details will probably vary depending on the particular engine you're using (including whether CocoonJS or browser-based). If you wanted to know more about CocoonJS specifically, it would be best to ask Ludei.Ashley2013-08-04 22:49:22
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746

Post » Mon Aug 05, 2013 9:03 am

@Ashley

Does Collision checking also use only a single core?
Would there be any improvement in speed if it used all available ones?
B
10
S
3
Posts: 233
Reputation: 1,537

Post » Mon Aug 05, 2013 10:17 am

Yes, collision checking is single threaded. Collisions are checked in the actual 'On collision' or 'Is overlapping' events themselves, and since the results are needed immediately, there's not much to gain by offloading to another core - the rest of the events could not continue until the results were known.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746


Return to Construct 2 General

Who is online

Users browsing this forum: paxto22, Rastacity, Studio Mercato, Yahoo [Bot] and 3 guests