I want to create bouncing ball program that's very easy on Flash, Python or Delphi yet very tricky on html5. The program consist of n ball with random velocity (each) moving in a 2d box (oh yeah, square then :) )
I am playing with array in html5 script which is helpful on this program. I don't declare the array using
aBola = new array()
that come as standart on many language, but prefer
aBola = []
instead, just like list on python. In this program, array's just like container for ball.
In html5, moving an object is a bit tricky and, for some Pascal programmer like me, bringing an old memory of draw-clear-draw-clear... cycle; draw a ball, delete it, draw the same ball but slightly right, delet it, ... and so on. All that kind of tedious job, but it worth for the sake of fast execution and no-need-slow-loading-flash-player thing.
After years fighting the slow loading flash without alternative software, I begin to think seriously about moving to HTML5 coding. Altough it ain't true software for me, it provide what I need mostly: animation.
HTML5 support canvas, audio ad video tag, javascript. Need array data? No problem.
HTML5 support canvas, audio ad video tag, javascript. Need array data? No problem.