mercredi 8 avril 2015

Random generating and moving circles in JavaScript?

How do i randomly generate ellipses in JavaScript? For my game, you need to dodge falling boulders, so the ellipses have to fall down slowly. There can't be more than 3 or 4 circles falling at a time, and they need to speed up as the game goes on, increasing the difficulty. Right now I am using a random number generator, but the ellipses only stay for a moment and generate too fast. Any suggestions?


-bamboo3





Aucun commentaire:

Enregistrer un commentaire