Results 1 to 7 of 7

Thread: Bouncy Ball

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    229

    Bouncy Ball

    HEY EVERYBODY!

    I'm trying to make a soccer 2D game for someone and there's a problem with the physics i'm trying to implement. (Too bad we don't learnt how to implement physics equations into code at school!) I wan't to make a ball that bounces like a normal ball in real life. So with friction, and gravity so that it doesn't keep bouncing for ever! I also want to make it so that when one of the players applies a force onto it, I want it to fly like a ball does when you head it! Any ideas? What equations must I use and how must I implement them? THANK YOU!

  2. #2
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    this is really a game question, not a VB question and you'll be much more likely to get help on it if you post it in a game forum where folks have knowledge of that kind of stuff

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    229
    LOL GO LOOK AT THE OTHER FORUMS... THEY'RE DEAD...I posted my topic like 4 hours ago and i'm still the last person that posted !

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    229
    COMMON..ANYONE?

  5. #5
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261
    I hope you realize that this is quite a big undertaking. The algorithms you use are likely to be specific to your game. To implement friction, you would decrease its speed every Nth interval if it's in horizontal motion and touching the ground. To implement gravity, if its not touching the ground, you would increase its downward speed every Nth interval until it is touching the ground. Once it hits the ground, if its speed is above 0, reverse its direction and decrease its speed further to implement a bouncing effect. (I hope you realize that I didn't even answer your question. Sometimes, it helps to define gravity and friction to more fully understand the algorithms you'd use).

    Thats the general idea. If you want code examples though, you'd basically be asking us to make your game for you. (However, www.planetsourcecode.com might be helpful).

    How much experience do you have with VB6? How does your game work? How are you drawing the graphics?

    I've noticed that a lot of people don't respond to threads they can't answer, cause there's really no point in posting "I dont know". As I've said, what you're asking for is quite complex. Typically, this is a pretty active forum.

    I hope I've been some help.
    Last edited by Hu Flung Dung; Jun 7th, 2003 at 01:39 PM.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    229
    Hu Flung Dung,

    Thanks for atleast pointing me in the right direction to how this would be done. I see now that there really isn't an equation to implement but more of a method. I am very comfortable with VB, I can practically implement anything that I can research. Aight well i've kinda have to expirement with the game now and the effects because like you said, there is no universal equation.

  7. #7
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261
    http://www.planetsourcecode.com/vb/s...s.asp?lngWId=1

    Here's a specific page on planetsourcecode that you might want to explore! Just select the 'Games' option button and press OK on the bottom. They have MANY vb6 games here, so you'll likely find something that'll help you out!

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