How do I The best way to drop an object

Get help using Construct 2

Post » Fri Jul 24, 2015 5:50 pm

i was reading about performance of construct 2, the best way to avoid performance issues is avoiding every tick and physics as much as you can, then my question is if i have a sprite that drops an object which is the best way to do this? with platform behavior or physics? for example my sprite have a weapon, if i kill the sprite then the sprite will drop the weapon sprite, the only way to drop the weapon naturally is with platform behavior or physics in the weapon sprite, i put an example:

if sprite destroyed -> weapon sprite ( enable physic or platform behavior) , if weapon sprite overlap floor sprite then -> disable physics or platform behavior of weapon sprite.

The capx:

http://www.filedropper.com/enemydropweapon

i am worried about performance issues if i have a lot of sprites on screen dropping weapons etc.. etc.. and of course the AI CPU consumption.
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Fri Jul 24, 2015 7:07 pm

Well, as Ashley always says - the best way to know for sure is to test it out and measure the difference. If you are targeting mobile, then I would avoid physics if there is any other way to do something (and there almost alway is). Although, for the very short time a weapon will take to fall to the ground, it may work just fine. Platform behaviour would probably have less of an impact on performance, but I don't think the weapon would fall flat on the ground as realisticly without some manual coding.
B
94
S
33
G
20
Posts: 438
Reputation: 17,615


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, jaytrott86 and 8 guests