Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Threads

 
suchitra chari
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a scenario, where a group of balls is hit by a single ball. On contact the group of balls are supposed to scattered. For this purpose, I have put each ball movement in a seperate thread. But when I run the threads, the movement is not smooth. They are jerky. Any solutions for this?
 
James Reilly
wrangler
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you considered giving each ball a "tick" method,
and having a Canvas with a thread that successively ticks
each object according to a virtual clock? The canvas
also being responsible for drawing the animation
too (in it's basic animation loop).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic