The Daily Click ::. Forums ::. Klik Coding Help ::. Scorched Earth
 

Post Reply  Post Oekaki 
 

Posted By Message

Aptennap



Registered
  23/04/2004
Points
  916
28th October, 2007 at 09:41:49 -

I need help creating a Scorched Earth, Pocket Tanks like engine, where you can set the angle, power and the projectile will be affected by gravity and the wind. Does someone have an example?

Image Edited by the Author.

 
Oh sweet mary.

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
28th October, 2007 at 09:56:11 -

It shouldn't be that difficult to make. How much do you know about vectors and trigonometry?

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
28th October, 2007 at 09:59:14 -

Not much...

 
Oh sweet mary.

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
28th October, 2007 at 10:36:28 -

Image

The red squiggle is supposed to be θ

r is the resultant velocity that is applied to the object
v is the vertical velocity
u is the horizontal velocity
x is the distance it will travel of a period of t seconds

I'll post more later, hungry.

Image Edited by the Author.

 
My signature is never too big!!!

Aptennap



Registered
  23/04/2004
Points
  916
28th October, 2007 at 10:41:32 -

Umm i dont really understand.

 
Oh sweet mary.

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
28th October, 2007 at 11:28:38 -

Assuming you're having the turret rotate 180° on a 2D-plane:

θ is the angle between the turret and the horizontal axis.
r can be equated to be the power you give the projectile
u is how fast it will travel horizontally (always constant)
v is how fast it will travel vertically.
x is the distance the projectile will travel over t seconds

at any point on the path, the vertical velocity = rcosθ + (value of gravity(if travelling upwards, take the negative value))*(time projectile has been travelling)

I thinkkkkk.

Been a while since I did vector movement.

Image Edited by the Author.

 
My signature is never too big!!!

Aptennap



Registered
  23/04/2004
Points
  916
28th October, 2007 at 11:49:35 -

How would I implent this formula in my game? I'm not that advanced...

 
Oh sweet mary.

Guru Rinpoche



Registered
  05/05/2007
Points
  524

Game of the Week Winner
17th December, 2007 at 22:36:48 -

Wow...Scorched Earth was my first game ever, we had it on an IBM running DOS...it was great, but I remember that the "nuke" took forever for the computer to render..

 
I'm beamish.

nim



Registered
  17/05/2002
Points
  7233
18th December, 2007 at 07:49:11 -

You can always count on Joe to disregard anything to do with MMF and give you a math lesson.

 
//

columbo borgi :C



Registered
  07/12/2003
Points
  296

VIP Member
18th December, 2007 at 09:25:40 -

math is quite important

 
:C

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
18th December, 2007 at 09:48:42 -

I hate people calling it math. At school we always had maths, not math. It just sounds stupid IMO.

 
n/a

Guru Rinpoche



Registered
  05/05/2007
Points
  524

Game of the Week Winner
18th December, 2007 at 09:56:54 -

Well, technically "mathematics" can be used as a singular or plural noun, so either abbreviation is correct. What I always hated was when teachers would refer to "calculus" as "The Calculus". I'm sorry, but any mathematical method that requires you to look up and use formulas in a book does not deserve a "THE".

I like my mathematical methods to be self-sustaining.

Image Edited by the Author.

 
I'm beamish.

columbo borgi :C



Registered
  07/12/2003
Points
  296

VIP Member
18th December, 2007 at 11:56:10 -

i dont really feel difference between "math" and "maths". but im sure, you understand what i meant.

 
:C

Hayo

Stone Goose

Registered
  15/08/2002
Points
  6946

Game of the Week WinnerHas Donated, Thank You!VIP MemberGOTM 3RD PLACE! - APRIL 2009Weekly Picture Me This Round 27 Winner!Weekly Picture Me This Round 41 Winner!Weekly Picture Me This Round 45 Winner!
18th December, 2007 at 12:02:11 -

"Maths" always looked totally stupid to me.

My bro is making a tutorial on this, including random terrain generation and all that.

 
www.hayovanreek.nl

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
18th December, 2007 at 13:14:55 -

Yes, but you're Dutch, weed grows in your back yard

 
n/a
   

Post Reply



 



Advertisement

Worth A Click