User Tag List

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

Thread: Solid Objects in my Zelda Game (Picture inside)

  1. #1
    No Products Registered

    Join Date
    Dec 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Solid Objects in my Zelda Game (Picture inside)

    Everything that is on the screen is a background object, with the exception of the character, which is an active object. I now have to make the top wall, left and right walls, the bottom wall and the statues a solid object, so the character can't walk right through them. Now, I read that if you do a colission detection, you can actually set the x and y coordinates of the player after the player collides with an object.

    However, if you're familiar with Zelda, this could be a little tricky right? When Link walks to the left, underneath a statue, his head and hat touches the statue, but Link isn't technically touching the statue. Do you know what I mean? So, how do I get around this? Do I have to actually test the hot spot itself? Is that possible to do? And, is it possible to detect which direction Link is coming from, so when he touches it from the top, I can set the Y coordinate up 1?

    Here is a picture I made, to illustrate what I'm talking about. Link walks underneath that statue, but he isn't touching it. So I would have to make the collision detection with his torso.



    Any help would greatly be appreciated. 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: Solid Objects in my Zelda Game (Picture inside)

    The easiest way to do this is to make a small active with your movement events on it, and Always: Set the position of the graphic to the small active. This way only when the foot of the character touches an obstacle, a collision is detected.

  3. #3
    No Products Registered

    Join Date
    Dec 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Solid Objects in my Zelda Game (Picture inside)

    Do you know how to test multiple directions? Like, when Link touches the statue from the bottom, or from the top, left or right? I don't know how to do that. All I know how to do is detect the collision between Link and the statue, but it is important to determine which direction Link is coming from, so I can adjust the X/Y coordinates accordingly. Thanks.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Nov 2010
    Location
    Switzerland
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Solid Objects in my Zelda Game (Picture inside)

    You could also create a small active at the top of the Statue (or ofcourse every statue if you need colision-detection with every Statue) and hide it at runtime. Then you can do a colision-Detection of Link against the invisible Active. And as the Invisible Active just covers the upper third of the Statue you can get the effect i think you want to achieve. For the Walls you can achieve the same effect by creating an invisible Active-Object (Line-Shape) and put it somewhat "into" the Wall. Then just do a colision-detection to the hidden "Line"-Active-Object. Thats how i did when i tried something similar.

    Greetings from Switzerland

    jahkri

  5. #5
    No Products Registered

    Join Date
    Dec 2008
    Location
    U.S.
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Solid Objects in my Zelda Game (Picture inside)

    Or change the statues to static backdrops and add a small invisible obstacle the size of the statue in lieu of an active. I've never played the original zelda, so I don't know how the statues work, but put the object at where the logical base of the statue would be.

  6. #6
    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: Solid Objects in my Zelda Game (Picture inside)

    Quote Originally Posted by Jahkri
    You could also create a small active at the top of the Statue (or ofcourse every statue if you need colision-detection with every Statue)
    This is inefficient, as every object would need this. Which you stated. My way is pretty much the exact same, but the detector is on the player instead. Which means only one detector.

  7. #7
    No Products Registered

    Join Date
    Dec 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Solid Objects in my Zelda Game (Picture inside)

    Thanks for the advice guys. I understand what you are saying, and I am applying it to my game. One last thing.

    Is there a way to make it so that the player doesn't bounce after touching an obstacle? For example, I have it so that when the player touches the statue, it stops the movement (Movement --> Stop), but it also looks like the player gets pushed away from the statue. And if you keep running into the statue, it will look like the player keeps bouncing from it. I want it so that the player doesn't appear to be bouncing, he simply doesn't move after touching the solid obstacle.

  8. #8
    No Products Registered

    Join Date
    Jul 2010
    Location
    Australia
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Solid Objects in my Zelda Game (Picture inside)

    RetroRain, regarding testing direction of collision (just for general knowledge), first make a "onCollision" event like you usually do.

    Then, right click the existing condition and "add" a new one, this time, checking for the direction of the active you need to check. This will bring up the direction dialog box.

    Once it's all done, you have a condition with two conditions, BOTH of which must be met before the condition goes ahead.

    In pseudo english:

    > Active collides with backdrop
    + Active is facing left
    = Do something

    Hope that helps!

    As for the Link problem, I would use the active-object idea that the guys above mentioned.

  9. #9
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Solid Objects in my Zelda Game (Picture inside)

    Quote Originally Posted by RetroRain
    Thanks for the advice guys. I understand what you are saying, and I am applying it to my game. One last thing.

    Is there a way to make it so that the player doesn't bounce after touching an obstacle? For example, I have it so that when the player touches the statue, it stops the movement (Movement --> Stop), but it also looks like the player gets pushed away from the statue. And if you keep running into the statue, it will look like the player keeps bouncing from it. I want it so that the player doesn't appear to be bouncing, he simply doesn't move after touching the solid obstacle.
    This can happen if you have an animated character and are testing for collision against him, because he constantly changes. This is why a hidden collision box is recommended.

  10. #10
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)iOS Export Module (Steam)
    Aloan's Avatar
    Join Date
    Dec 2008
    Location
    Massachusetts, USA
    Posts
    375
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Solid Objects in my Zelda Game (Picture inside)

    Genius!

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Hidden objects (it thinks objects inside the screen are outside?)
    By SoftWarewolf in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 16th December 2012, 11:15 PM
  2. Help with a Zelda type game
    By Sambo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 29th April 2012, 02:09 AM
  3. New Ios game Balloon Factory codes inside
    By mikec in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 9th December 2011, 11:26 AM
  4. Push animation for Zelda game
    By RagingTiger in forum File Archive
    Replies: 9
    Last Post: 16th June 2007, 06:21 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
  •