User Tag List

Results 1 to 8 of 8

Thread: Screen refersh in MMF2

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Screen refersh in MMF2

    I want to force a 'screen refresh' via the event editor in MMF2, like this:
    Start of frame ( or anny condition ) ---> Refresh screen

    Is this possible in any way?
    Is it possible to make an extencion which does this?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    You could make the application go to full screen, then back to window view to simulate a screen refresh, or something. Maybe you could enable desktop view for the frame, then wipe out the frame black, or just restart the frame. I'm just trying some things from top of my head. :-/

    I don't know what else you would need a screen refresh for. Aren't these things automatic anyway?

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well its a bit complicated...

    Im trying to find a fix for the condition:
    ObjectA is overlapping ObjectB

    If both ObjectA and ObjectB move toward eachother and i do an overlap check like this:

    - Allways:
    set ObjA Ypos to ObjA Ypos +10
    set ObjB Ypos to ObjB Ypos -10
    - ObjectA is overlapping ObjectB:
    Action!

    The program does not take the new possition of the secound object ( ObjB ) intoo account when testing for the overlap between the two objects ( although they may clearly visually overlapp ).
    So an overlap check between ObjA and ObjB actually checks if ObjA is overlapping 'ObjB at its previous possition' wich is kinda silly and problematic imo
    ---
    I am pretty sure what i am saying is correct, i have created test applications to confirm it
    My main source is this tread:
    http://community.clickteam.com/showthread.php?t=50570
    ill just quote the bit that backs up my theory

    "When you do an overlapping condition, only the coordinates of the first object are the most recent ones. The coordinates of the second object must be updated by a screen refresh to be taken into acount at their new position."
    ---
    So if what this guy is saying is correct, a screen uppdate would uppdate the possition of the secound object ( ObjB ).
    So if i run a Screen uppdate from the event editor ( after i move the two objects, before the overlap check ), the overlap check would be for both the objects 'current' possitions.

    And thats why i want to be able to do a Screen Uppdate from the event editor, although im not 100% it will work, but i think its worth a try
    I hope that made sense
    ---
    @N64mario, i tried to go fullscreen and back but the prosess takes way to long ( Screen goes black a while )

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Add on ObjectB is overlapping ObjectA to the after the condition you already have.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Allready tried

    like this:
    - If ObjA overlap ObjB
    = Action!
    - If ObjB overlap ObjA
    = Action!

    and like this:
    - If ObjA overlap ObjB
    + If ObjB overlap ObjA
    = Action!

    Either way the secound objects current possition ( in each overlap condition ) still isnt accounted for

  6. #6
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is how MMF works, in-order to perform collision detection without an N*N lookup a static collision map must be build at the end of each framedraw.

    There are of-coarse numerous work-arounds; the most graceful of which simply involves collision detection before positioning.

    As for forcing frame-redraws... i have done this once in the past once; as part of a MISC VM implemented in MMF which had an instruction 'Yield'.

    The logic and timing was handled virtually and within an unbounded fast-loop; Yield simply ended the index-insensitive loop; to be restarted on the next frame.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did find another workaround myself kinda
    ...
    First iteration of the code, ObjectA moved and a overlap check
    Secound itteration of the code, ObjectB moved and a overlap check
    Third iteration of the code, ObjectA moved and a overlap check
    Forth itteration of the code, ObjectB moved and a overlap check... and so on

    This way the 'secund object' in the overlap check would allways be stationary and overlap detection precise
    Of cource, my application now ran twice as slow ( since i use two runthroughts of the code instead of one to move all my objects ) and movement of the objects looked broken.
    I simply fixed this by doubbleling the Framerate ( from 50 to 100 ) of my app, overlapps worked perfectly and everything looked good

    This worked fine for Objects A and B, but if i was to introduce other objects like ObjectC and ObjectD which also require precise overlap detection, i would have to

    First iteration of the code, ObjectA moved and a overlap check
    Secound itteration of the code, ObjectB moved and a overlap check
    Third iteration of the code, ObjectC moved and a overlap check
    Forth itteration of the code, ObjectD moved and a overlap check... and so on

    and also further increace the Framerate to bring the application upp to normal speed
    ...

    Quote Originally Posted by SEELE View Post
    As for forcing frame-redraws... i have done this once in the past once; as part of a MISC VM implemented in MMF which had an instruction 'Yield'.

    The logic and timing was handled virtually and within an unbounded fast-loop; Yield simply ended the index-insensitive loop; to be restarted on the next frame.
    Oerlap check before movement is a nice idea for a solution ( and so simple too ). Ill have to look further intoo that

    Interesting, so you 'have' done it
    i am however struggeling to understand your sentance explaining what you did to achieve this frameRefresh ( MISC VM? Handeled Virtually? Unbounded fast-loop? index-insensitive-loop? )
    Would you care to elaborate, if you dont mind? I would like to try and understand this

  8. #8
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A Transport Triggered - Minimal instruction Set Computing Architecture was selected for my Virtual Machine to simplify implementation.

    All you need to take away from that is that i made a 'virtual machine', which is simply a layer of abstraction above MMF2's event logic.

    Reasons you might use a virtual machine include; changing level and object behavior without modifying events inside MMF2,
    It's possible to handle game behavior in this way entirely inside a fast-loop which only terminates intermittently in-order to allow MMF2,
    to redraw the frame and re-sample the controls.

Similar Threads

  1. How to apply a MMF2 Screen Saver?
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th November 2012, 01:09 PM
  2. Will MMF2 HWA allow for direct changes to screen?
    By izac in forum Hardware Accelerated Runtime
    Replies: 8
    Last Post: 9th April 2010, 08:47 AM
  3. Dpi of screen appropriate for MMF2
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 24th April 2009, 09:59 AM
  4. MMF2 - Screen Display Issue
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 31st December 2008, 10:23 AM
  5. MMF2 - Screen Scrolling Problem
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 20th July 2008, 03:15 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
  •