Commit 8f1c307a authored by Paul Tvete's avatar Paul Tvete

Upgrade to 30 frames per second

Like all classic games, gameplay is tied to the framerate.
parent 4eefc618
......@@ -61,7 +61,7 @@ void CannonField::shoot()
shoot_ang = ang;
shoot_f = f;
shooting = true;
timerId = startTimer( 50 );
timerId = startTimer( 33 );
}
void CannonField::newTarget()
......@@ -228,8 +228,8 @@ QRect CannonField::shotRect() const
{
const double gravity = 4;
double time = timerCount / 4.0;
double velocity = shoot_f/0.7;
double time = timerCount / 5.0;
double velocity = shoot_f/0.7;
double radians = shoot_ang*3.14159265/180;
double velx = velocity*cos( radians );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment