Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Cache/Memory Problem (Paid)

brandos

Villager
Xy$
0.00
I have the problem that whenever you change the map or you close/open the menu around 40~ mb of ram are getting occupied which leads to massive problems after 30-60 minutes of gameplay. This problem is gone when I remover all Parallaxes and Kauls Overlay Script from the project. Whoever can help me with this problem will be paid 100$ via paypal. Especially when opening/closing the Menu fast you reach 2 GB of ram usage within a minute.
 

Attachments

It would help to be able to see the project; just attaching an image file of the resource usage in Task Manager doesn't help us understand the problem past that number. With what you say here, though, it sounds like the problem may lie specifically with the maps themselves, so it would help to have a look at the parallax maps you're trying to use.
 

brandos

Villager
Xy$
0.00
The problem can be recreated very easily, just create a new project make the map like 60 x 60 tiles and use a larger picture like the one i've attached as paralaxx map. Now spam right click to open/close the menu and watch the ram usage go up without not going down again.
 

Attachments

LTN Games

Master Mind
Resource Team
Xy$
0.01
I'd just wait until MV is updated, it will fix most if not all memory leak issues and you can save your money. They should be updating it soon, they have already implemented PixiV4, now they're just waiting for the rest of the bug reports and testing.
 

brandos

Villager
Xy$
0.00
Thank you for your response. Alright, will wait. Is there an estimated release date or based on your experience when do you think we can expect a release? I guess this topic can be closed. :)
 
Is there an estimated release date or based on your experience when do you think we can expect a release?
As of this moment, there's no official release date. They'll announce it when it's ready - hopefully soon - but until then, there's no easy fix for the memory/cache problem unfortunately. Can't wait until it's finally laid to rest. ;)
 

Boy Who Codes

Praised Adventurer
Xy$
0.00
As far as I know, this is because the Kaus Overlay Plugin does not remove the added images or dispose them when the player goes to different locations. That means all the images are actually still stored somewhere else, and they just add up. So that's why you retain yourself on the game, all the images are stored somewhere, and they get called every time, causing a lag. I say it is not a memory leak problem but it could be somewhat the plugin's bug. I am into entirely 100% on this since I never use the plugin but I've looked into what it looks like. This is my assumption.
 

brandos

Villager
Xy$
0.00
Would it be possible to add a snippet that will force the pictures to dispose? The 100$ reward for the person who is able to help me with this problem is still open, I invested over several hundreds of hours to convert the game into MV and I need a working overlay plugin, sadly Kaus is the only one who did one that fits my wishes. :/
 

Boy Who Codes

Praised Adventurer
Xy$
0.00
The best way is maybe you could provide a small demo with the plugin and a sample map. This is the best way for us to see what could have been the error. That way, I maybe able to see how to dispose it properly. Could you please provide one? I'll see what I can do. I recently faced this problem when I made a title screen that did not dispose what is actually already there. The lag continues because the images piles with each other, so there it would cause a lag.
 

brandos

Villager
Xy$
0.00
This is sadly quite hard to recreate. With only two maps there is only barely a problem. The memory leak appears after 1-2 hours of playtime, every new map I enter increases the rpg maker game.exe or the "system memory and compressed memory" process in the task manager by 20 - 40 mb until it reaches 3-4 gb ram and the game becomes very slow.
 

Jodis

Adventurer
Xy$
0.44
Here is my hubby: I hope he can help you. I let him read the artical. I let him type it there was no way lol that i could type what he wanted rofl.

A few things could be going on, the first is a memory leak when used object are not being disposed off freeing them bytes in memory of the stack which is mostly graphics related (pixels) keeping in mind that a basic pixel is 8 to the power of 4 (32bit/int) which is squared by the width and the height of the texture. The next issue could be js in itself keeping in mind that it is an interpreted language so CPU and more memory are required to store the objects of it and variables and of course the text of the js itself with it's object managers. Let's more say the former than the latter.

I believe the maps are the culprit because when the maps after first allocation is not disposing bmps which will not be used the near future,
we then have data not really yet needed occupying memory heap space on the phsysical memory and graphics memory. If you are sharing memory because you have a graphics cards will little to no memory then it is shared with the system which is even worse. Can I assist in this matter? Yes, but it will take some time because I have to read all the code for the map class and graphics related classes to see what is going on.
 

Boy Who Codes

Praised Adventurer
Xy$
0.00
This is sadly quite hard to recreate. With only two maps there is only barely a problem. The memory leak appears after 1-2 hours of playtime, every new map I enter increases the rpg maker game.exe or the "system memory and compressed memory" process in the task manager by 20 - 40 mb until it reaches 3-4 gb ram and the game becomes very slow.
I went to see the plugin in question and investigated why. I tried to see if he did dispose it the traditional way, and it seems not, or that of much I know the plugin does dispose them every map.



See, most of them are just called, and not entirely disposed. I have been thinking about this myself because I have not been disposing my overlays with my overlay plugin, and it seems this has the same situation. I will try to see more of the plugin and see if this can be solved right way. I'll contact you for the plugin snippet if ever.
 

MinisterJay

Administrator
Staff member
Administrator
Have you physically removed all unused assets? I actually do not use much of RTP, so I have very little of it that is in it when new games are created. This speeds game play and storage size considerably.
 

brandos

Villager
Xy$
0.00
@MinisterJay

I tried it by copying my project and reducing it to 10 maps, the folders included only the assets required for those ten maps, sadly the memory leak was still present.

@Soul

Thank you very much, I appreciate it and as I promised in the topic the reward is still available.
 
Top