Results 1 to 5 of 5

Thread: Vb Newbie Needs Some Help Please!

  1. #1
    Gregzz
    Guest

    Vb Newbie Needs Some Help Please!

    Hi,
    I'm new to games in Visual Basic and am trying to make a game with colission detection and barriers (so your characters can't go off the screen) and code that will make an object just automatically move across the screen (like a laser or bullet). Anyways, could someone help me out? That'd be so great!
    Thanks a lot.
    -Greg

  2. #2
    Have you tried anything? If you have, just tell us where you're stuck.

  3. #3
    Addicted Member
    Join Date
    Jul 2001
    Location
    Germany, BW
    Posts
    157
    i've made it ( in a small prog) only like this:

    Code:
    If pic1.Left < Then pic1.Left = 0
    Else
    End If
    something like that!! you know!! i stop the pic if it is over my line i.e. over Left=1000 then no stepp

    cya Longbow
    Old enough to know better,
    but young enough to don't give a ****!

  4. #4
    Addicted Member
    Join Date
    Oct 2001
    Location
    Sweden
    Posts
    174
    type playertype
    x as integer
    y as integer
    end type

    dim player as playertype

    if player.x < 0 then player.x = 0 'where 0 is the left edge
    if player.x > 1000 then player.x =1000 'where 1000 is right edge

    if player.y < 0 then player.y = 0 'where 0 is the top edge
    if player.y > 1000 then player.y =1000 'where 1000 is down edge


    how you get this messy code


  5. #5
    Addicted Member
    Join Date
    Oct 2001
    Location
    Sweden
    Posts
    174
    for collision you need to check if the player is between the left edge (player.x) and right edge (player.x + player.width)

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