I am working on an rocket and asteroids game. I would like to implement a timer that tracks how long it took for the player to clear all the asteroids, and show whatever time that was recorded on the winning screen. Similarly, I would like the tracked time to show up on the game over screen as well (to tell players how long they lived for). I've read through many discussions, but I don't seem to really get anything (working and understanding wise).
I also have in mind of some powerups that will spawn at random time intervals (I don't know how to do this) and random places (I know how to do this). When the rocket ship intersects with the powerup, the speed of the asteroids should decrease for an amount of time. I have tried using setSpeed(), which slows everything down, but it seems to break my game over screen.
If anyone can give me some hints/ideas on where to get started - please let me know! I am very new to java and Greenfoot and would really like to learn more.

