T
Tristan
Hi,
I have some performance problems with the following animation
technique:
- I have one container like JPanel
- I have sprites that are threads and have a reference to the
container
- the sprites change their state *very* often (but not endless loop)
and call their container to repaint each time the state changes
- the container itself then calls paintComponent and paints all the
sprites that it knows
Now the problem with that technique is that, if I have too many
sprites (threads) the performance gets worse for each sprite, because
the calls to the container increase too much.
Is there any other technique ? How does a layer technique work ?
Thanks.
Cu, Tristan.
I have some performance problems with the following animation
technique:
- I have one container like JPanel
- I have sprites that are threads and have a reference to the
container
- the sprites change their state *very* often (but not endless loop)
and call their container to repaint each time the state changes
- the container itself then calls paintComponent and paints all the
sprites that it knows
Now the problem with that technique is that, if I have too many
sprites (threads) the performance gets worse for each sprite, because
the calls to the container increase too much.
Is there any other technique ? How does a layer technique work ?
Thanks.
Cu, Tristan.