When the ship moves forwards, it stays centre of the screen. When it turns, the world stays still but when you move forwards again, it side scrolls. Would you have to put the WASD commands in the World class file?
You would put the WASD commands in all classes that you want to see move in the world (stars, enemy ships, asteroids, ...). The best way to do that would be to make a common superclass for all those classes (say, call it 'ScrollActor') and put the code there, then you don't have to write it three times.
If you also have turning, though, then it gets a little more complex, because the new objects enter the screen at different places.
Hi Kölling how are you? I need your help. I can't run my "Conway's game of lime". It looks that all codes are okay, but when I click to run, then it happens nothing. Please check that. This is the link for my scenerio.
http://www.greenfoot.org/scenarios/6960
A new version of this scenario was uploaded on Mon Dec 10 21:37:08 UTC 2012
- press "e" to fire pulse gun.
- you now have to collect the teddy bears in order to be able to shoot torpedoes (press spacebar).
- press "q" to speed up.
- more updates to come.
Nice work - this is getting better.
Maybe next could be to actually display the lives and a score. You may like to have a look at this: http://blogs.kent.ac.uk/mik/2012/02/joc-16/
I have run into a really annoying problem. I tried to add damage levels to the asteroid, that failed and I tried to go back to how it was before, but i keep getting these errors in the Terminal Window:
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
the same thing again, then:
java.lang.OutOfMemmoryError: Java heap space
Do you know what the cause of this is?
Interesting, I think that it could be a lot better, if you could get the at World Edge and slow the enemy ships it could improve it quite nicely, I think I could be able to help, could you please release the source code?
2012/12/9
2012/12/9
2012/12/9
2012/12/9
2012/12/9
2012/12/9
2012/12/9
2012/12/11
2012/12/11
2013/3/9
2013/4/2