From: d DOT vrabel AT n-shropshire DOT ac DOT uk (David Vrabel) Newsgroups: comp.os.msdos.djgpp Subject: Re: Help implementing gravity in a scorched earth like game Date: Tue, 28 Apr 1998 07:00:50 GMT Organization: Staffordshire University Lines: 29 Message-ID: <35457d79.1303644@192.168.1.250> References: <1998042721391500 DOT RAA08930 AT ladder01 DOT news DOT aol DOT com> NNTP-Posting-Host: www.n-shropshire.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk funkdog32 AT aol DOT com (Funkdog32) wrote: >Hey all... I have been working on a program much like scorch lately... It is >going well and the rockets, bombs etc. look like they're being influenced by >gravity but it just doesn't look quite right. I would love for someone to give >me a formula for it = ) >Also... any way that I could make a background... (a hill or something) that >the tanks would sit on? (Basically my main problem is bounds checking to know >If the bomb hit the artificiall hill)... also how could i take a chunk out of >the hill when a bomb hits it? Resolve horizontal and vertical components. ie. horizontal speed stays constant as no force is acting. and vertical ccomponent is affected bu gravity ( conbstant acceleration) so use v = u +a*t (where v final speed; u is intial speed; a is acceration due to gravity =9.8 on earth; t is time interval) v^2=u^2+2*a*s ( Where s is distance traveled) s=u*t+(1/2)*a*(t^2) ( This is probably the most useful one) I do A-level Physics so if this is not clear e-mail me and I'll try to do a better explaination. David. David Vrabel d DOT vrabel AT n-shropshire DOT ac DOT uk A poor student (aren't they all) at: North Shropshire College Oswestry, Shropshire, UK