User Tag List

Results 1 to 9 of 9

Thread: Transparent vs. Nonexistant

  1. #1
    No Products Registered

    Join Date
    Oct 2008
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Transparent vs. Nonexistant

    Forgive me if this has been asked before, but I couldn't even begin to think what to call it or what to search for.

    So I have a character who carries a big gun. Basically, he is in the shape of a capital T with a long cross line at the top.

    As it stands, no collisions occur inside his "space," (the areas under the armpits of the T) which is transparent in the sprite. This is great for things that are shooting at him to decide if he gets hit or not.

    However, it creates an uneven surface that gets caught on things - for example, he can hang on ledges, feet dangling, by his gun (which might be cool some other time but not today. :p).

    So here's what I'm wondering:

    1) Is there a way to make the sprite a complete square without making him have a sold-colored square background that follows him everywhere?

    2) Is there a way to make his gun functionally transparent while still being part of his sprite?

    3) Is there a way to make some objects detect the space for collisions and not others?

    Thanks

  2. #2
    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)

    Re: Transparent vs. Nonexistant

    For #1 you can use an alpha channel that is just above black so you don't see it but it will still register collisions with it.

  3. #3
    No Products Registered

    Join Date
    Oct 2008
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Transparent vs. Nonexistant

    I was wondering what the alpha channel was for... I was just playing with that.

    What do you mean by just above black, and what exactly IS the alpha channel? Thanks.

  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)

    Re: Transparent vs. Nonexistant

    The alpha channel is a feature that allows variable per-pixel transparency. The closer to black it is, the more transparent and the closer to white the more opaque. If you use an alpha channel, and select black, double click on the foreground color box to bring up the advanced color selector. Then select something just a few shades lighter than black and use that for areas you eant to have collisions.

  5. #5
    No Products Registered

    Join Date
    Oct 2008
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Transparent vs. Nonexistant

    Wonderful. Thank you.

    Edit: Hrrm... I can see his square shadow...

  6. #6
    RayMarble
    Guest

    Re: Transparent vs. Nonexistant

    There's a very neat DavidN's tutorial (links on the right) that could maybe help deal with collisions? It's called Fastloop tutorial or something similar.

  7. #7
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: Transparent vs. Nonexistant

    i think an easier way would be to go into the character objects properties and tick 'collision with box'

    this makes the transparent area solid for collisions. thats what you wanted right?

  8. #8
    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: Transparent vs. Nonexistant

    That's what I was going to suggest, too - backdrop and active objects have a property "Collision with box" (or "Use fine detection") that you can tick to make collisions count when objects are anywhere within the square boundaries of the sprite.

    RayMarble mentioned my tutorial above - in that, I mention using two separate objects to represent your player, a "collider" that remains invisible and a "sprite" that's shown to the player. Collisions are handled using the collider object that always has a constant shape and size, rather than the animated player character.

  9. #9
    No Products Registered

    Join Date
    Oct 2008
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Transparent vs. Nonexistant

    Yeah, that's what I needed! Thanks everyone. Between each of you that answers all my questions.

    I got a lot done on my game last night. Even without knowing some of these things, I seem to have found some new ways to make some of the platforming issues work out. It seems to be a different way to program an engine than the tutorial I read, which was too mathy for me just getting ready to start something simple.

    I even inadvertently found solutions to some of these questions, which surprised me. I am by no means an expert but I think I will share my work for examination when I get a bit further along. I'd be interested in knowing how it compares to some of the more schooled methods.

Similar Threads

  1. Transparent off on AO but show anyway
    By Tiny in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th August 2011, 11:18 AM
  2. Transparent sub-app background
    By MJK in forum SWF/Flash Export Module Version 2.0
    Replies: 14
    Last Post: 10th June 2011, 09:09 PM
  3. Sub-app transparent background?
    By Kris in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 1st February 2008, 01:14 PM
  4. Transparent SubApp
    By haora in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 12th October 2007, 12:25 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
  •