Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualstitchs

Posted 30 March 2013 - 08:38 AM

As an additional note,

 

When you do go down the container root, so you can have multiple bullets, set a 'roof' of the number of maximum bullets you can have on-screen. This stops any new bullets being created before you are allowed to fire a new one. Without this you could have ALOT of them on screen at one time which, when rendered, will slow down you program considerably.

 

You can use this max value as part of the test to check whether a 'newShoot' is allowed, and implement other tests. For example, if the max value has been reached, check if a bullet goes off-screen, then you can kill it, free its pointer up, and set newShoot to true so that a you can create a new one.

 

I hope that is clear,

 

Stitchs.


#1stitchs

Posted 30 March 2013 - 08:36 AM

When you do go down the container root, so you can have multiple bullets, set a 'roof' of the number of maximum bullets you can have on-screen. This stops any new bullets being created before you are allowed to fire a new one. Without this you could have ALOT of them on screen at one time which, when rendered, will slow down you program considerably.

 

You can use this max value as part of the test to check whether a 'newShoot' is allowed, and implement other tests. For example, if the max value has been reached, check if a bullet goes off-screen, then you can kill it, free its pointer up, and set newShoot to true so that a you can create a new one.

 

I hope that is clear,

 

Stitchs.


PARTNERS