- Joined
- Jan 28, 2014
- Messages
- 20
- Reaction score
- 0
- Primarily Uses
Hello everyone,
I've searched almost everywhere but couldn't find any deeper explanations on the function of the cache and garbage collection of the rpgmaker (mv).
I am currently working on a project which relies heavily on the use of parallaxes and overly images. Because of this it is very important for me to be able to unload images from the image cache to prevent the game from lagging after a certain time.
Imagine the following: There is a large map (let's say around 100x100 tiles) which has to parallax layers for the whole map. These would be far too large just load with the start of the game, at least without causing the game to lag heavily. Instead, there would be a possibility to split these huge images into several small ones, that would be loading when the player enters the corresponding areas of the map.
For example:
Player is on coordinates x y, so image 1 is loaded, which displays the part of the map the player is currently in. Then the player moves to coordinates a b, so image 1 is erased and image 2 ist loaded, which shows the part of the map around these coordinates, without the player entering another map.
While I am currently trying to event this system, my current problem is: When I am constantly loading and deleting parallaxes as the player walks through the map, will the deleted images get deleted out of the cache as well? Otherwise I'd have to fear lag or crashes.
In short, is there someone who is able to explain:
1. How the automatic garbage collection of rpgmmv works exactly?
2. If there is a way to clear the cache from specific images via script calls?
3. How the ImageManager.clear() function works? I tried this one on a map with tiles and parallaxes, and it didn't seem to do anything at all. Is the program reloading the cleared cache on the running map? Or did i do something wrong when making a script call "ImageManager.clear();"?
Thanks a lot in advance! (and sorry for the long text...)
I've searched almost everywhere but couldn't find any deeper explanations on the function of the cache and garbage collection of the rpgmaker (mv).
I am currently working on a project which relies heavily on the use of parallaxes and overly images. Because of this it is very important for me to be able to unload images from the image cache to prevent the game from lagging after a certain time.
Imagine the following: There is a large map (let's say around 100x100 tiles) which has to parallax layers for the whole map. These would be far too large just load with the start of the game, at least without causing the game to lag heavily. Instead, there would be a possibility to split these huge images into several small ones, that would be loading when the player enters the corresponding areas of the map.
For example:
Player is on coordinates x y, so image 1 is loaded, which displays the part of the map the player is currently in. Then the player moves to coordinates a b, so image 1 is erased and image 2 ist loaded, which shows the part of the map around these coordinates, without the player entering another map.
While I am currently trying to event this system, my current problem is: When I am constantly loading and deleting parallaxes as the player walks through the map, will the deleted images get deleted out of the cache as well? Otherwise I'd have to fear lag or crashes.
In short, is there someone who is able to explain:
1. How the automatic garbage collection of rpgmmv works exactly?
2. If there is a way to clear the cache from specific images via script calls?
3. How the ImageManager.clear() function works? I tried this one on a map with tiles and parallaxes, and it didn't seem to do anything at all. Is the program reloading the cleared cache on the running map? Or did i do something wrong when making a script call "ImageManager.clear();"?
Thanks a lot in advance! (and sorry for the long text...)