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

Comments for Kara Sokoban

Return to Kara Sokoban

A new version of this scenario was uploaded on Wed Jul 11 10:37:39 UTC 2012
A new version of this scenario was uploaded on Wed Jul 11 10:40:28 UTC 2012 Added HIGHSCORE
A new version of this scenario was uploaded on Wed Jul 11 12:32:36 UTC 2012 More Levels
A new version of this scenario was uploaded on Wed Jul 11 12:34:12 UTC 2012 More Levels
ZamohtZamoht

2012/7/13

Are you sure level 6 is possible?
royalfoolroyalfool

2012/7/14

Hi Zamoht, Yes, Level 6 is possible. One hint: The leaf on the right side must be the last one you put a mushroom on. At the very end you might need to push that last mushroom down first, and then up again...
ZamohtZamoht

2012/7/14

I got it! And I got all the highscores as well (:
danpostdanpost

2012/7/29

@Zamoht, check again, you might be suprised!
ZamohtZamoht

2012/7/29

You had to ruin that for me...
danpostdanpost

2012/7/29

You had it for a little while! :)
royalfoolroyalfool

2012/8/7

Congratulations danpost for completing ALL 105 LEVELS!!
MorranMorran

2012/8/7

@Danpost: You completed ALL 105 LEVELS?! Wow man, that takes dedication!
danpostdanpost

2012/8/7

@royalfool, Thanks. But I have a question: How do you store all the scores? I am assuming that you are concatenating them as a three digit number set to a string, with a seperator. Am I right? @Morran, There are many levels that can be improved on (that can be completed in less moves) which I have yet to conquer.
danpostdanpost

2012/8/7

No. That cannot be right. Not enough room to do it that way (not even without the seperator). You must be converting the score somehow. But then, why does it only save values up to 999 and not higher? There are 10 to 12 levels that took more than 999 moves to complete, yet the saved score is set to 999.
royalfoolroyalfool

2012/8/7

@danpost: UserInfo is designed to have only one highscore but I obviously needed one highscore for each level. To work around this limitation I use all available ints and Strings to store the users moves for each level (like you assumed). I do not use a seperator. In an int I store 3 levels with 3 digits. In a String I store 15 levels with 3 digits. With the available 10 ints and 5 Strings I can save up to 105 levels. The limit is 999 moves because of the max of 3 digits. If you have an elegant idea how to work around the 999 moves limitation - I'd be glad to know.
royalfoolroyalfool

2012/8/7

Oh - just had an idea as I wrote the comment above: I could save up to 16 bits in a single character. This means a maximum value of 65'535! So it would be possible to save 50 levels with a max. of 65'535 moves in each String. Maybe I'll do that in a later version.
danpostdanpost

2012/8/8

That was my thought, exactly. Just using the Strings, you can save 250 levels of scores up to 65'535! That is exactly the kind of thing I had in mind for one of my projects.
danpostdanpost

2012/8/8

That was my thought, exactly. Just using the Strings, you can save 250 levels of scores up to 65'535! That is exactly the kind of thing I had in mind for one of my projects.
ZamohtZamoht

2012/8/8

Is it hard to work with userinfo and highscores? I've seen some posts on this, but I find it a bit confusing.
danpostdanpost

2012/8/8

@Zamoht, you could start a discussion on this, and I will try to make it easier to understand.
danpostdanpost

2012/8/30

It appears we were assuming to much, royalfool. Excel is too stringent on how text is stored and will not store the values as we thought. My Private Messaging scenario may eventually fail for new users (plus one older); but, I believe that would probably be years from now. Before then, I will have to do some testing and add code to prevent failure. Will inform you of the limitations when I have figured them out. It is too bad that Excel is this way, as that totally blows my intensions for using UserInfo in one of my projects (not enough storage to make it feasable, at least in the way I wanted to use it).
danpostdanpost

2012/9/1

It seems that the only characters supported by the UserInfo Strings are in the range of 0 to 255. There are even some of those that will not store; namely, 13 (carriage return character) and those in the range of 128 to 159, inclusive (not sure why). That leaves only 223 different characters that can be stored (not much to work with).
danpostdanpost

2012/9/1

With the above in mind, you can save integers up to 48'728 in a two character string. This would allow you enough room for 125 puzzles whose scores are stored only in the 5 strings. If you are interested in the conversion code (both ways), start a discussion.
royalfoolroyalfool

2012/9/4

@danpost: Would be great if you could share the conversion code. I started a discussion at http://www.greenfoot.org/topics/1983
A new version of this scenario was uploaded on Tue Sep 11 20:00:44 UTC 2012 Highscore limit of 999 moves removed. Added three new levels.
A new version of this scenario was uploaded on Tue Sep 11 20:08:51 UTC 2012 change legacy moves of 999 to 9999 (in some levels it's not possible to have below 999 moves!)
A new version of this scenario was uploaded on Tue Sep 11 20:12:13 UTC 2012 change legacy moves of 999 to 9999 (in some levels it's not possible to have below 999 moves!)
A new version of this scenario was uploaded on Tue Sep 11 20:28:22 UTC 2012 Fixed little problem with the highscore of the last three levels...
danpostdanpost

2012/10/12

I am not sure what is going on. I had bettered the score of 1356 on level 103 at least four times and the high score for that level does not change. Oh, and yes, I was signed on each time. The scores were 1338, 1296, 1294, and 1300.
danpostdanpost

2012/10/12

Did not save it again: 1278.
royalfoolroyalfool

2012/10/18

@danpost: Thanks for reporting this. I've tried to find the problem but couldn't so far. It's quite difficult to debug since UserInfo still has the character set issue when run locally (http://www.greenfoot.org/topics/1983). I might need to wait until a new version of Greenfoot is released until I can properly debug this issue. Still a question: Were you able to improve your score in other levels? Also with moves above 1000?
danpostdanpost

2013/2/6

Sorry for the delayed response. Yes, other scores were updated properly; including some above 1000.
dibodibo

2014/1/10

ups, got an error: 0 CacheEntry[http://www.greenfoot.org/applet_attachments/0000/4167/greenfoot8802562908424006311.jar]: updateAvailable=false,lastModified=Fri Aug 17 13:50:35 CEST 2012,length=55893 CacheEntry[http://www.greenfootgallery.org/sharedjars/Greenfoot-core-2.1.0.jar]: updateAvailable=false,lastModified=Fri Aug 17 13:49:55 CEST 2012,length=254236 CacheEntry[http://www.greenfoot.org/sharedjars/Greenfoot-core-2.1.0.jar]: updateAvailable=false,lastModified=Fri Aug 17 13:49:55 CEST 2012,length=254236 CacheEntry[http://www.greenfoot.org/sharedjars/Greenfoot-core-2.4.jar]: updateAvailable=false,lastModified=Mon Sep 10 12:41:30 CEST 2012,length=283213 CacheEntry[http://www.greenfoot.org/sharedjars/jl1.0.1.jar]: updateAvailable=false,lastModified=Fri Aug 17 13:49:55 CEST 2012,length=143160 CacheEntry[http://greenfootgallery.org/sharedjars/Greenfoot-core-2.2.jar]: updateAvailable=false,lastModified=Fri Aug 17 13:49:55 CEST 2012,length=288137 CacheEntry[http://greenfootgallery.org/sharedjars/jl1.0.1.jar]: updateAvailable=false,lastModified=Fri Aug 17 13:49:55 CEST 2012,length=143160 CacheEntry[http://www.greenfoot.org/sharedjars/Greenfoot-core-2.2.jar]: updateAvailable=false,lastModified=Fri Aug 17 13:49:55 CEST 2012,length=288137 Attempting to reconnect to storage server java.security.AccessControlException: access denied ("java.net.SocketPermission" "129.12.3.237:8888" "connect,resolve") at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkConnect(Unknown Source) at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source) at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source) at sun.nio.ch.SocketChannelImpl.connect(Unknown Source) at greenfoot.platforms.standalone.GreenfootUtilDelegateStandAlone.ensureStorageConnected(GreenfootUtilDelegateStandAlone.java:228) at greenfoot.platforms.standalone.GreenfootUtilDelegateStandAlone.getTopUserInfo(GreenfootUtilDelegateStandAlone.java:456) at greenfoot.util.GreenfootUtil.getTopUserInfo(GreenfootUtil.java:907) at greenfoot.UserInfo.getTop(UserInfo.java:286) at ServerHighscore.isAvailable(ServerHighscore.java:52) at GameScreen.prepare(GameScreen.java:120) at KaraWorld.<init>(KaraWorld.java:95) at GameScreen.<init>(GameScreen.java:77)
danpostdanpost

2014/1/10

@dibo, I wonder if that is a personal problem. When, exactly, did this error occur (during compilation, after starting, after you clicked on a particular button, etc.)
dibodibo

2014/1/11

Yesterday the error occurred during loading the scenario. Now the scenario is running well. I think it might be a problem with the greenfoot server ("ServerHighscore.isAvailable").