Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could we make javascript movements more smooth?

Status
Not open for further replies.

jpeng5203

Programmer
Oct 19, 2006
3
CN
I build a billiards game ,9 ball,by javascript.but i found that the ball movements is not very fluency,
the ball will suddenly stop and the ball movements likes 'wave and wave'.
when shoot the ball, maybe there have many of ball move in the sametime, do will can let it's movements very fluency,like flash game?
what is my problem?
 
No doubt you are using setTimeOut() or setInterval(). These (and all javascript) rely on the speed of the client machine. You have no control over how fasttheit computer is, nor how many other processes they are running. These two factors are the most likely cause of your problem. There is no solution.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
that is a bad news for me,:( ,yes , i use the setInterval to contrl them moving,just like setInterval("move()",10);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top