itaditya / trick-or-treat-game

Play it for free here
https://trick-or-treat.netlify.com/
16 stars 17 forks source link

Add confetti when user breaks high score. #53

Open itaditya opened 4 years ago

itaditya commented 4 years ago

Once user collects all candies, we show a page on which we show how many moves did the user took to finish the game. If the number of moves if the least from the list in scoreboard, show confetti on the screen.

Note- Don't show confetti when there are no past scores. Basically when the game is played first time the score could be anything. There is no big achievement there to show confetti.

The code for confetti can be copied from here with proper attributions.

Implementation-

Srihari44 commented 4 years ago

I'll do that

sohammondal commented 4 years ago

@itaditya Instead of the example link that uses p5.js, we can use this library. If you approve, I can work on this.

itaditya commented 4 years ago

@sohammondal since @Srihari44 has requested to work on this feature, I'm assigning him to work on this.

Thanks for letting me know that the pen I shared is using p5.js. The library you shared doesn't perform very well.

@Srihari44 let's use this tool https://www.npmjs.com/package/confetti-js, It would make your work easier.

sohammondal commented 4 years ago

@Srihari44 All the best. 😄

Srihari44 commented 4 years ago

Thanks pal :) @sohammondal