I am trying to replicate the game Asteroids as a class project. I am having trouble measuring the time elapsed while the "W" key is pressed.
This code is supposed to increase the force applied to the spaceship to increase the movement speed incrementally. This is supposed to let the space ship rotate while moving along a 'line' and then force while be slowly applied to the new direction the ship is angled.
I have tried to research this over many hours and I still don't understand the concept. It seems there are a few ways to go about this but neither attempts have been successful.This is for school submission for the first project of the first year, so obviously my code is very basic and not making use optimal use of classes/structs however I would still like to achieve this movement I have been seeking so that I can understand the concept for use in future projects.
I have tried the use of current/previous variables for speed but haven't been able to come up with an equation to accomodate that. I have also attempted the use of a timestep but have been told that is not the correct approach. Any help would be appreciated. You can view the bulk of my program at https://gist.github.com/Rifuli/4762704