Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Is there any conceivable way to deallocate memory for objects at runtime without changing frames?
    IE, objects can be loaded only when needed by using the "Load on Call", but if a player drags out a single play session long enough they'd swamp their memory once everything is loaded
    I'm curious if theres any way to remove them from the cache to undo the loading-on-call, to free up that memory when objects aren't in use.

    With the current load on call option, whenever an object is first instantiated of that class, it loads all the graphics for it into memory
    But its never freed up until a frame switch, even if all objects of that type are destroyed.
    So is there any hypothetical way to free up memory, even through an extension given how MMF2's architecture works (I don't know if its feasible)

  • I'm wondering about this too. This is why I decided to segment my level into parts. When the player reaches the end of one segment, I have it jump to a black blank frame for deallocating memory, then immediately going back and loading the next level part. There isn't an noticeable delay and it serves as a nice screen transition.

  • Hrmm, the memory object looks like it only mallocs and writes and doesn't free(), but even if it did, how would you figure out which addresses to free?
    Sadly the way my game is set up, I couldn't switch to a buffer level except for very specific cutscenes

  • The memory object is not intended to be used for forcing code to relinquish memory. It is a very bad idea.

    Pixelthief, in my tests I cannot get memory to go up and stay up; when I delete objects the memory goes back down to its original usage. Could you give an example?

    Working as fast as I can on Fusion 3

  • Well, try creating a new blank .mfa, create an active object in it, and print screen your desktop and a few other pages into that objects animation's, maybe 5-10 frames of random shots
    Then set it to load on call and untick create at start
    Put code in it as:

    Press Space Bar: Create Object @ 0,0
    Press Control: Destroy Object


    now hit run, and look at your memory usage in the windows task manager. Mine shows up as 5100 kb before pressing space, 35060 kb after pressing space, and 35060 after destroying it.

  • Well, yes, because you're using load on call, aka lazy initialization. I think it will come down to asking Yves/Francois about adding a feature to deallocate early.

    Working as fast as I can on Fusion 3

  • Mmf3!

    Currently working on Please login to see this link..
    Creator of Faerie Solitaire, Stray Whisker, and Dungeon Dash. Known on TDC as AssaultAndy.
    Please login to see this link. | Please login to see this link.

  • =/
    Maybe I'll have to look into the feasibility of popping my game into another frame and back inbetween levels, but I'll likely just use the Ostrich Algorithm on this one, my game will probably take less than 200 mb of RAM even if you fully loaded everything. Trying to preserve the state of all player conditions, a 50 megabyte hardcoded array in Lua, four different magicdeque objects with huge lists, three arrays, and still have to reload all the data for elements I *didn't* want to eject from the engine- well I'll make a nice hole in the sand.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!