Page 1 of 1

Maths Issues

PostPosted: Tue May 11, 2004 10:00 am
by samcheung
Hi, I am just so bad in maths. Now I got some problem when I'm writting a game in GE (actually it is a maths problem)
I am writting a game that the tank can specify angle and power. The bullet will base on those values to go up and down in parabola path.

I got a very simple formula "x = ay^2" but it's hard to relate to the angle. I think I may need some sin / cos formula???

I've seem the similiar game in GW Basic (~10 years ago) and it was my first favor-game!! Could anyone help me to solve this issue.... Thanks in advanced. :D

PostPosted: Tue May 11, 2004 10:26 am
by jazz_e_bob
Oooh physical modelling. Yay! 8)

Create an actor, call it bullet, and place it in the bottom left corner.

Now add a
create actor event
select script editor
and type

diretional_velocity = 25; // power of shot
angle = 65; // angle of shot

Add a
draw actor event
select script editor
and type

yvelocity += 1; // gravity

Run the game!

Hope this gets you started.... :)

PostPosted: Tue May 11, 2004 10:57 am
by samcheung
Cool man!! It is very simple and easy, now I can focus on the game logic.
Thanks!!