What do you think about mixing this two up?
Would it lead to better performance for the scenario described below?
However, method done below still contains jerking/stuttering in animation.
Any solution to remove the stutter?
What my app does is to create a random mix of smiley
and draw it into the canvas, and update the movement of the smiley (x,y)
I have a source bitmapdata containing different smileys each of the same size.
Example:
:love::pac::beard:8-]:panda::bored:
The app creates a random mixture of smileys in random length;
Example:
:pac::love:
:beard::bored:
8-]:panda:
:pac::beard:8-]
:love::bored::panda:
etc…
I have 2 vector that acts as pool.
1 vector is to store bitmapdata,
1 vector to store SmileyObject
(SmileyObject has 3 properties, positionX, positionY, bitmapData)
If the pools is empty, I create a new bitmapdata and SmileyObject
The bitmapdata copypixels random smileys from the source bitmapdata.
This is then placed into SmileyObject.
I have a loop that goes through each smiley object
and copypixel each bitmapdata into the canvas along with the x,y position.
However, even with copypixel and pooling bitmapdata + smiley object,
I can still view the stutter / jerk / stuttering / jerking in the smiley animation.