Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Memory problem - I need some tips  (Read 6034 times)

0 Members and 1 Guest are viewing this topic.

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Memory problem - I need some tips
« on: April 27, 2013, 12:56:46 PM »

Hi

I know that I've created some time ago similar topic but this is serious issue and I must fix it.

Ok, assuming that WME has no any memory leak, there must be something wrong with my game. What I do:

When my game starts in first location, wme process is somewhere around 380MB. Then I'm going to next 5 locations and wme proces starts growing. After that I'm going back to start location. I did nothing, only walking. So I'm back at the start location and wme process is somewhere around 510MB... It's not droping. Why?

I was looking through my scripts and everything looks ok. Where should I look for this problem? Maybe some variables but which? Definitely there is a problem. If it's not some wme memory leak than there is my bug. I'm fighting with this problem for few days without any success. How can I find this bug, how can I fix it. My game is 2d point'n click. I desperately need help and sorry for my english, it's not my native.
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Memory problem - I need some tips
« Reply #1 on: April 27, 2013, 04:54:25 PM »

Is there any objects (entities, windows etc) that you creates dynamically? Scripts that dynamically attaches? Is memory grows in time when you change locations?
If the system doesn't change its state, memory growing couldn't be explained more, except as special allocation of it.
Maybe something causes when character walks (or makes any other action including idle). Is the scene objects has actions?
« Last Edit: April 27, 2013, 05:05:51 PM by 2.0 »
Logged

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: Memory problem - I need some tips
« Reply #2 on: April 27, 2013, 05:22:14 PM »

Is there any objects (entities, windows etc) that you creates dynamically? Scripts that dynamically attaches?
No
Is memory grows in time when you change locations?
that's right. I'm in location A and WME process has 370MB, I'm changing scene to location B and WME process is now 430MB. So I'm going to location A and now WME process is 390MB and in this location should be 370MB. Where is 20MB ??? And when I'm going through another locations it still growing. After ~20 min of playing WME process has something around 600MB. It's bad.
Is the scene objects has actions?
no
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Memory problem - I need some tips
« Reply #3 on: April 27, 2013, 05:53:07 PM »

It is difficult to tell, without seeing sources.
Try to remove some game components one by one (actors, scene scripts etc.) and look if situation changes.
« Last Edit: April 27, 2013, 05:54:47 PM by 2.0 »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Memory problem - I need some tips
« Reply #4 on: April 27, 2013, 06:02:20 PM »

Try executing this command:

Code: WME Script
  1. Game.DumpTextureStats("c:\textures.csv");
  2.  

It will export all loaded textures to the specified file. That should give you some pointers into what eats most memory. Typically textures consume the largest portion of memory, unless something is going terribly wrong.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: Memory problem - I need some tips
« Reply #5 on: April 27, 2013, 10:59:00 PM »

Mnemonic: checked. There is no any anomalies with textures...
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: Memory problem - I need some tips
« Reply #6 on: April 27, 2013, 11:25:55 PM »

Curious thing I've discovered. When I got "Use Direct3D 9" set to no my game start with WME process which has 380MB but when I set "Use Direct3D 9" to yes then WME process at the beginig has 510MB. Why is that?
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: Memory problem - I need some tips
« Reply #7 on: April 29, 2013, 10:34:06 AM »

Fixed but I don't know exactly what was wrong. Now I got WME process somewhere around 500 - 650 MB and it's not growing. I've decided that I will fix this problem in near future and I started to do the game again. The problem solved itself - don't know how...
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Memory problem - I need some tips
« Reply #8 on: April 30, 2013, 09:23:09 PM »

By the way, what resolution of your game? What size or the textures? It seems to me that the volume of occupied memory in 500-600 Mb is a bit too much (if it is the size displayed in a task manager).
Logged

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: Memory problem - I need some tips
« Reply #9 on: April 30, 2013, 09:27:42 PM »

project manager is set to 1280 x 720 but in game backgrounds are 1600 x 900. Because every screen has scroll.
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Memory problem - I need some tips
« Reply #10 on: April 30, 2013, 09:30:31 PM »

Yes, it is not too small. And maybe some sprites have parameter "Keep in memory" enabled?

project manager is set to 1280 x 720 but in game backgrounds are 1600 x 900. Because every screen has scroll.
Logged

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: Memory problem - I need some tips
« Reply #11 on: April 30, 2013, 11:12:33 PM »

And maybe some sprites have parameter "Keep in memory" enabled?

No :) that was first thing to check.
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula
 

Page created in 0.023 seconds with 24 queries.