@JeppDev, of course. That why I put it up on the site. Just add the BGMusic class to your project as is (no changes need to be made to it). The image in the 'images' folder is meant to go along with the class. Add it to the 'images' folder of your project.
@meazalplaq, this scenario was not uploaded with the ability to open it in greenfoot. The option to include the source was not checked by the creator when uploading.
Yes, in order to move diagonally the same distance as one pixel distance horizontally or vertically, you must multiply the distance by one half the square root of two, or approximately 0.7071; because that value squared is two-fourths, or one-half, and two halves is a whole.
I do not know why you would complicate it by moving speed inside the square root function and squaring it when you can just leave it outside. That is, instead of 'Math.sqrt((speed*speed)/2)', you can just use 'speed*Math.sqrt(1/2)' or 'speed*Math.sqrt(2)/2'.
and
(6) you are updating the image of your counter every act as well. It will only need updated when the score actually changes (only when a projectile hits an enemy object).
A few of things that could be improved on:
(1) you are calling 'MusicLoop' unnecessarily from the act method of the 'GameOverMusic' class and the 'AlienSpawner' class. It would be better to have them in their respective world classes as 'static final GreenfootSound' fields; and that you use the 'playLoop' method on them (so you do not need to check on the status of the sound every act -- they will loop automatically).
(2) all the code in the 'AlienSpawner' class should go in your 'testWorld' class. Adding an extra actor object into the world is not needed to perform those actions. They can be done in your 'textWorld' class act method and the 'AlienSpawner' class can therefore be eliminated.
(3) a Projectile object is NOT a Rocket object and therefore should not be subclassed as such.
(4) you could probably simplify the code in the Projectile class by just looking for an 'Enemy' object and use the 'instanceof' keyword to determine which type was found (if any).
(5) there is no need for your timer to show that precise a value. By only updating every, say, tenth of a second, you will save oodles on CPU usage.
There is an awful lot of lag for what this scenario does. Are the asteroids the pass the left edge being removed from the world? How about the bullets that pass the right edge? Are you sounds saved staticly or recreated each time they are used? Can you re-upload with source code to acquire help along these lines?
2014/8/31
The Little Space Ship
2014/8/31
Top-down Survival Game
2014/8/31
Wombat Simulator
2014/8/31
Top-down Survival Game
2014/8/31
Top-down Survival Game
2014/8/31
The Little Space Ship
2014/8/30
The Little Space Ship
2014/8/30
The Little Space Ship
2014/8/30
The Little Space Ship