Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hello- Over the past few months I have been creating lots of super awesome crazy behavior scripts for my game. I noticed a while ago that if I leave my game running for 20+ minutes.. it will eventually completely freeze, and give me an 'out of memory' error. At first I thought it was my screensaver that was causing it, but no… it appears to happen if I have multiple behaviors running at the same time. I was able to reproduce the error by doing the following: First I create a simple cube in the editor that constantly moves in one direction on all 3 axis. Then I create a second cube and attach this behavior to it:
This function is extremely simple, it only has 2 active lines in it, and when attached to an object, all it does is "follow" any object that you select. So I tell this second cube to follow the first cube. Now I create a third cube, attach the same behavior, and tell it to follow the second cube. I repeat this process until I have 60 cubes. It will then look exactly like this. http://www.timiscool.net/cubes.h... This appears to be working as it should in WebGl. But if I make an .APP or .EXE version of it, it will freeze up and give me the 'out of memory' error. With 60 cubes, it freezes up within less than 2 minutes. The more cubes add, the quicker the 'out of memory' error occurs. And the less cubes I have, the longer it takes to occur. I guess my question is: Am i doing something wrong in my code? Or is it a bug in CopperCube? Why does it work in WebGl but not on Mac/Windows? I appreciate any and all advice. |
||||
|
Hm, difficult to tell, it could be that you have a memory leak somewhere in the code, and the browser engine can collect that while the windows exe version cannot. Can you maybe send me the .ccb so I can try and look at this? |
||||
|
as you wish, sir. |
|