The bouncing ball ....

this example shows a game loop managed with iFsm, with bouncing balls and a racket as objects using canvas (jCanvas) with layers to display them and with behaviours handled by iFSM (bouncing), using requestAnimationFrame calls instead of setTimeout

The mouse or finger touch move the racket

The game ends when you have touched 10 times the ground

The score is then displayed using the number of frames to give the score...

This text is displayed if your browser does not support HTML5 Canvas.
Ground touch left:
What score will you obtain?

FrameCounter:
FPS:
Status:

object 'aBall'
Force: -
Velocity: -

object 'a2ndBall'
Force: -
Velocity: -

object 'Racket'
Force: -
Velocity: -