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

SPower's Comments

Back to SPower's profile

SPowerSPower

2013/9/2

Ok, but did the background still scroll?
SPowerSPower

2013/9/2

Well, that's weird, were you logged in while playing? And did it really pause or did it show 'loading highscores'?
Good idea, but I agree with danpost: change some code, so it won't crash etc.
Also, when restarting, it doesn't load anymore. I looked at your code and this what I think is the problem: In your method generate (in your Bg class), you call the method height at some point. Only, in height you also call generate, causing a forever loop of calling methods, which eventually causes the stack (some part of the memory, where also the data of methods is stored) to overflow.
When you grab some 'sand', it first says you have 0 of it, then 1, then 2, etc. Just add one to the value to display. And this truely shows potential! I hope you're still working on this to turn this into a full game.
He's just so cute
Whoops, just realised, the x and y should be this: [code]int x = Greenfoot.getRandomNumber(getFullWidth()-getWidth())+getWidth()/2; int y = Greenfoot.getRandomNumber(getFullHeight()-getHeight())+getHeight()/2; [/code]
Ok, thank you.
Can I use some of the audio and images in a new game?