Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
gdevelop:tutorials:beginnertutorial2 [2019/05/28 19:09]
tany13 [Creating enemies attacking the turret]
gdevelop:tutorials:beginnertutorial2 [2019/05/28 19:25]
tany13 [Deleting the bullets going out of the screen]
Line 289: Line 289:
 ===== Deleting the bullets going out of the screen ===== ===== Deleting the bullets going out of the screen =====
  
-Remember that we always ​must destroy our garbage so as to prevent the game to be flooded with tons of objects ​doing nothing except slowing ​down the whole thing. That's why we take care of deleting the explosions when the animations is over. But what about the bullets? When they go outside of the screen, they still exists ​and the computer must update them each time the screen is refreshed: This can become ​a performance bottleneck.+It is a must to destroy our garbage so as to prevent the game being flooded with tons of useless ​objects, which slow it down. That's why we take care of deleting the explosions when the animations is over. But what about the bullets? When they go outside of the screen, they still exist and the computer must update them each time the screen is refreshed: This can lead to a performance bottleneck.
  
-We could add an event to destroy the bullets when they are too far from the turretthat is quite easy. But we can also use a behavior: ​An behavior is used to add a specific behavior to an object. Here, we are going to use a behavior that will automatically destroy the object when it goes outside the screen.+We could add an event to destroy the bullets when they are too far from the turretthat is quite easy. But we can also use a //behavior//A //behavior// is used to add a specific behavior to an object. Here, we are going to use a behavior that will automatically destroy the object when it goes outside the screen.
  
-Make a right click on the object in the object list and choose ''​Other properties'':​+Right click on the object in the object list and choose ''​Other properties'':​
  
 {{ gdevelop:​tutorials:​imagebeginnertutorial_56_.png?​nolink |}} {{ gdevelop:​tutorials:​imagebeginnertutorial_56_.png?​nolink |}}