Legacy GM File size limits loaded to memory

F

Facet

Guest
Hello

I'm creating some kind of open world engine and here some problems with file loading. However this is barely noticeable, but loading chunks is some problem and I decided to load it less frequently, bigger file to memory with many chunks stored in one map.

Now I have single chunk file ~170kb and game stops for a while - really short while, maybe 0.1 sec but visible.

My question. I'm targeting my game to Windows and not top machines with memory less than 4GB. Game itself need memory of course, used assets, instances, backgrounds and this question is not "smart" enough, but anyway, maybe some directions I can get from more experienced users. How big file can I store in memory? Let's say, for example game will be using 3GB of memory - just guessing now. Can I load 1GB file???

Thank you, any help appreciated :) ++

ps. Now I'm loading/saving every needed chunk and I see much less than 1s fps drop. This can go in 3D games, but my game is top down and breaks like this are much noticeable.
 
Q

Quackertree

Guest
You shouldn't think about the biggest possible, you should try to keep it as small as possible.

GM:S is actually very limited when it comes to memory usage - There are some set restrictions in the engine which limit it to "not all that much" (don't know the exact values). This means you won't be able to access the full 4GB available at, even the worst, computers nowadays. You wouldn't be able to access the full 4 gig anyway, since other apps are probably already taking up that space.

You can probably assume 200MB as a good maximum. That should work out just fine. Once again, remember to keep it as small as possible; That's always the best solution.
 
A

anomalous

Guest
Have you looked at buffers? Read up on them, then google for any posts on how to use buffers/write/binary type things.
Its not that hard, you just have to be strict on exactly what bits of data go where, and their type.
I think it will be much smaller and faster, maybe even fast enough as-is.
Also, they have load/save async functions, so if that's not fast enough, maybe you can do it async?
 
F

Facet

Guest
Have you looked at buffers? Read up on them, then google for any posts on how to use buffers/write/binary type things.
Its not that hard, you just have to be strict on exactly what bits of data go where, and their type.
I think it will be much smaller and faster, maybe even fast enough as-is.
Also, they have load/save async functions, so if that's not fast enough, maybe you can do it async?
Thank you for direction. In early stage I had buffers based chunk loading, but for some reason I changed it, I will study it again. I worked on sample, where in buffer was saved/loaded simple values only, integers, where I have to save/load whole ds_maps. But I will google how to join it, buffers and ds_maps.
Thank's
 
Top