• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Out Of Memory & File Corruption

R

redman

Guest
I've had a "Out of memory" error message while editing sprites in my game, which up until this point I have not received.

When I saved the game after this and I try to load it, it says: "Error Loading: File seems to be corrupted".

I have a back up of the game so that's not an issue. But I'm not able to continue to do anything it seems because of this "Out of memory" problem. The game save file is about 20mb right now. I'm using large sprite image files but Game Maker should be able to work with high quality sprites?

I have reinstalled the game and the same thing occurs. Any thoughts/solutions?
 

chance

predictably random
Forum Staff
Moderator
Without knowing anything about your computer and memory, and what other applications you typically have running in the background, it's hard to say much. I assume you've tried the obvious -- such as closing other applications. And I assume you used the Task Manager to see how much memory GM is using. Providing some of that information will help others diagnose what's going on.

Does this only happen during editing? Does it happen only with one particular sprite / background? If so, how large (dimension and file size) is it? Does the game run fine otherwise?

I'm not an expert in memory management, or the internal workings of GameMaker. I'm just curious, and trying to help you diagnose the problem.
 

Mike

nobody important
GMC Elder
If you can also include version numbers, machine specs, running memory totals etc. Also,if it's re-producible, then allowing us to see your project (via the help desk) so we can trap the error would make the world of difference.
 
R

redman

Guest
Without knowing anything about your computer and memory, and what other applications you typically have running in the background, it's hard to say much. I assume you've tried the obvious -- such as closing other applications. And I assume you used the Task Manager to see how much memory GM is using. Providing some of that information will help others diagnose what's going on.

Does this only happen during editing? Does it happen only with one particular sprite / background? If so, how large (dimension and file size) is it? Does the game run fine otherwise?

I'm not an expert in memory management, or the internal workings of GameMaker. I'm just curious, and trying to help you diagnose the problem.
It happens when I've edited a certain sprite which is around 5000x2000 (huge) and copied and paste a few of them in the same sprite to make a certain animation. I need to use these huge images because in my game the sprite grows over time and it needs to be high quality. Is Game Maker just not viable working with these huge images?
 

chance

predictably random
Forum Staff
Moderator
It happens when I've edited a certain sprite which is around 5000x2000 (huge) and copied and paste a few of them in the same sprite to make a certain animation. I need to use these huge images because in my game the sprite grows over time and it needs to be high quality. Is Game Maker just not viable working with these huge images?
I've made games with 5-6 background images that were 4000 x 600 each. These were PNG files, typically about 200 kB each. Not that large, memory wise. Never had any errors using Studio's built-in editor to modify them.

But I can't say I ever used a multi-frame sprite that's 5000 x 2000. It's hard to imagine why you'd ever need a sprite that large -- but that's beside the point. It shouldn't necessarily fail. So I'd follow Mike's advice and file a bug report with your project file and computer specs.

In the meantime, guess you'll have to use smaller sprites. Wish I could be more help.
 
R

redman

Guest
I've made games with 5-6 background images that were 4000 x 600 each. These were PNG files, typically about 200 kB each. Not that large, memory wise. Never had any errors using Studio's built-in editor to modify them.

But I can't say I ever used a multi-frame sprite that's 5000 x 2000. It's hard to imagine why you'd ever need a sprite that large -- but that's beside the point. It shouldn't necessarily fail. So I'd follow Mike's advice and file a bug report with your project file and computer specs.

In the meantime, guess you'll have to use smaller sprites. Wish I could be more help.
I need a sprite that large because in order for the sprite to grow from very small to very big, and remain high quality, is to start with the big image.. rescale it smaller in the game with a script and from there on out scale it bigger over time.

I'll try different things. Thanks! And if anyone has thoughts/solutions it's much appreciated.
 

Mike

nobody important
GMC Elder
Okay.... that's a bit on the nuts side. That's a huge amount of memory for an animation. That's like storing uncompressed Ultra HD video! Normally on large anims like this, you would have a large background image, then you'd have sprites or "sections" over it that move. If you want to change "everything" all the time, you should really be looking at playing a video.

Each "frame" of your animation is at least 38Mb of RAM (5000*2000*4 = 40,000,000 bytes), not to mention VRAM and System RAM copies, or trying to have more than one frame in memory at once. So you won't be able to resize these on the fly on a mobile device wither I'd imagine. It'll probably run out of memory long before that.
 
W

Wraithious

Guest
I'd say your animated sprite is way too large, id take each sub image and divide them into 6 seperate sprites and save them with equal number of sub images as your original sprite and run their animations in sync, identically scaled and align them with each other through code
 
Top