Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / side scrolling help(tutorial doesn't help)

Author
Message
Armeggadon
23
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 3rd May 2003 19:18
im creating a small side scroller (well kind of it will be like a minigame within my game) but i have 1 VERY large background(11370x760 i didn't feel like breaking it up) how do i scroll this background. i've looked at some of the parallax scrolling thinkies but they dont help me at all. i cant seem to get the image loops, placement, speed, etc... i just want it so that when it gets to the end of the image it shows the next image(same or different) i made a data map to hold the images how i want, but i dont know how to scroll them. thx in adv as i might not be on for a while
Current Status: learning MORE about dbpro
I consider myself: newb
APEXnow
Retired Moderator
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 3rd May 2003 19:25
I haven't experimented with this but you could possibly use a memblock transferring part of the image to be displayed, if and when you reach the end of your image, transfer the remaining width from the beginning so that you end up with a wrapping effect on the screen. Increasing the source and destination pointers for each frame.

This is just an idea though.

"Man who looses key to woman's appartment...... He get no nookie" - A wise chinese man.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd May 2003 20:37
How big?!?!? My advice - break it up

If you can't (or won't) then maybe the easiest way is to duplicate the first screens worth of bitmap at the end of that bitmap. Then you can use the COPY BITMAP command to copy a moving area from your source bitmap to the display bitmap. When you reach the last screens worth, reset back to the start.

Clear? I might post a small piece of code later to explain.

Login to post a reply

Server time is: 2026-07-10 21:40:39
Your offset time is: 2026-07-10 21:40:39