Improve cocoon projects performance

Get help using Construct 2

Post » Fri Oct 18, 2013 12:33 am

hi.. I read the topic about the changes to improve android games' performance but i've some questions..

how can i delete objects when they leave the viewport on the left? Not the layout but the viewport!

if I want to make the player to collect coins, all the instances (of the coins) continue to check for collision with player.. So they occupy a lot of cpu's work.. how can i solve this?

i saw the jungle platform tutorial but he used sprites instead of tiled images to build the map.. but a lot of sprites make the cpu works a lot

how can i use the tiles.png without using sprites?


thanks

B
4
S
1
Posts: 9
Reputation: 668

Post » Fri Oct 18, 2013 3:03 am

Any object NOT in the viewport is fine on rendering performance. The engine will not suffer any performance problem.

Object NOT in Viewport
-- Object < ViewportX(gamelayer) then object.destroy

As for collision. @Ashley at some point should implement a better collision detection model(http://www.mikechambers.com/blog/2011/03/21/javascript-quadtree-implementation/). The reason Ash should is because it's the only way for the Platformer behaviour/plugin to use them effectivly. We could do a plugin for better collision, but then Platformer is still using the slower method :(. So not much of a point for a plugin version.

You need to use sprites. but only the objects references in the collision are the only ones checked against.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,018

Post » Fri Oct 18, 2013 12:04 pm

thank you so much! :)


but what's ViewportX?
a method that accepts a layer as argument?

i can't write that code..hmsmnt2013-10-18 12:12:56
B
4
S
1
Posts: 9
Reputation: 668


Return to How do I....?

Who is online

Users browsing this forum: plinkie and 5 guests