Memory usage through the roof
by amaranthia · in Torque Game Builder · 01/12/2007 (11:33 pm) · 11 replies
My game has lots of graphics, and right now my in-memory usage is around 300 MB. I've double-checked and this seems to have nothing to do with my music (I completely removed it and commented out the code to test). From my perspective, it looks like this problem is due to all of the imageMaps that I'm using.
What can I do to cut down my memory usage? I seriously need to get this down to about 25 MB to ensure this game can run on most computers. Here are some things I've tried:
1) Turned preload off for all image maps
2) Turned allowUnload on for all image maps
However, no change has resulted & I am unable to play the game on my three-year old test computer.
I've checked out the PDF on imageMaps. Maybe I'm missing something obvious? Any help would be much appreciated.
What can I do to cut down my memory usage? I seriously need to get this down to about 25 MB to ensure this game can run on most computers. Here are some things I've tried:
1) Turned preload off for all image maps
2) Turned allowUnload on for all image maps
However, no change has resulted & I am unable to play the game on my three-year old test computer.
I've checked out the PDF on imageMaps. Maybe I'm missing something obvious? Any help would be much appreciated.
#2
01/13/2007 (5:39 pm)
I redid the routine that calls graphics, and that cut the memory usage down to about 80 MB. Still high, but not nearly as bad as it was before. My next problem is CPU usage. On my test computer, CPU is at 98%, but only 10% on my dev computer. Any idea what could be causing the disparity? I'm guessing that it has something to do with video support?
#3
I'm a little curious of how you did for reducing memory usage with graphics.
Because I have the same problem (allowunload change nothing).
Edit : Ah, you already answer that here : http://www.garagegames.com/mg/forums/result.thread.php?qt=56160
Anyway, Thanks ^^
01/13/2007 (9:03 pm)
For CPU usage, normally it would be 100% for all the computers, that's strange.I'm a little curious of how you did for reducing memory usage with graphics.
Because I have the same problem (allowunload change nothing).
Edit : Ah, you already answer that here : http://www.garagegames.com/mg/forums/result.thread.php?qt=56160
Anyway, Thanks ^^
#4
The CPU jumps on computers that don't have support for openGL or D3D. 30% of my beta testers do not have video cards that support the requirements. Why is this a problem? Casual gamers are not hard-core gamers and are probably playing games on computers that were not built for gaming.
Is there a solution to this problem? Or do I accept the loss of 30% of my casual game audience? Has anyone figured out a viable way to move from D3D to DDraw?
01/14/2007 (11:54 am)
I understand what's going on now, and I'm really bummed out.The CPU jumps on computers that don't have support for openGL or D3D. 30% of my beta testers do not have video cards that support the requirements. Why is this a problem? Casual gamers are not hard-core gamers and are probably playing games on computers that were not built for gaming.
Is there a solution to this problem? Or do I accept the loss of 30% of my casual game audience? Has anyone figured out a viable way to move from D3D to DDraw?
#5
3D rendering needs 3D hardware or needs to do all on CPU.
All you can do is not use any / many 3D hardware effects.
-> small pictures, no smoothing, no alpha, not change of color on sprite etc etc
That would reduce the workload for those systems.
That is all stuff that is actually not possible with 2D rendering, which is why its impact for non 3D systems can totally kill the experience.
Systems sold the last 2-3 years shouldn't have any problems at all.
Systems 6 years old, that did not meet any gaming requirements back then hardly ever assume that they are able to play anything from today ... it just would not be anywhere near realistic to assume to play current stuff with 10 years+ old tech (thats what 6 year old office hardware is I fear)
All you could do would be switch to a totally different dev environment that does not use any 3D acceleration at all. But that would run worse on real systems with 3D support as current gen hardware has no acceleration of 2D stuff. It most likely runs fully on CPU.
01/14/2007 (12:46 pm)
There is none.3D rendering needs 3D hardware or needs to do all on CPU.
All you can do is not use any / many 3D hardware effects.
-> small pictures, no smoothing, no alpha, not change of color on sprite etc etc
That would reduce the workload for those systems.
That is all stuff that is actually not possible with 2D rendering, which is why its impact for non 3D systems can totally kill the experience.
Systems sold the last 2-3 years shouldn't have any problems at all.
Systems 6 years old, that did not meet any gaming requirements back then hardly ever assume that they are able to play anything from today ... it just would not be anywhere near realistic to assume to play current stuff with 10 years+ old tech (thats what 6 year old office hardware is I fear)
All you could do would be switch to a totally different dev environment that does not use any 3D acceleration at all. But that would run worse on real systems with 3D support as current gen hardware has no acceleration of 2D stuff. It most likely runs fully on CPU.
#6
Basically, you have a dichotomy split in your target market, and there really isn't anything you can do to get by it--it's a producer decision on what is acceptable across the split, and who is the more important side.
When TGB was initially put together, it was based on TGE, which of course required 3D hardware capability. When it was brought in house as a product, this requirement was reviewed, and basic market analysis indicated that a large majority (more then the 70% your numbers indicate, for what it's worth--not that your numbers are "wrong" or anything, just telling you our decision process) of expected target computers would have some form of hardware acceleration.
The decision was made to press on with the requirement since it gives us the ability to do so many things we couldn't do without the requirement, and those "lacking" would for the most part just suffer a performance hit.
Just for the record, TGB doesn't in any way require a computer rig that a "hard core gamer" would have. 3D Acceleration is, like Marc said, really, really old (almost 9-10 years now) technology...I know that doesn't help your specific situation, and I wish there was something we could do to make it easy....but 10 years of hardware advances is just about impossible to be able to support and still have a product that can do much.
01/14/2007 (1:34 pm)
Marc pretty much summed it up.Basically, you have a dichotomy split in your target market, and there really isn't anything you can do to get by it--it's a producer decision on what is acceptable across the split, and who is the more important side.
When TGB was initially put together, it was based on TGE, which of course required 3D hardware capability. When it was brought in house as a product, this requirement was reviewed, and basic market analysis indicated that a large majority (more then the 70% your numbers indicate, for what it's worth--not that your numbers are "wrong" or anything, just telling you our decision process) of expected target computers would have some form of hardware acceleration.
The decision was made to press on with the requirement since it gives us the ability to do so many things we couldn't do without the requirement, and those "lacking" would for the most part just suffer a performance hit.
Quote:
Casual gamers are not hard-core gamers and are probably playing games on computers that were not built for gaming.
Just for the record, TGB doesn't in any way require a computer rig that a "hard core gamer" would have. 3D Acceleration is, like Marc said, really, really old (almost 9-10 years now) technology...I know that doesn't help your specific situation, and I wish there was something we could do to make it easy....but 10 years of hardware advances is just about impossible to be able to support and still have a product that can do much.
#7
I really love TGB, btw. I can't believe how quickly I was able to create a game with it. :)
01/14/2007 (2:22 pm)
Ahhh! Okay, thanks guys! I'm using some of the effects mentioned. I'll remove them and see if that helps. I really love TGB, btw. I can't believe how quickly I was able to create a game with it. :)
#8
01/15/2007 (11:20 am)
Well, it looks like another user cannot play the game. She's using Windows 2000 on a laptop. She get's the following error when she tries to load the game: "Unknown software exception" (0xc000001d)
#9
If you own the source version, you could build a debug version of TGB to see if it fires more usefull errors.
But just to make sure: did she try to start the game in fullscreen? Or did she switch desktop colordepth to 32bit when in windowed?
Reason is that old hardware was only able to use 3D acceleration in window in 16bit. So either fullscreen (very adviced in this situation as those cards perform really bad in windowed mode) or a supported depth would be needed.
And in case this was not done so far: Switching driver to DirectX in the prefs could help, as this makes a large difference on notebooks without ATI / NVidia.
01/15/2007 (11:53 am)
Thats a little not-much saying error.If you own the source version, you could build a debug version of TGB to see if it fires more usefull errors.
But just to make sure: did she try to start the game in fullscreen? Or did she switch desktop colordepth to 32bit when in windowed?
Reason is that old hardware was only able to use 3D acceleration in window in 16bit. So either fullscreen (very adviced in this situation as those cards perform really bad in windowed mode) or a supported depth would be needed.
And in case this was not done so far: Switching driver to DirectX in the prefs could help, as this makes a large difference on notebooks without ATI / NVidia.
#10
01/16/2007 (11:42 am)
Another problem is that Microsoft is no longer supporting 2000. In a way you are possibly going to force these people (very casual gamers) to upgrade their hardware and software. I know it is tough for some people to afford doing this but if they want to start playing any game in the future they will have to upgrade somewhat.
#11
01/17/2007 (2:49 pm)
You might want to see if her laptop has an Intel Extreme graphics chipset. Not only are the OpenGL drivers for that chipset absolutely dire, but the chipset has a tendency to crash applications that query the current vsync state in OpenGL. I ran into this problem with a game that I was writing. Some Intel Extreme chipsets will crash if you try to query the driver for OpenGL extension information, as well.
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft
But this texture most likely won't work on those computers.
So what you will need to do is different sizes of the textures for different quality levels.
For old computers, use 128x128 and 256x256 textures, for new computers 1024x1024