Loading ...
Sorry, an error occurred while loading the content.

47148Re: [libertybasic] RE: making background scroll

Expand Messages
  • Marc Rossi
    Nov 6, 2013
    • 0 Attachment
      I will.  Thanks, Rod.  I will remember that.
      Thanks,
      Marc


      On Wednesday, November 6, 2013 2:20 PM, "rodbird@..." <rodbird@...> wrote:
       
      Blitting is about painting a bmp into your screen. You can imagine a large bmp and blitting a smaller moving area of that bmp onto your screen. Say a starfield, 1200 pixels wide, you start blitting at pixel 0 and move the location to the right next time blitting from position 1. You blit a small portion of the 1200 pixel starfield say 600 pixels, each time you blit 600 pixels but each time a pixel further right from the source.
       
      So picture a small box tracking over a large image and blitting to the screen you see.
       
      Most often the image you blit from rolls round, that means you cant see the joint and is best achieved by mirroring the image you wish to scroll.  Once you get to the limit of the scroll you jump back to the start but because that is the same as the end you don't see it glitching
       
      You will need to draw a bmp of stars and load it to your resource, then you start blitting from the resource to the screen. If you use stretchblit you can draw and capture say an 800 bmp and then blit it double size so allowing you to roll round.
       
      confused? just take your time, experiment and enjoy. The blitter and all it's capabilities is one of the best resources to spend time on.


      ---In libertybasic@yahoogroups.com, <mrossi8888@...> wrote:

      Good Morning, Liberty BASIC Group,
      I am using the DC functions and I never learned how to make the background scroll without using "drawsprites" or the various other commands.
      I use "set" to make the stars.  My questions is how do I capture an image of these stars and make them scroll?
      Thanks,
      Marc F Rossi


    • Show all 3 messages in this topic