Maybe it is more useful to don't use much memory, are you doing something like creating many GreenfootImages or something like that?
yes very many Images. Like I say: a very big game
You mean I shouldn't use setImage but repaint my images?
Yes, I could do so.
But I think that will not be enough.
I mean that clearing and scaling an image is more effecient than creating a new one.
Yes I know what you mean but I think my problem aren't just the images.
The hint with repaint is good I think, but I don't think it'll be enough.
I understand.
What other things do you do that use up a lot of memory?
I use images, soundfiles, and many many classes and objects.
I don't know what of that takes the most memory?
Images and sounds are the problem I think.
You could try not to load all the sounds of the game, but just load a few from disc.
Another Question (to your hint with the images):
If I use the methods like you tould me: If I overwrite the Image with another image (after cleaning it) and this Image is another size, must I change the size of the image I want to overwrite or will greenfoot do this for me?
You have to do it yourself
ok thank you.
That will help (I hope).
btw use .mp3 files for ur sound cause it takes less space.
Note that if you use SetImage("imageName") it will create a new GreenfootImage every time you run that. It is better to create a GreenfootImage once and use that image instead of creating a new one. I'm not sure if this is what you are doing, but it is worth mentioning :P