Page 1 of 1

About memory

PostPosted: Mon Mar 08, 2010 7:31 pm
by Leif
Guys, does anybody know:

1.What takes less memory -
a) I make one actor with ten animations and create this actor. Later I only change animations
b) I make ten actors with one animation each. Later I create actor with proper animation and destroy others.

2.What takes less memory -
a) I use PNG image 700 x 900 (1,19Mb)
b) I use CANVAS actor 700 x 900 , draw on it and save canvas state.

3. Actor A is within current activation region, but not created. Does he use memory? How much?
4. Can we change canvas height or width during the game?

Re: About memory

PostPosted: Mon Mar 08, 2010 8:16 pm
by makslane
Leif wrote:a) I make one actor with ten animations and create this actor. Later I only change animations
b) I make ten actors with one animation each. Later I create actor with proper animation and destroy others.


Game Editor manages the animation load for you.
If you have one actor with a 1000 frame animation for example, only few frames will be loaded at time.

2.What takes less memory -
a) I use PNG image 700 x 900 (1,19Mb)
b) I use CANVAS actor 700 x 900 , draw on it and save canvas state.


The image will use less memory (all images, regardless the image format, are converted to a internal format)

3. Actor A is within current activation region, but not created. Does he use memory? How much?


It will use memory.

4. Can we change canvas height or width during the game?


No