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?
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?
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?
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 )


Add on ObjectB is overlapping ObjectA to the after the condition you already have.
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

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.
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
...
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![]()

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.