• 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!

3D Out Of Memory (How clean?)

D

Duran38

Guest
Hi boys, we are creating 3D Rpg game and creating so much 3d models inside game. (like 600-700) and so much using shaders.. etc
But Game maker 1.4 creating error "Out Of Memory". How can we clean memory? Any tips ?

thank you for all anwsers
 

Attachments

FrostyCat

Redemption Seeker
The best way to clean memory is to minimize your use of it in the first place.

Load only the models you are actively drawing, don't load in all of them at once. Watch where you are loading models and make sure you don't load the same one repeatedly. Have Task Manager open and watch for whether and when the RAM usage is climbing up without going back down.
 
H

Halph-Price

Guest
Hi boys, we are creating 3D Rpg game and creating so much 3d models inside game. (like 600-700) and so much using shaders.. etc
But Game maker 1.4 creating error "Out Of Memory". How can we clean memory? Any tips ?

thank you for all anwsers
That's actually kind of impressive... XD
 
I

icuurd12b42

Guest
I seen this error encountered on 2 cases
1) Happens when you allocated too much memory with data structures and forgot to free your ds. run the task manage and see if your game accumulates memory, the error happens around 1.6 GB of allocation and may take some time to reach that point during the course of running the program.
Check if you ds_XXX_create without freeing things.
It can also happen with using arrays. to free an array set the variable that holds it to 0

2) It's actually the GPU that ran out of space either for the (2A) textures or for the (2B) render buffer... Usually the error reported is more distinguishable as a gpu memory problem, but I have seen it reported misleadingly as a simple memory error. if that is your problem the crash would be (almost) instantaneous and the task manage would not show a lot of memory used.
-2A
- See if you surface_create() without calling surface_free() when done.
- See if you can reduce the texture page size in the game setting

2B
-You can split the render buffer by calling d3d_transform_set_identity() to split the draw batch, for example. if you have a loop that draws a ton of images or vertices, or if you have a loop that build a huge model, you may need to break it apart so each part draw before you run out of buffer space
 
D

Duran38

Guest
Your recommendations worked well thanks.
+ I just upload the models I'm close to.
+ I clean up many Array and DS_list.

That's actually kind of impressive... XD
If you dont have an idea, why are you undermining it? Just get away...
 
Top