Execution speed

For questions about using Classic.

Post » Wed Sep 22, 2010 1:46 pm

I noticed a severe loss of the game speed execution when I use sprites 128x128 and especially when the Player is near with another sprite that collides with it.
I use the 'per pixel' method for collisions. If I will use the 'bounding box' collision method the game runs better. Please take into account that the total objects used are 41.
Is there a setting to be checking out or not to expect more from Constructor?
B
2
G
2
Posts: 31
Reputation: 712

Post » Wed Sep 22, 2010 8:26 pm

128 x 128 x 41= 671744 pixels with per pixel, so as you can imagine that's a lot to keep track of.
You can either lower the size of the sprite, lower the number of objects, or use different collision detection such as bounding box, and point.
Even with hardware acceleration there is a limit based on... hardware.
This is one of the trade offs you get with 2d.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Wed Sep 22, 2010 8:45 pm

Is there any way to instruct the Construct to use the bounding box of the collision mask of the sprites?
If yes, then I could use larger sprites without loss of speed.
B
2
G
2
Posts: 31
Reputation: 712

Post » Thu Sep 23, 2010 3:45 am

Unless you've changed it the mask should be the same as the image.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Thu Sep 23, 2010 5:21 am

Yes I've changed the mask to a smaller rectangle.
It could be a a feature request for Construct:
The option to define smaller bounding box for collisions. I noticed that in the Picture editor, you can have different bounding boxes between the sprite itself and for the collision mask. It would be nice if I could instruct the Construct to use the bounding box of the mask for collisions.
B
2
G
2
Posts: 31
Reputation: 712


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests