Results 1 to 4 of 4

Thread: Rafting Game

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    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

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    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."

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    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

  4. #4
    Lively Member
    Join Date
    Feb 2000
    Posts
    118

    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.
    Kokopeli
    VB6 SP3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width