User Tag List

Results 1 to 10 of 10

Thread: End of Frame Problems

  1. #1
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    DizzyDoo's Avatar
    Join Date
    Oct 2006
    Location
    South England
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    End of Frame Problems

    Whenever my game is closed, I need a temporary directory (full of files that have been created over the course of the game running) deleted. These are my events, covering every possible "End of":



    The problem is that the emptying/deleting (both probably isn't necessary) only happens some of the time, which is not good enough. I need these events to trigger every time the game closes.

    How can I make this event fire everytime and however the game ends?
    Cranktrain - Currently finishing a new game called The Cat Machine!
    @MattLuard on Twitter.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall CreatorUnicode Add-on

    Join Date
    Jul 2006
    Posts
    1,017
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: End of Frame Problems

    I think it's (nearly) impossible. Correct me if I'm wrong...

  3. #3
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    DizzyDoo's Avatar
    Join Date
    Oct 2006
    Location
    South England
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: End of Frame Problems

    I'm sure it isn't impossible. It's just simply deleting a directory. Some ideas from the Gwerdy chat:

    • Create batch file, or second application to run invisibly after the game ends to do the clean up. Not particularly ideal, I'd rather just do it in the game as it quits.

    • Run a counter/global value down when the user quits, so the program has more time to delete files. Doesn't make any difference, the temp folder is either deleted immediately, or it isn't at all.

    I'm wondering if there is a problem with Sphax's File/Folder object, it seems so random in its success rate here. I would like to try using the File object, but I don't know how to iterate through the subfolders within the temp directory, in order to delete all the files, everywhere (which the File object requires.)

    Any other ideas?
    Cranktrain - Currently finishing a new game called The Cat Machine!
    @MattLuard on Twitter.

  4. #4
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    DizzyDoo's Avatar
    Join Date
    Oct 2006
    Location
    South England
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: End of Frame Problems

    The problem seems much more complex than it did before.

    I went and wrote the equivalent of the Delete Folder with the File Object (using looping and the Tree object to iterate). I get exactly the same sometimes deletes, sometimes doesn't result.

    Thing is, for Stephen1980 and Jacob, they both have no problems with the Delete Folder action. What is it about my machine that could affect this?
    Cranktrain - Currently finishing a new game called The Cat Machine!
    @MattLuard on Twitter.

  5. #5
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: End of Frame Problems

    Quote Originally Posted by DizzyDoo
    The problem seems much more complex than it did before.

    I went and wrote the equivalent of the Delete Folder with the File Object (using looping and the Tree object to iterate). I get exactly the same sometimes deletes, sometimes doesn't result.

    Thing is, for Stephen1980 and Jacob, they both have no problems with the Delete Folder action. What is it about my machine that could affect this?
    did you try refreshing the folder with f5?

    it probably won't help but quite often with mass deletions i sometimes do, windows occasionally won't update the folders and show a lot of file icons that technically no longer exist

    EDIT: maybe windows/mmf still had handles for those files for some reason and skipped deleting them because of that

  6. #6
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    DizzyDoo's Avatar
    Join Date
    Oct 2006
    Location
    South England
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: End of Frame Problems

    Yeah, refreshing doesn't work. Even a restart won't shift them.

    xyzzy, as for the MMF2/Windows using them, I now think this is the reason, the application deletes those files fine if they were created by a previous execution of the application, but usually has problems with deleting them if they were made that execution.

    Checking the errors that the file object kindly gives me, I do see that whenever it fails I get an error 13, which according to the help docs means: "Permission denied"

    The objects are indeed being used by the application, by easyXML, Scintilla and the Animated Picture object. I have tried to delete these just before closing, but the problem still remains.

    How can I remove the handles for the files so I can delete them cleanly?
    Cranktrain - Currently finishing a new game called The Cat Machine!
    @MattLuard on Twitter.

  7. #7
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: End of Frame Problems

    Run an invisible app, close, the invisible app waits for close and for 2 secs, then it deletes the files and, once the files have been deleted, close the invisible app.
    Working as fast as I can on Fusion 3

  8. #8
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,459
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: End of Frame Problems

    Write an "on start of frame" to delete the directory, if present, and then to create the temp directory. (This is to ensure an empty directory in case of computer lockups for example where the directory is still present after a restart.)

    (Application uses the directory and then deletes the directory based on your code.)

    Write an event to shut down the application if the directory is missing "and" the shut down button was clicked.

    The removal of the directory becomes the event that then triggers the shut down along with a button click.

    Some like this anyway.

  9. #9
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: End of Frame Problems

    Quote Originally Posted by droberson
    Write an "on start of frame" to delete the directory, if present, and then to create the temp directory.
    What if the app is still running and hasn't finnished closing yet? :p
    Working as fast as I can on Fusion 3

  10. #10
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    DizzyDoo's Avatar
    Join Date
    Oct 2006
    Location
    South England
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: End of Frame Problems

    Thanks for the suggestions, but I've found the problem lies with the Animated Picture object 'not letting go' of the .pngs that it opens, despite using the 'Uncache all' action. Files can't be deleted if another program is using them. Have sent a PM to Daniel Rehn, hopefully we can sort it out.
    Cranktrain - Currently finishing a new game called The Cat Machine!
    @MattLuard on Twitter.

Similar Threads

  1. How do I do correct aspect fullscreen with 336x224 frame.+Ult.fullscrn obj. problems
    By ezzypixel in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 29th August 2013, 09:17 PM
  2. Character Image and frame rate problems.
    By Bigfoot in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd February 2011, 03:47 PM
  3. Game play AND frame problems
    By HyperspazzMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 2nd July 2010, 03:12 AM
  4. Follow Frame Option Problems
    By aussiedave in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th October 2006, 08:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •