User Tag List

Results 1 to 8 of 8

Thread: How can I add collison mask on a png?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro

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

    Question How can I add collision mask on a png?

    Hello ,
    I hope the clickteam community is fine

    I'm working on a little top down view game.
    As I'm not an artist , I use ( for one scene ) a png file as a backdrop and my character ( standard fusion library warrior ) walks around on this backdrop.
    How can I create collision zones on the png backdrop so my character doesn't bump into tables, trees ,which ARE NOT ACTIVE OBJECTS BUT PART OF THE BACKDROP PNG ?

    I have read some posts ont the forum but they seem to apply to platform games, which is not relevant ( I think ) in my case.
    A lot of users also mention "detectors" but once again I don't think they'll help for a backdrop.

    I was thinking of creating some invisible clone of the backdrop ; on this clone obstacles ( trees , tables, ) would be identified : but how ?

    Thanks for your help !

  2. #2
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,008
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    You can create masks which are objects the size of the objects cut out and hidden at runtime. You can then use these for collision detection in-game.
    Want to learn Clickteam Fusion 2.5?




  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Aug 2006
    Posts
    540
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your answer ! So I guess I was in the right direction...
    Could alpha channels be used to achieve that ? ( I only have the most basic knowledge of alpha channels , if someone can point me in the right direction thanks !

  4. #4
    Clicker Fusion 2.5Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    786
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    Either make backgrounds objects that you click the checkbox to make invisible or make active objects that u set an event "player collides with object" movement stop.

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Aug 2006
    Posts
    540
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks zip2kx for the suggestions. The easy way was to make active objects , but I have just one global png file for one scene , not separate files for objects like tables , trees... maybe I'll cut the png file into different parts and make those active.
    By the way , House cleaner looks very nice , well done and good luck with this !

  6. #6
    Clicker Fusion 2.5Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    786
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    Thanks Rickman for the nice words

    Yeah you can either cut up the PNG (which is probably the smart thing) or you make new Active objects that you hide, this can be a useful aproach if you want detailed/different shapes on your Graphics while your hitboxes keep simple forms. Good luck !

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Aug 2006
    Posts
    540
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks again !
    Now back to House Cleaner ... I was just thinking , since your game includes slow motion , have you inserted a level or scene where the slow motion works AGAINST the player ? Could be fun ! ( maybe the idea is not original at all, it just crossed my mind so I thought I could share it just in case.)

  8. #8
    Clicker Fusion 2.5Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    786
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    I havent implemented it but there's a plan to make an enemy that slows down the world and he's the fast one and some tricks like that. But let me finish up the core game first haha.

Similar Threads

  1. Rectangular Mask?
    By gkinfinity in forum Shader Development
    Replies: 3
    Last Post: 10th March 2015, 12:58 AM
  2. Mask pixels
    By kinase in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 9th February 2012, 05:31 PM
  3. creating collison
    By life2searching in forum XNA Export Module Version 2.0
    Replies: 1
    Last Post: 7th September 2011, 08:37 AM
  4. Corner collison?
    By MostDreaded in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 1st January 2011, 08:23 PM
  5. Movment and Collison
    By Ebola in forum File Archive
    Replies: 3
    Last Post: 4th May 2007, 10:30 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
  •