This site requires JavaScript, please enable it in your browser!
Greenfoot back

Comments for The Little Space Ship

Return to The Little Space Ship

danpostdanpost

2014/8/30

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?
A new version of this scenario was uploaded on Sat Aug 30 20:46:32 UTC 2014
JeppDevJeppDev

2014/8/30

I think the sound is recreated everytime i dont know how to save them staticly and everything that you can't see on screen is deleted i have code for that
Super_HippoSuper_Hippo

2014/8/30

I don't have any lag, but @Jepp, if you wanted to make the source code published, you need to check the bottom left box when you export/update the scenario.
JeppDevJeppDev

2014/8/30

The thing is i want this to be unique and if i publish source code then i am affraid that people copy it
JeppDevJeppDev

2014/8/30

danpost would you do me a favor and look this through and tell me what the reason is that the GameOver screen only comes when all lasers is gone? and maybe if you have some time tell me why it sometimes lags when i fire my lasers?
danpostdanpost

2014/8/30

I am looking into it.
JeppDevJeppDev

2014/8/30

Sorry forgot to say that i shared a copy that everyone can look into
danpostdanpost

2014/8/30

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.
JeppDevJeppDev

2014/8/30

I have to go to sleep now so i will look into it tomorrow
danpostdanpost

2014/8/31

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).
JeppDevJeppDev

2014/8/31

danpost, is it ok if i use some of the stuff from your BGMusic?
A new version of this scenario was uploaded on Sun Aug 31 11:45:44 UTC 2014
danpostdanpost

2014/8/31

@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.
danpostdanpost

2014/8/31

Although, it looks like you have already added it as well as the arc bar volume indicator.
JeppDevJeppDev

2014/8/31

Yes but if you told me not to use it i would remove it again it was not meant to be uploaded until i got your answer
JeppDevJeppDev

2014/8/31

Is it possible to make it so that the music starts on instead of off?
danpostdanpost

2014/8/31

Of course it is possible to have the music start on. Just call 'play' on a BGMusic object: new BGMusic().play();
A new version of this scenario was uploaded on Tue Sep 02 17:31:05 UTC 2014
dr_rabbitdr_rabbit

2014/12/10

Where can i find GF project of this game?
JeppDevJeppDev

2015/6/4

I don't publish the project, only the game