Jump to content

Search the Community

Showing results for tags 'cooldown'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Let's say I have a variable "assets" that is an object and contains several sprites. Inside the update loop, I check the position of each sprite by iterating through the object. If a condition is true (the sprite is outside the game bounds), I want to wait a random amount of milliseconds and then give that sprite a new position without the need of destroying it and creating a new one. I want to use the same amount of sprites and continue re-spawning them until another condition is met (out of lives or whatever). I tried using setTimeout() but it does not work inside the loop. Furthermore, I'm having problems figuring out how to "freeze" one sprite while the rest keep moving (that means I cant pause the update loop, although I don't even know if that's possible). Please keep in mind that this is a mobile game and performance is important. Is it really worth the effort? Should I just kill them and spawn new ones? Thanks for reading.
×
×
  • Create New...