Sushin
R0j0 canvas is the primary and best way to handle long term decals. However, it must be noted that each canvas is it's own memory object. If your not going to be sharing the canvas(which wuold void the point o share) then you can eat through memory FAST if you have many canvases. However if you game play environment is small and you don't need many. Then yeah. create a few canvases. use them as a decal layer and go nuts :D However if you have LARGE worlds or need many movie decal objects then try to follow the crazy mess below.
Your best bet is to go the original route to decals of using a sprite. Identify each each decal with an incrementing number when created.
As the game runs watch for when you drop below 30FPS. When you do destroy one decal on the screen with the lowest number.
Alternativly you can also give each decal a PRIORITY value. And instead of destroy. you can do a
Group: Level_Of_Decal
var static LOD = 0 (level of decal)
FPS < 30
----DECAL ON SCREEN AND DECAL IS VISIBLE
------ DECAL = LOWEST PRIORITY
--------- Repeat DECAL.count * (LOD + 0.25) deactivate 25%
--------- DECAL.setVisible to invisible
------ DECAL = MEDIUM PRIORITY
--------- Repeat DECAL.count * (LOD + 0.10)
--------- DECAL.setVisible to invisible
------ DECAL = HIGHEST PRIORITY
--------- Repeat DECAL.count * (LOD + 0.05)
--------- DECAL.setVisible to invisible
---- LOD = LOD + 0.1 increments a removal of 10% of base objects
FPS > 35
----DECAL ON SCREEN AND DECAL IS INVISIBLE
------ DECAL = LOWEST PRIORITY
--------- Repeat DECAL.count * 0.1 reactivate at 10% per
--------- DECAL.setVisible to visible
--------- if FPS > 15 then Action Decal Destroy(TOO MUCH TO HANDLE)
------ DECAL = MEDIUM PRIORITY
--------- Repeat DECAL.count * 0.2 reactivate at 20% per
--------- DECAL.setVisible to invisible
------ DECAL = HIGHEST PRIORITY
--------- Repeat DECAL.count * 0.5 reactivate at 50% per
--------- DECAL.setVisible to invisible
This runs under both FPS Conditions
-- Group Deactivate: Level_of_Decal
-- wait 1 second
-- Group Activate: Level_of_Decal
Using a Level of Detail model you can probably go nuts and then let the engine sort itself out. This is what i would suggest. However the above is a quick dirty hack abstraction. You will need to sort out the details.
Also as an update and it get's missed a lot.
Physics in C2 uses Box2D. Physics in C2 is outside of Scirra's hands. Physics for Box2D is noted to run on Binary compiliation and CPU speed. Now physics can used Fixed time step wich will produce reliable repeatable results across same FPS machines.
However
A) I don't believe Physics in C2 doesn't uses a Fixed time step. So it's never going to be stable across different powered computers.( I could be wrong)
B) And I know for 100% that Physics doesn't used Fixed Networking time step which would allow for physics to be stable across ALL processing frame rates, CPU's clocked systems.
C) There is no way to fix C2 Physics as it's a straight jacket, cuffed, 6 point restraint, and padded room version of Box2d.