Maths Issues

Talk about making games.

Maths Issues

Postby samcheung » Tue May 11, 2004 10:00 am

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
samcheung
 
Posts: 2
Joined: Tue May 11, 2004 9:44 am
Score: 0 Give a positive score

Postby jazz_e_bob » Tue May 11, 2004 10:26 am

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.... :)
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby samcheung » Tue May 11, 2004 10:57 am

Cool man!! It is very simple and easy, now I can focus on the game logic.
Thanks!!
samcheung
 
Posts: 2
Joined: Tue May 11, 2004 9:44 am
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron