treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Trying to make an animated dice roller! Suggestion!?

  • This project is only in the planning stages as of right now but I am working on a game site to practice html5. I want to build a dice roller with multiple types and different amounts of dice. I can do the js and randomly generate the results without trouble but I would like some suggestion as to animating realistic dice throws. I thought about using sprite animations but I am not sure how achieve a random looking animation. I know I could cheat it but it would be way cooler to have realistic animations. So community I turn to you for suggestions. I am new to HTML5 so simple answers are better but I am not afraid of a challenge.

  • You could use sprites, using HTML5 canvas and Mr. Doobs three.js. Then you can draw up 3D elements of each face of the dice (or in three.js, apply to a cube polygon) How you control the dice is entirely up to you.