• Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!

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

Member
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.
 

Halph-Price

Member
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
 

icuurd12b42

TMC Founder
GMC Elder
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