Results 1 to 9 of 9

Thread: scrollin' scrollin' scrollin'....

  1. #1

    Thread Starter
    Junior Member MHD's Avatar
    Join Date
    Nov 2002
    Location
    The Magical World of the Internet
    Posts
    22

    scrollin' scrollin' scrollin'....

    Hey all. I need help with a small problem. how would i go about making thhe background scroll? I know the basic concept(i think) but need some help in application.
    Vowing to help the helpless, befriend the friendless, and to defeat the... um...defeatless!!

  2. #2

    Thread Starter
    Junior Member MHD's Avatar
    Join Date
    Nov 2002
    Location
    The Magical World of the Internet
    Posts
    22
    so no one can help me?
    Vowing to help the helpless, befriend the friendless, and to defeat the... um...defeatless!!

  3. #3

    Thread Starter
    Junior Member MHD's Avatar
    Join Date
    Nov 2002
    Location
    The Magical World of the Internet
    Posts
    22
    Cmon, Please will someone help me with this!! It is needed for a game i am endeavering to make!
    Vowing to help the helpless, befriend the friendless, and to defeat the... um...defeatless!!

  4. #4
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    You can do this with BitBlt by changing the source and destination coordinates for the image over time

    You also have to consider the special case of wrap arounds (would require two blts).

    Z.

  5. #5

    Thread Starter
    Junior Member MHD's Avatar
    Join Date
    Nov 2002
    Location
    The Magical World of the Internet
    Posts
    22
    This is what i am trying to figure out.
    Vowing to help the helpless, befriend the friendless, and to defeat the... um...defeatless!!

  6. #6
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Try this little proggie I made:
    Attached Files Attached Files
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  7. #7
    Addicted Member
    Join Date
    Aug 2002
    Posts
    192
    all values are Single except Sprite.Width and Sprite.Height

    'Tile rects
    xright = xleft + 5 * Sprite.Width
    ybot = ytop - 5 * Sprite.Height

    For yplot = ytop To ybot Step Sprite.Height
    For xplot = xleft To xright Step Sprite.Width
    Blit Sprite, xplot, yplot
    Next xplot
    Next yplot

    'The greater than sign assumes that ytop increases each frame
    If ytop > (pick a value) Then ytop = ytop - Sprite.Height

    'The greater than sign assumes that xleft increases each frame
    If xleft > (pick a value) Then xleft = xleft - Sprite.Width

    ytop = ytop + 0.05
    xleft = xleft + 0.001
    Last edited by dafhi; Nov 20th, 2002 at 08:40 AM.

  8. #8

    Thread Starter
    Junior Member MHD's Avatar
    Join Date
    Nov 2002
    Location
    The Magical World of the Internet
    Posts
    22
    How about just making it scroll on it's own? It will be a top-down scroller, like a shooter.
    Vowing to help the helpless, befriend the friendless, and to defeat the... um...defeatless!!

  9. #9
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Well, just put the code in a timer !

    If you want to make it scroll slowly right, you can add 1 to the XScroll value each time and then blit it.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width