|
-- Posted by xxxxxxxx at 3:45 pm on Sep. 2, 2004
how do i get them in c++ and vb plz help
-- Posted by sakurag at 11:40 pm on Sep. 2, 2004
Can you explain a little bit more of what you'd like from a scrolling background? Are you talking for a game like super mario, or a background with scroll bars.
-- Posted by xxxxxxxx at 3:33 pm on Sep. 4, 2004
for a game for example have a picture that when goes of the side of the screen it comes back on the other. but i wont the bit that hasnt gone of the screen to stay there.
-- Posted by sakurag at 9:58 pm on Sep. 6, 2004
You may want to look at something called BitBlt. Whatever you're tracking for movement will keep the stored movement. I believe with BitBlt it uses a RECT structure. I would wrap the BitBlt function up, so you don't have to call it explicitly every time. You would then bitblt the image based on this. I would separate the space into two parts, if the position is 0, then part 1 would be the whole image and part 2 would be nothing. As you move the position, part 1 and part 2 grow and shrink depending. You would then bitblt parts of the image into each of these parts. It's rather difficult to explain, since it's purely visual. imagine this is the screen: [******|***] ^ ^ 1 2 As you move the |, the pieces grow and shrink. You then make sure you draw the pieces of the image accordingly.
-- Posted by the real anti christ at 8:55 pm on Dec. 14, 2004
allegro
-- Posted by Duekiller at 5:40 pm on Dec. 16, 2004
ok the eziest way is to do the following (assuming you are talking in 2d) have the two of the same images next to each other, the one on the bottom is flipped (like that it looks continious), then have them scroll and when the second image completes across the screen, just reset the coordinates. PM me for more info.
|