Results 1 to 2 of 2

Thread: Images Overlapping

  1. #1

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372

    Images Overlapping

    Hi guys,

    I've written a game that has traffic moving across a road. The game has different levels, each one getting a bit faster, but as the game gets faster the images start to overlap each other.
    This is the code I've used to move the traffic:

    Code:
    'Move Traffic on the Road
    For l = 0 To NumOfCars - 1
        imgCar(l).Left = imgCar(l).Left + CarSpeed(l)
        If imgCar(l).Left > frmMain.ScaleWidth + (50) Then imgCar(l).Left = 0 - imgCar(l).Width: GoTo 200
        If imgCar(l).Left < (0 - imgCar(l).Width - (50)) Then imgCar(l).Left = frmMain.ScaleWidth
    200:
    Next l
    How do I stop the overlapping?
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  2. #2

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372
    Could someone help me change my code around to use BitBlt. I haven't quite got the hang of it yet. If someone could show and explain changing the code above I should be able to do the rest.
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

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