|
-
Dec 22nd, 2001, 10:31 AM
#1
Thread Starter
New Member
direct draw background scrolling(for a game)
Hi there,
I´ve a little problem with DD.
I want to make a game (like Diablo) and I´ve some problems with the background scrolling in DD.
I know how to scroll to one side but I`ve some problems to do it diagonal (two sides at the same time). Could anybody help me?
voidwalker
PS:
Sorry, but I´ve forgotten to mention that I can´t use wide surfaces. This is the reason why I have to do it this way.
Last edited by voidwalker; Dec 22nd, 2001 at 10:34 AM.
-
Dec 23rd, 2001, 07:50 PM
#2
Frenzied Member
To scroll diagonally up and left, just scroll up and then left 
It's a tile engine, right? How are you doing the scrolling?
-
Dec 24th, 2001, 04:24 AM
#3
Thread Starter
New Member
The scrolling in one direction is not so complicated. I´ve got the idea from the dx4vb site.
You just use a second rect and blit the first a little bit smaller and on the rest of your monitor you blit the second rect.
My problem is how do you handle the rects for two directions at the same time?
voidwalker
PS:
My original background is bigger than the screen and I divided it into several pictures (800x600).
-
Dec 24th, 2001, 06:13 PM
#4
Frenzied Member

Now you got me confused... can you please explain what you're doing a bit better?
-
Dec 25th, 2001, 04:46 AM
#5
Thread Starter
New Member
Sorry
OK, imagine you have a picture (2400 x 1800 px), the background.
Many computers don´t support wide surfaces, like mine.
I divide the big picture (2400x1800) in small pictures (800x600) which my computer can display.
In DD I have a rect with the first picture(a which is blitted on my monitor.
I´ve mentioned before that I use the tutorial from dx4vb as a base for my scrolling engine.
Imagine the avatar moves left so I have to scroll to the left:
I have a in my first rect (top=0,left=0,width=800,height=600).
Then I blit my second rect (top=0,left=xyz,width=800-xyz,height=600), with picture b in a loop on the screen.
If this explanation is also confusing to you, then please look up the tutorial from Jack Hoxley (link ^^^).
voidwalker
-
Dec 29th, 2001, 10:22 AM
#6
Lively Member
You don´t get along with it, do you?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|