Moving Background (DS Homebrew)

Discussion in 'NDS - Emulation and Homebrew' started by Ray =D, Oct 17, 2011.

Oct 17, 2011
  1. Ray =D
    OP

    Member Ray =D GBAtemp Regular

    Joined:
    May 17, 2011
    Messages:
    288
    Country:
    Germany
    Yeah. For my Homebrew, I need a moving background. Can someone tell me ho I can let my background move?
     
  2. wasim

    Member wasim ♫ Music addict ♫

    Joined:
    Nov 13, 2010
    Messages:
    907
    Location:
    Calicut
    Country:
    India
    what kind of homebrew ? :P
     
  3. Ray =D
    OP

    Member Ray =D GBAtemp Regular

    Joined:
    May 17, 2011
    Messages:
    288
    Country:
    Germany
    Jump'n run :P But I need it on the sub screen always scrolling :)
     
  4. wasim

    Member wasim ♫ Music addict ♫

    Joined:
    Nov 13, 2010
    Messages:
    907
    Location:
    Calicut
    Country:
    India
    good luck with that :)

    anyway try pm'ing Knightfox
    he'll be knowing it
     
  5. Ray =D
    OP

    Member Ray =D GBAtemp Regular

    Joined:
    May 17, 2011
    Messages:
    288
    Country:
    Germany
    Ok thank you :)
     
  6. Dirbaio

    Member Dirbaio GBAtemp Regular

    Joined:
    Sep 26, 2010
    Messages:
    158
    Location:
    Spain
    Country:
    Spain
    Are you using LibNDS?

    If so you can use bgSetScroll(id, x, y) and then do bgUpdate()
    If you're using rotoscale/extended backgrounds then it gets a bit more complicated because there are more functions. There's an example on that that comes with devkitPro.

    I could help if you gave more details. What and how do you want to scroll exactly?
     
  7. Ray =D
    OP

    Member Ray =D GBAtemp Regular

    Joined:
    May 17, 2011
    Messages:
    288
    Country:
    Germany
    I have a Bottom Screen (Yeah the nice game which I'm programming with CoolAs :P) and a Top Screen. On the top screen is a background. And this background should move always to the right.
    Would be "bgSetScroll(1, x++, y)" correct? And I am using LibNDS^^
     
  8. LeRodeur

    Member LeRodeur GBAtemp Regular

    Joined:
    Dec 12, 2009
    Messages:
    162
    Country:
    France
    You must increment x before and not in the function, ++is a function that will return 1or 0, depending on if the action on the variable has been done, so 1in 99.999%
     

Share This Page