User Tag List

Results 1 to 8 of 8

Thread: Collision Mask?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Collision Mask?

    Hi, just wanted to ask if it's possible to create a collision for an active / backrop mask via picture (black = no coll. ; white = coll.)
    In my map editor there's a built-in tile editor, it works fine, but collision mask would be so nice, e.g. if you have a tile with bumpy suface, you would walk up and down a few pixels.

    I had the idea to create to actives/backdrops, one with collision, one without. I think that's the only way possible. Maybe that's possible to rule with Overlay, but I don't know how!

    Thanks for each answer.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Mask?

    The Overlay was intended for things like this, so you can detect when your player is over certain types of 'zones' - though I'm not sure how to use it, or how to translate your map layout directly into the mask.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Collision Mask?

    I'm not sure either, and I don't think I want it that way.
    Well, what's about this idea (I think it's pretty slow):

    You load the tile graphic into an overlay.
    You load the tile coll. mask into another overlay.

    with 2 loops, you compare the pixel colors of the collisionmask-overlay.

    if black at XY > write current color of graphic-overly (XY) into another overlay. ("no collision")
    if white at XY > write current color of graphic-overly (XY) into another overlay. ("collision")

    You save both overlays.
    You load both pictures in two different actives (Load Frame..).
    You add a backdrop of both actives, but only the one with the "collision" picture is an obstacle.

  4. #4
    No Products Registered

    Join Date
    Jul 2006
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Mask?

    No there is nothing like this currently in MMF2. It would be possible to create a system that does what you said above using MMF2 events, but it would be so slow it would be unusable.

    If you want to make a collision mask for an object, you need to make a separate object, make it invisible, then always position your graphical sprite relative to it. It isn't the easiest system to use in the world, especially when it comes to linking multiple instances of your graphical sprite and collision object.

  5. #5
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Collision Mask?

    Don't forget animations

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Collision Mask?

    Ok, thanks.
    @Andos: Well, you're right, but I didn't want to implement animated tiles - fortunately.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

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

    Re: Collision Mask?

    Vector based collision masks in MMF would be nice..

  8. #8
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Mask?

    My Game uses a desert scenario, so you come accross dunes and grass and other minor abstacles. Since the time is limited on those "maps" I want the player to penalize if he moves over those objects be decreasing speed.

    My Tiles are 32x32, and I created an Array based on a 4x4 Tileset.

    When the Player moves I compare the current X Y to the Array and penalize his speed according to the value.

    So on a Sand Tile its like

    Code:
    0,0,0,0,0,0,0,0
    0,0,0,0,0,0,0,0
    0,0,0,0,0,0,0,0
    0,0,0,0,0,0,0,0
    0,0,0,0,0,0,0,0
    0,0,0,0,0,0,0,0
    0,0,0,0,0,0,0,0
    0,0,0,0,0,0,0,0
    on a Dune tiles it looks like this:

    Code:
    0,0,0,0,0,0,0,1
    0,0,0,0,0,1,1,0
    0,1,0,0,1,2,1,0
    0,1,1,2,3,2,0,0
    0,0,2,3,3,2,1,0
    0,1,2,2,2,1,0,0
    0,2,1,1,0,0,0,0
    1,0,0,0,0,0,0,0
    0 = speed * 1
    1 = speed * 0.75
    2 = speed * 0.60
    3 = speed * 0.40

    Also when hit a 2 and 3 value field the character bumps 1 and 2 pixels up.

    So far I see no speed issues at all with this.

    I can disable it at runtime any time and see no difference.

Similar Threads

  1. Collision Mask Help?
    By Eliyahu in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 3rd April 2011, 07:24 PM
  2. collision mask problem
    By Tritten in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 14th May 2010, 05:23 AM
  3. collision mask
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 25th October 2009, 08:13 PM
  4. Bug: Collision mask
    By Sphax in forum File Archive
    Replies: 0
    Last Post: 11th August 2006, 01:48 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
  •