How do I find an alternative to loops?

Get help using Construct 2

Post » Sat Jan 23, 2016 10:51 am

Does anyone know a faster alternative to loops for creating a several thousand objects? I'm not very good with JavaScript so I was just wondering if there was anything faster in Construct 2.

Thanks,
EthanD57
Live long and prosper.
B
28
S
2
G
1
Posts: 29
Reputation: 1,532

Post » Sat Jan 23, 2016 12:24 pm

A loop is run completely in one tick..
Can't get any faster, I think..

That is, if several thousands of objects should be created at the exact same time..
I don't think the several thousands of objects will be on the screen at the same time, so maybe you could split it up..
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 » Sat Jan 23, 2016 5:54 pm

I don't know about that, my game is still really slow.
If you want to check out the .capx see my forum post here: https://www.scirra.com/forum/viewtopic.php?f=180&t=167483&p=1009072#p1009072
Live long and prosper.
B
28
S
2
G
1
Posts: 29
Reputation: 1,532

Post » Sat Jan 23, 2016 6:25 pm

EthanD57 wrote:I don't know about that, my game is still really slow.
If you want to check out the .capx see my forum post here: https://www.scirra.com/forum/viewtopic.php?f=180&t=167483&p=1009072#p1009072


You don't know about what?
Could it be the game is slow, because you have thousands of objects?

I can't open your capx, because it uses the third party plugin noisejs, which I don't have or need..
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 » Sat Jan 23, 2016 7:28 pm

You've got a point there, the game could be slow because of objects and not loops. My mistake. :oops:
Live long and prosper.
B
28
S
2
G
1
Posts: 29
Reputation: 1,532


Return to How do I....?

Who is online

Users browsing this forum: imhotep22 and 9 guests