home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / amiga / programm / 19023 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.8 KB  |  42 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!mcsun!sunic!dkuug!imada!news
  3. From: breese@monet.imada.ou.dk (Bjorn Reese)
  4. Subject: Re: 3d ball games - Baseball/Cricket
  5. Message-ID: <1993Jan21.154710.24841@imada.ou.dk>
  6. Sender: news@imada.ou.dk (USENET News System)
  7. Organization: Dept. of Math. & Computer Science, Odense University, Denmark
  8. References: <1jl31bINNst@golem.wcc.govt.nz>
  9. Date: Thu, 21 Jan 1993 15:47:10 GMT
  10. Lines: 30
  11.  
  12. In article <1jl31bINNst@golem.wcc.govt.nz> coutinho_b@kosmos.wcc.govt.nz  
  13. writes:
  14. > Basically I want to make a games, but it relies on moving a ball like that
  15. > seen in many baseball type games. Hardball is a good example. I want to 
  16. > know what the code I have to program will have to do in converting  
  17. calculations
  18. > to be shown on a screen. I mean, how to emmulate a ball's trajectory?
  19. > How to do bounce? Inertia? How to determine where bat is in relation to the
  20. > ball just as its struck and which direction the ball is to fly!
  21. >  I have 1st year University knowledge of physics and would probally program
  22. > the game in AMOS to start off will.
  23.  
  24. Is the ball (and the rest of the game) viewed from above or
  25. from the side?
  26.  
  27. Trajectory: figure out the formulas. You need one for x, and
  28. one for y. Newton's second law could be helpful.
  29. Bounce: reverse the speed (but not the acceleration)
  30. Inertia: speed = speed * 0.9 (or another suitable value < 1)
  31. Bat: rotate the coordinates so that the bat lies in the
  32. direction of the x-axis, figure out the angle by which the
  33. ball leaves the bat, calculate how much force is being
  34. transfered from the bat to the ball, and rotate back.
  35.  
  36. These are just some ideas, which I hope you can use.
  37.  
  38. --
  39.  
  40. Bjorn Reese                    |     Email: breese@imada.ou.dk
  41. Odense University, Denmark     |     Voice: +45 65 932 182 (private)
  42.