|
-
Sep 26th, 2000, 03:12 PM
#1
Thread Starter
Frenzied Member
I know...I know...this belongs in games and graphics but I don't have much time (hockey practice tonight)...
I am making a game in BitBlt, but I want my background to appear to be moving to the bottom of the screen always (its water) The whole screen exept for the rocks and raft is water...Thanks guys
-
Sep 26th, 2000, 06:21 PM
#2
Frenzied Member
Why don't you create 2 wake bitmaps (for the left and the right hand sides of the boat) and make one of each appear behind the boat, moving further outwards on each loop iteration? I remember Fox showed me a simple scrolling shoot-em-up he wrote, that had the kind of thing you mean in it I think. Maybe it's on his website? (check user profiles for his homepage, or it's in his signature)
Harry.
"From one thing, know ten thousand things."
-
Sep 26th, 2000, 06:43 PM
#3
Thread Starter
Frenzied Member
Thanks Harry...but now my rock in the middle of the water won't show up! Can anyone find why?
http://www.geocities.com/steve_cr_mack/rafter.zip
Thanks
-
Sep 26th, 2000, 09:01 PM
#4
Lively Member
Not Sure
I'll start by telling you I don't know what I'm doing, but I added the line, Rock.DC = picRock.hDC in the form load and the rock showed up.
Code:
'Get DCs of the picture boxes
BackDC = Back.hDC
FrontDC = Front.hDC
Rock.DC = picRock.hDC
Player.DC = picPlayer.hDC
Tile.DC = picTile(0).hDC
'Also the x & y had the rock off the screen.
' change to the form load
Private Sub Form_Load()
RaftStartX = 128
RaftStartY = 227
Acc = 2
Rock.x = 100
Rock.y = -50
' I put in a timer with this
' Acc is a public var Single
Private Sub Timer1_Timer()
If Rock.y < Front.Height Then
Rock.y = Rock.y + Acc
Else
Rock.y = -70
End If
End Sub
'change to KeyPress
If KD(vbKeyUp) = True Then
Acc = Acc + 0.1
Player.y = Player.y - 1
If Player.y + Player.h > Front.Height Then: Player.y = Front.Height - Player.h ' This needs a max height
RaftStartY = Player.y
End If
If KD(vbKeyDown) = True Then
Acc = Acc - 0.1
Player.y = Player.y + 1
If Player.y + Player.h > Front.Height Then: Player.y = Front.Height - Player.h
RaftStartY = Player.y
End If
Keep in mind I don't really know what I'm doing, but it seems to work. Need to have the Rock.x change when it comes back to the top also.
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
|