Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memory full when loading multiple images
#1
Question 
Hi to all !!!

I will try to explain myself with my limited english ?

I am making a space shooting/strategy game that loads multiple images. I have a main image (ship) and when it is attacked I load two different images in other two layers (shields impact, damages made to the ship). Last thing I do is _PUTIMAGE of these three layers. During the game I use _LOADIMAGE to change the images of these layers, and there are several ships in the game with the same three layers.

I noticed that when I start my game, the Windows task manager shows some RAM used, and as I am playing it this RAM is increasing.

I know the _FREEIMAGE command, but my code is very large and I find very difficult to check when to use it...

Also I noticed that when I execute a _LOADIMAGE command, and some time later I execute this command over the same variable the memory is still increasing. I thought that when using the same variable the RAM occupied was the same... obviously I was wrong Sad

Is there any way to re-use some LONG variable to load several images without having to _FREEIMAGE between every load? I thought to make a SUB that makes a _FREEIMAGE in the variable just before load an image, but it goes wrong a lot of times Sad

Anybody can help me? Thank you !!! Smile
10 PRINT "Hola! Smile"
20 GOTO 10
Reply


Messages In This Thread
Memory full when loading multiple images - by Ikerkaz - 11-02-2024, 10:52 PM



Users browsing this thread: 1 Guest(s)