Results 1 to 3 of 3

Thread: Multiple Pong Balls

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    125

    Multiple Pong Balls

    How can I use more than one pong ball?
    Do i have to use tonnes of variables for each ball or is there a simple way of doing it. Has anyone got any example projectss/sourcecode i can pick at?

    Because the thing is, i would also like them each to do different things upon collision with the paddles. Thank you.
    Emdiesse

  2. #2
    Fanatic Member damasterjo's Avatar
    Join Date
    Nov 2005
    Location
    In front of my Comp DirectX7 EXpert
    Posts
    827

    Re: Multiple Pong Balls

    well you can set up an array for the balls, kinda like this

    VB Code:
    1. dim balls(1 to 2, 1 to 10)
    2.  
    3. for i = 1 to 2
    4. for o = 1 to 10
    5. 'manipulate the values here
    6. if o=1 then
    7. 'do special thing
    8. if o=2 then
    9. 'do special thing
    10. '...and so on
    11. next
    12. next
    Software languages known:
    Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
    Software API's known:
    Directx 7 and 8
    Internet languages, in the process of learning:
    HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX

  3. #3
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Multiple Pong Balls

    And I hope you are not using objects as ping pong balls.

    If you need real physics to go with your project, I can help ya with that too.

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