Nifflas' Support Forum

Released Games => Knytt Stories => Topic started by: Miyako on January 16, 2010, 12:04:35

Title: Knytt Stories - Memory leak? Maybe?
Post by: Miyako on January 16, 2010, 12:04:35
Well.. Look for yourself. I think Drakkan might be the cause.

I say we rise against all Dragons, they are clearly too powerful for Knytt Stories.

Or maybe its the Fairies..

http://sai.lpchip.com/v/ksmemleak.ogv
Title: Re: Knytt Stories - Memory leak? Maybe?
Post by: LPChip on January 16, 2010, 12:16:23
I believe Drakkan uses a lot of custom content, like tile sets/music/ambiances. The game pre-caches everything which raises the memory load. I think this is normal behaviour.
Title: Re: Knytt Stories - Memory leak? Maybe?
Post by: Miyako on January 16, 2010, 12:22:44
Yeah its quite severe though, expecially compared to a better level in my opinion. There has to be something thats causing the overload. There isnt much in Frozen Mountain that isnt in Monster and theyre like 150mb in the difference.
Title: Re: Knytt Stories - Memory leak? Maybe?
Post by: LPChip on January 16, 2010, 13:02:17
If you look at the size of the levels, are they equal too? I bet Drakkan's level is huge in size, where Monster isn't.
Title: Re: Knytt Stories - Memory leak? Maybe?
Post by: Miyako on January 16, 2010, 13:13:58
Is every single block preloaded? That might explain it.
Title: Re: Knytt Stories - Memory leak? Maybe?
Post by: LPChip on January 16, 2010, 13:58:38
Is every single block preloaded? That might explain it.

I do know a lot is preloaded. Nifflas explained it was the only way.
Title: Re: Knytt Stories - Memory leak? Maybe?
Post by: Looki on January 16, 2010, 17:10:35
All room data is are preloaded, but the tilesets and gradients are loaded when they're needed.
Title: Re: Knytt Stories - Memory leak? Maybe?
Post by: Exp HP on January 16, 2010, 22:06:04
All room data is are preloaded, but the tilesets and gradients are loaded when they're needed.
This I can confirm; all custom content is loaded when needed. If you edit a tileset/background image in the middle of playing a level, your changes will show up when you leave and reenter the room.  Same goes with ambiance and music.  On the other hand, for level data changes to show up, you must start up a new game window.
Title: Re: Knytt Stories - Memory leak? Maybe?
Post by: minmay on January 16, 2010, 23:19:42
Are the tilesets and gradients un-loaded when they're no longer needed?  If not, that sounds like a leak to me.
Title: Re: Knytt Stories - Memory leak? Maybe?
Post by: Miyako on January 17, 2010, 13:09:29
All the stuff you said is covered in the video :p
Title: Re: Knytt Stories - Memory leak? Maybe?
Post by: Nifflas on January 19, 2010, 17:04:18
Yeah, it's a memory leak. Knytt Stories uses an old version of the Animated Picture extension. I detected the leak during the creation of Saira, and contacted the author of the extension who fixed it instantly. I forgot to update Knytt Stories though. I guess it's time for another update soon, I guess it's a good idea to add the proportional full screen mode at the same time which is new to a recent build of MMF2.

This should only be related to the custom objects though. Custom music, tilesets, and gradients shouldn't suffer from this problem unless there's a problem with Multimedia Fusion 2.