User Tag List

Results 1 to 10 of 10

Thread: Custom Movement Graphic Glitch

  1. #1
    No Products Registered

    Join Date
    Oct 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Custom Movement Graphic Glitch

    I'm working on a 2d platformer with custom platform movements, but my sprite seems to have some kind of graphical glitch when moving left or right.

    I used 2 alterable values and 2 fast loops for my custom movement.
    My idea was to make my first alterable value, "X-Speed," be the number of pixels my sprite moves every second. That way, I could program both very fast and very slow speeds for my sprite.

    The sprite moves perfectly, but it tends to sort of "vibrate" when I change directions quickly.
    Does anyone have an idea what might be causing this glitch, and how I could fix it?

    This is what my events look like:
    1. Repeat while right arrow is pressed
    =>Add X-Speed of "active" to X-Counter of "active"
    2. Repeat while left arrow is pressed
    =>Subtract X-Speed of "active" to X-Counter or "active"

    3. X-Counter of "active" >= 50
    =>Start loop "X+" (X-Counter of "active"/50) times
    4. X-Counter of "active"<= -50
    =>Start loop "X-" (-1)(X-Counter of "active"/50) times

    5. On loop "X+"
    +"Active" is not overlapping a backdrop
    =>Subtract 50 from X-Counter of "active"
    =>Set X position of "active" to (X position of "active"+1)
    6. On loop "X+"
    +"Active" is overlapping a backdrop
    =>Stop loop "X+"
    =>Set X-Counter of "active" to 0
    =>Set X position of "active" to (X position of "active"-1)

    7. On loop "X-"
    +"Active" is not overlapping a backdrop
    =>Add 50 to X-Counter of "active"
    =>Set X position of "active" to (X position of "active"-1)
    8. On loop "X+"
    +"Active" is overlapping a backdrop
    =>Stop loop "X-"
    =>Set X-Counter of "active" to 0
    =>Set X position of "active" to (X position of "active"+1)

    P.S. I've never actually posted on the forums before, but I've been experimenting with MMF and MMF2 on and off as a hobby for almost 10 years now.

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Hi and welcome to the forums.
    Are your graphic hotspots, animation frames, the same for both directions?

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    No Products Registered

    Join Date
    Oct 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think so. My sprite only has one animation frame, so I don't think the hotspot is changing.

    I made a new frame separate from my main programming frame to try and isolate this glitch. There's no events other than the 8 I posted above, and the only other objects are the backdrops.

    I've also noticed another part of the glitch. When the sprite is moving left, the left-most "column" of pixels in the image disappears; this doesn't happen when the sprite's moving right, though.
    I think that means it's probably a problem with my events, but I don't know for sure...

  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)
    Sounds like a display bug. Increase the size of the sprite by two pixels an all directions, so there's a 1px padding of transparency all the way around your image. That should take care of the column disappearing.

  5. #5
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Also, if u have "force load on call for all objects" or "load on call" unchecking might remove this problem

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    If you post the mfa with your 8 events then we could solve this a lot faster.

  7. #7
    No Products Registered

    Join Date
    Oct 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I think I'm attaching a copy of my "bug" testing frame (thanks for the idea, Konidias). I'm still learning how replying in this forum works...

    I decided to leave the app unchanged for now, so it can be tested.

    I've done some more experimenting with the graphic glitch. It seems one "column" of pixels disappears for every 50 "pixels per. second" the sprite is moving.
    Also, the object "vibrates" most often when you suddenly change directions.

    P.S. As a bit of advice for anyone testing this: if you want to change the sprite's speed, just adjust its first alterable value, X-Speed.
    And thanks, Jacob and ProdigyX, for your suggestions. I'll try them out
    Attached files Attached files

  8. #8
    No Products Registered

    Join Date
    Oct 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tested Jacob and ProdigyX's ideas. Adding a pixel "buffer zone" does seem to stop the "column of pixels" from disappearing, but the sprite is still vibrating (and somewhat violently at that).

    Does anyone know what else might cause the object to "vibrate" when it's moving?

  9. #9
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I tested your example MFA and I don't really see any vibrating or glitching - have you tried running it in HWA?
    Working as fast as I can on Fusion 3

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export Module
    Skyhunter's Avatar
    Join Date
    Jan 2007
    Location
    Croatia
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, i dont see any problems either, it could be your screen refresh rate is less than the frame rate of the game? That would cause graphical glitches in standard mode.

Similar Threads

  1. Graphic glitch w/ alpha channels.
    By camelman in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 9th September 2009, 06:01 AM
  2. Weird Graphic Glitch
    By Random_Poster in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 15th January 2007, 03:50 PM
  3. Subapps graphic glitch
    By Blizna in forum File Archive
    Replies: 3
    Last Post: 21st July 2006, 09:52 PM
  4. Layers Graphic Glitch
    By xerus in forum File Archive
    Replies: 7
    Last Post: 7th July 2006, 08:57 AM
  5. Layers Graphic Glitch
    By xerus in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th July 2006, 09:54 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
  •