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