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

Report as inappropriate.

zapnine7
zapnine7 presents ...

2012/6/5

Falldown

Up to jump. Left and right to move, respectivley.

3493 views / 787 in the last 7 days

2 votes | 0 in the last 7 days

Tags: game physics

Your browser is ignoring the <APPLET> tag.
Busch2207Busch2207

2012/6/5

Very good! But with Highscores it would be much better! ;)
zapnine7zapnine7

2012/6/6

Sure! I'll try to puzzle out the "UserInfo" class.
A new version of this scenario was uploaded on Sat Jun 09 13:39:20 UTC 2012 I tried to add highscores, but in Greenfoot it becomes extremley slow.
MatheMagicianMatheMagician

2012/6/29

Our you trying to access the highscores every frame? Or are you trying to update it every frame?
zapnine7zapnine7

2012/7/3

I check whether the UserInfo is null or not every act, and if the UserInfo score is greater than the player's current score and a timer is greater than 50, it updates.
SPowerSPower

2012/7/3

You shouldn't save a new score in user info every act cycle, it takes more time than you would think of a normal method. It's better to keep the score in an instance variable, and when the game is over, save it in user info.
That is what I thought. Not only is that slow, it hammers Greenfoot's network. Anyway, you could fix the problem by only setting the highscore after you die. That should work. (Essentially what SPower)
zapnine7zapnine7

2012/7/6

Thanks, I'll try to do that. I knew it was slow to connect to the network, but I didn't know what to do about it.

Want to leave a comment? You must first log in.

Who likes this?

MatheMagician Busch2207