Why are my actors moving?

AfterBurnettAfterBurnett Member Posts: 3,474
edited November -1 in Working with GS (Mac)
I have two "life bar" actors, one is black and the other yellow. The black one sits in the BG so you can tell how much life you have left as the yellow one shrinks. The problem is, even though their size and placement within the game is EXACTLY the same, when I preview the game, they shift out of alignment slightly, making the black one visible to the left of the yellow one. I also noticed most of the other actors "jump" slightly when the game is launched too... it's only a tiny amount but it's enough to be noticeable and REALLY annoying.

I've tried adjusting the prototype and the actors in the scene... no luck.

Any ideas?

Comments

  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Are you using images/actors with uneven values for width/height? Are the actors positioned on half pixels?
  • AfterBurnettAfterBurnett Member Posts: 3,474
    200x16 for both life bars. Positioned on half pixels? How do I tell?
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Oh, I see what you mean and no they are not. Both set at 174 X, 294 Y.
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Check the X and Y values of the actor instances on the stage. If they are xx.5, then change the to a whole number.
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Yeah, I did. All fine there... no idea why this is happening... ARRRGH.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Everything is centered in gamesalad... if your life bar decreases, and when it does, if it is possible to have half pixel values, they will jump a bit.

    I assume that their width is based on a global 'health' attribute? Is that attribute a real number or an integer? If it isn't, I would make that an integer to avoid half pixels.

    Also, if at any time, the width of the health bar is an odd number, it will jump. This goes back to the centering in GS, odd pixels will get split, causing a blur or a jump.
  • AfterBurnettAfterBurnett Member Posts: 3,474
    The global health is an integer. It's also not just the health bar that "jumps" I've noticed it with a few images... of course the others could indeed be because they are placed on half pixels.. I shall look deeper! No idea as to why the health bar is doing this though... although I have a cheat/fix. I'll make the black bar a little bigger so it's visible as a border around the yellow one at all times. That way I can mess with its size etc until it looks good.

    On another note, my first level boss is simply AWESOME.... even if I do say so myself... MUAH HA HA HA HAAAAA!
Sign In or Register to comment.