User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: Falling sand example but without pasting into backdrop?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Falling sand example but without pasting into backdrop?

    Do anyone know how to make the effect in the falling sand example https://dl.dropboxusercontent.com/u/...andexample.mfa

    But without pasting the objects into backdrops?
    I want the sands to be actives all the time so if you would want to start moving them again you could, but they would also stack up like this if falling on each other.
    I tried to never paste them as backdrops but then they dont stack on top of each other. Do anyone know? https://dl.dropboxusercontent.com/u/...sandactive.mfa

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    284
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    In your example you aren't testing for overlapping between sand particles which is why they don't stack on top of each other. Despite noticing this issue, I still haven't figured out a way to solve your problem.

    Keep in mind that your program will have to check every particle of sand every 1/50th of a second to see if there is still an obstacle below it. If you can think of a way to limit this and only check when the sand actually needs to fall I'd definitely do it.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gkinfinity View Post
    In your example you aren't testing for overlapping between sand particles which is why they don't stack on top of each other. Despite noticing this issue, I still haven't figured out a way to solve your problem.

    Keep in mind that your program will have to check every particle of sand every 1/50th of a second to see if there is still an obstacle below it. If you can think of a way to limit this and only check when the sand actually needs to fall I'd definitely do it.
    Yes I tried to check for overlap but that just made them act strange, like stopping in midair.
    Maybe it would be possible to use some flag that turns on if a sand lands on the ground, then if a sand is overlapping a sand that has this flag on it also stops.. so sand only falls when it is not touching another sand that has its flag on.. i dont know. This mostly makes me confused. It should be doable though? I could maybe just use box2d instead but I really would want this to be compatiable with other runtimes besides exe and flash.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MMF's physics object should be able to do this for you. It can handling objects on top of objects and all of them constantly active to changes in their environment. Unfortunately it's an object I never could wrap my head around, it's a bit complex, but if you can suss it out it should be able to do all this for you.
    KnightTrek Productions
    http://www.knighttrek.com

  5. #5
    Clicker Multimedia Fusion 2

    Join Date
    Jul 2010
    Location
    Yonkers, New York, USA
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, that was beautiful, but I can see how it could get out of hand.

    The only thing I can think of is to find a way to detect clusters of grains in certain patterns. Then, delete all the grains in a cluster and replace them with an active object that looks like the cluster of sand. If the sand has to move again, replace the large active with the tiny ones again.

    There has to be some sort of limit in place or it will slow things down. Is this a vital part of the game? Is there anyway to make this look good through animation alone?

    Quote Originally Posted by Outcast View Post
    Do anyone know how to make the effect in the falling sand example https://dl.dropboxusercontent.com/u/...andexample.mfa

    But without pasting the objects into backdrops?
    I want the sands to be actives all the time so if you would want to start moving them again you could, but they would also stack up like this if falling on each other.
    I tried to never paste them as backdrops but then they dont stack on top of each other. Do anyone know? https://dl.dropboxusercontent.com/u/...sandactive.mfa

  6. #6
    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)
    Is there anyway to make this look good through animation alone?

    Hmmm, if the level is tile-based, and the tile slopes have set angles, it might be possible to make realistic animations portraying sand flowing from one tile to the next.

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    But basically it is not possible to do this exact things without using the paste to backdrop thing?

  8. #8
    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)
    Quote Originally Posted by Outcast View Post
    But basically it is not possible to do this exact things without using the paste to backdrop thing?
    Yes i would think it could be possible, but i believe the core problem her is the sheer number of
    A) Objects on screen ( Slowdown? Upper limit? )
    B) Collision checks per frame ( i think there actually is a limit to how many checks can be made at the same time, and the collision checks are demanding )

    Maybe an constant ForEach loop through the SandParticles might be feasable and work?
    If not allready on, using Box Detection instead of Fine Detection might improve performance also.

  9. #9
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by King_Cool View Post
    Yes i would think it could be possible, but i believe the core problem her is the sheer number of
    A) Objects on screen ( Slowdown? Upper limit? )
    B) Collision checks per frame ( i think there actually is a limit to how many checks can be made at the same time, and the collision checks are demanding )

    Maybe an constant ForEach loop through the SandParticles might be feasable and work?
    If not allready on, using Box Detection instead of Fine Detection might improve performance also.
    It would be nice to get it to work first, performance can come later

  10. #10
    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)
    Quote Originally Posted by Outcast View Post
    Yes I tried to check for overlap but that just made them act strange, like stopping in midair.
    Are you familiar with the built in 'Collision Mask Lag' problem?
    That is waht is causing them to float in mid air im 99,9% sure.

    The 'Collision Mask Lag' problem only happens with Object to Object collisions/ overlaps, not with Object to Backdrop.

    ...
    However ther is a nice solution to this.

    The Sand Particles are Pixels...
    What you need to do is, do custom 'Box Coordinate Collisions' ( or in this case even simpler, custom 'Single Pixel Collisions' ) instead of the built in collision system.
    This was there is no 'Collision Mask Lag' at all and collisions are pixel perfect and accurate.
    ...However this introduces another problem...

    'Instance on Instance Collision', how to differentiate between the instances...?
    Maybe this might not be a problem with the ForEach, i dont know i havent tried...

    However it is the 'Collision Mask Lag' which is the problem, assuming you are using built in collision/ overlap checks.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Falling sand example
    By happygreenfrog in forum Fusion 2.5
    Replies: 22
    Last Post: 6th January 2014, 11:51 PM
  2. Nivrams falling sand example
    By HadHaw in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 12th March 2013, 11:47 PM
  3. Falling Sand
    By nivram in forum File Archive
    Replies: 2
    Last Post: 15th July 2010, 08:19 PM
  4. Old falling sand example
    By nivram in forum File Archive
    Replies: 1
    Last Post: 14th May 2010, 07:01 PM
  5. Falling Sand
    By Novabrain in forum Extension Developers Lobby
    Replies: 5
    Last Post: 30th November 2007, 01:00 PM

Posting Permissions

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