Changing Origin of Sprite cause IE to slow down.

Discussion and feedback on Construct 2

Post » Fri Jun 01, 2012 3:43 pm

I got a maze type game that displays about 900 physics sprites and when i change the origin of the sprite the performance drops from about 55 fps to about 30 fps in IE9. Unchanged in Chrome. Anybody have an idea of why this happens?
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Fri Jun 01, 2012 4:43 pm

i don't know but i think chrome is the best browser just use it :P
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Fri Jun 01, 2012 6:02 pm

900 physics objects is far, far too many. See Physics Basics tutorial:

[quote]Performance
Physics simulations are very CPU intensive. It can take a lot of processing to work out the proper motion. To make sure your game runs fast, it's recommended that you don't use too many objects at once. Over 100 physics objects moving at once is likely to slow your game down. Also, phones and tablets have much more limited processing power than a desktop computer. If you're targeting mobiles, you should be very conservative, and try not to have more than 20-30 physics objects.[/quote]
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Fri Jun 01, 2012 6:03 pm

@Ashley

I only have 1 physics object moving at a time, the other physics objects are not allowed to move. Setting all these objects to physics is the only way it blocks/stops/restricts the only movable physics object.

Maze Gamerfisher2012-06-01 18:08:21
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Fri Jun 01, 2012 6:08 pm

It probably doesn't matter, as soon as you nudge one of the objects it likely has to process all 900 at once. You should find a way to make what you are doing without the Physics behavior.

Edit: it looks like your game could fairly straightforwardly be made with the 8 Direction or Custom movements, with Solid behavior blocks, and it would probably run way faster.Ashley2012-06-01 18:09:31
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Fri Jun 01, 2012 6:10 pm

Thanks, will look at making the changes.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922


Return to Construct 2 General

Who is online

Users browsing this forum: DonpatchXD, Yahoo [Bot] and 9 guests