Sprite Animation bug

Discussion in 'NDS - Emulation and Homebrew' started by sleight, Jan 21, 2009.

Jan 21, 2009

Sprite Animation bug by sleight at 8:35 PM (968 Views / 0 Likes) 4 replies

  1. sleight
    OP

    Newcomer sleight Advanced Member

    Joined:
    Nov 23, 2008
    Messages:
    73
    Country:
    Germany
    ok here's a veeeeeeery early beta of my 1st homebrew

    http://www.megaupload.com/?d=FIQVQ7D6

    Always the "load" sprite is bugged when i try to move my char..
    If i delete this sprite the character is bugged..

    anyone got any idea?

    thnks in advance
     
  2. JDandy

    Member JDandy GBAtemp Regular

    Joined:
    Sep 22, 2008
    Messages:
    299
    Country:
    Netherlands
    Your source code would be more helpful.
    What are you using? PAlib?
    If so, do you have the palette set properly? etc etc.

    I don't think anyone can help you by looking at an .nds file
     
  3. sleight
    OP

    Newcomer sleight Advanced Member

    Joined:
    Nov 23, 2008
    Messages:
    73
    Country:
    Germany

    I guess the palette is ok and sprite seems to be loaded correctly too... (i think so because i tried with another sprite first before designin my own and it worked fine)
     
  4. JDandy

    Member JDandy GBAtemp Regular

    Joined:
    Sep 22, 2008
    Messages:
    299
    Country:
    Netherlands
    Ok, having played it and taken a look at your code...

    //PA_DeleteSprite (0,1); is commented out by the // (like you said), so it's normal that that Load sprite stays on screen.

    There's this though:

    if(Pad.Newpress.Up) PA_StartSpriteAnim(0, 3, 4, 5, 6);
    if(Pad.Newpress.Down) PA_StartSpriteAnim(0, 6, 7, 8, 6);

    I just took a look, and PA_StartSpriteAnim goes (screen, sprite, frame, frame, speed)
    and your character sprite is number 2, so shouldn't it be;

    if(Pad.Newpress.Up) PA_StartSpriteAnim(0, 2, 4, 5, 6);
    if(Pad.Newpress.Down) PA_StartSpriteAnim(0, 2, 7, 8, 6);

    ?

    I think that might be your solution; it only glitches the load sprite when walking up/down, after all.


    Hope this solves it, it looks interesting!
    Good luck.
     
  5. sleight
    OP

    Newcomer sleight Advanced Member

    Joined:
    Nov 23, 2008
    Messages:
    73
    Country:
    Germany
    Yeah that fixed it !
    Thanks a lot =D
     

Share This Page