A memory scenario. What's happening?!

0 favourites
From the Asset Store
Memory game, with 10 levels for you to have fun. Made in Construct3, template available for purchase.
  • Yeah, monitoring arrays and memory usage at a more specific level is a huge pain, but I think there's some stuff you can do in Chrome's debugger.

    If you don't use arrays at all (I don't know what you mean by array behavior) then that's probably not the problem.

    As for SFX, I wish there was something I could tell you! Maybe import them at a lower quality (I have NO idea if that effects runtime memory usage or not), or try to use audio effects instead of subtle variations?

  • you could try making sounds mono instead of stereo, that would cut the filesize in half - although if it's a stereo sound then you won't want to do that.

    5 variations seems a bit overkill.. I've use sampled instruments that have less layers!

    Sounds like you need to budget out your sound palette and find a place where you can reuse sounds or cut out unnecessary sounds. 400MB for sound is pretty enormous...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think finer controls of memory loading of sfx or art assets is important. In this case, its to reduce the memory footprint, but also in the case of art, it will minimize stutters when a large art asset is required for the first time upon changing layouts. Preload & Unload (especially UNLOAD) should be goto for larger games, rather than asking people to use less sfx or art.

  • jobel Like silverforce is saying. Not having the option to unload assets and sound makes it impossible to make big games. Even if I did compress and reduce the file size somehow, I will still eventually hit a wall. That strategy is only viable if you're making a pea-sized game (that would still use more resources than necessary).

  • Even if I did compress and reduce the file size somehow, I will still eventually hit a wall.

    compression won't help you since the audio is uncompressed in memory. You can however lower the sample rate and/or use mono files wherever it's appropriate. i.e. if you have a gunshot sound that has no stereo image there's NO point in making it a stereo sound. And some less complex sounds will tolerate a lower sample rate without any artifacts etc..

    You should use 44.1/16bit anything else is a complete waste unless you are editing the sounds. "Mastered" sounds can be reproduced totally acceptable at 44.1/16 or even less in some cases.

    Not having the option to unload assets and sound makes it impossible to make big games.

    I disagree. I think limitations are found in any engine or even custom code bases. Every big game ultimately has an "audio budget" of what you can have in memory at a given time. However, I do agree there should be an unload option.. since most programming languages allow you to memset() and free() etc...

    But that said, you may want to reconsider the audio design for your game... a 0.5 second sfx saved as a .wav is roughly 100KB (could be more but for the sake of argument let's just say 100). To get to 400MB that means you have approx 4,000 sfx files... I can't imagine there is a game in the world using that many sfx files. Consider if you were to hire someone to create 4,000 sounds for you.. even with variation that's like triple-A type pay... Construct 2 is only $130! I'm just saying: remember the scope.

    I use and create sample-based instruments all the time, and that's the territory you are approaching... velocity layers and variations etc... even there, there are tricks to getting your entire virtual instrument into memory. You can use volume, filters and tuning via run-time software to effect the individual sounds making them more "real-like". by any chance is this a music game? (it would make a lot more sense)

  • jobel The 400 MB (rough estimate, might be other factors weighing in that I can't trace) is all the sfx/sound currently in the game. If I had access to a system that erases unused assets/sound, that amount could easily be reduced to something much, much less. That is beneficial regardless of scope. No game, even AAA would be able to run on underpowered consoles like PS3 or 360 without being able to discard unused material. I'm not worried about my budget over what's loaded in at the same time, it's the fact what's loaded in is permanent that worries me.

    I'm sure I can optimize it more, but that's not what I'm reaching out about. My point is that I won't only have to reduce the scope without a way to regulate assets and sound, it will be completely crippled if the entire game has to be loaded into ram by the time the player reaches the end...

    I doubt other engines work this way.

    Also I hope that the topic won't derail too much. I opened it due to frustration of the memory use growing endlessly when jumping between layouts, not over optimization over individual assets. I get this bad feeling that some art assets are never unloaded, or stay in a cache of sorts that only cleans itself when the memory use reaches ridiculous levels.

  • I'd be interested to know why we don't have many memory management tools - is it a limitation of HTML5 or is it on the to-do list?

  • If I had access to a system that erases unused assets/sound, that amount could easily be reduced to something much, much less.

    my point is, you don't have access to anything like that since it's a current limitation of C2. But there's no reason you can't still make a great game with awesome sfx. You shouldn't have to reduce the scope of your game you just have to figure a way to do it. Does your game really need that many sounds? I don't know anything about your game, but my guess is that you can find a way to make it work. However, if it is integral for your game to have that many sfx files then C2 is probably not the right choice for your game. I'm pretty sure GameMaker also restricts unloading sounds from memory. But I know you have more control over memory management in Unity for sure.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)