About the stated image memory usage

Discussion and feedback on Construct 2

Post » Thu Jul 10, 2014 1:44 pm

Since I don't know any efficient way to use sprite sheets from external files I tested an animation system on Node-Webkit that would load every animation frame from separate image file to Tiled Background. The image memory usage that construct gives seems very promising. Meaning it seems to release everything that isn't in use. Also the CPU usage isn't very high.

So my guestion would be that could there be some other memory issues using this method that are not so obvious or if for some other reason this would be really bad practice of doing things.
B
34
S
9
G
3
Posts: 517
Reputation: 5,226

Post » Sun Aug 24, 2014 3:46 pm

I just share my experiment so you have better idea. If someone tested on weaker machine it would be nice to know if there was any problems.
Basically everything should be in order and it should be possible to make smooth animations like here for example.
[PC] Lionheart - Legacy of the Crusader - Gameplay - Youtube

If you are not familiar with Node-Webkit you should put those image files to Construct 2\exporters\html5\node-webkit\win32\Images
or export the project and put them to the exe folder/Images
You do not have the required permissions to view the files attached to this post.
B
34
S
9
G
3
Posts: 517
Reputation: 5,226

Post » Sun Aug 24, 2014 3:59 pm

But what's the real difference between using this and normal sprite frame animations?
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Sun Aug 24, 2014 4:41 pm

@shinkan I made the image 256x256 to see the difference a bit better and on this method I got 11.73 Image memory usage with one object and when I loaded all of them to Sprite I got 16.55. So there would be advantage if there are a lot of animations like in isometric game for example. Also something I am interested is the possibility to make modding tools.
B
34
S
9
G
3
Posts: 517
Reputation: 5,226

Post » Sun Aug 24, 2014 5:18 pm

@Katala
5 mb's on one object is quite a lot actually. But it's still only tiledbg - only on this you can set different images to different instances, so no collision mask, no image points, crop etc. And loading an image which is in 50% transparent is still waste of memory - transparent background takes more than solid color fill.

But I do see, this can be useful for some background stuff... I just remembered how much I miss "Load image from URL" in Tilemap object :/
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Sun Aug 24, 2014 5:41 pm

Didn't know about the transparency taking more memory. Then again maybe it is quite hard to avoid without fine tuning every frame. I mostly thought using this on isometric games and not really much else. I would basically only need it to draw the player from normal map to isometric view so it would be only used for position and animation.
But I do see, this can be useful for some background stuff... I just remembered how much I miss "Load image from URL" in Tilemap object :/

I would like that as well.
B
34
S
9
G
3
Posts: 517
Reputation: 5,226

Post » Mon Aug 25, 2014 4:55 pm

Well turns out the stated image memory usage isn't reliable on this. Task Manager shows it just piling and eventually crashing.
B
34
S
9
G
3
Posts: 517
Reputation: 5,226


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests