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

danpost's Comments

Back to danpost's profile

@Duta, I could not say as I have not looked at your source. I will publish my source soon for you to take a look, though.
@TheStop, please open the scenario in Greenfoot and look at the methods the 'act' method calls in the 'SWorld' world class.
ALL images are rectangular. no matter what format you save them in. For more detailed intersection detection you must create code to do color detection. Unfortunately, this will require alot of CPU time and may cause significant lag; especially if the images are large.
@jrlowe, you can import the 'ScoreBoard' class by selecting 'Edit' and 'Import class' from the greenfoot menubar. Creating a new ScoreBoard() object will show the UserInfo data of the top so many scores and the scores of those nearest the current user's score. Your scenario will have to update the UserInfo data as scores are registered for it to show anything (other than zeros). Refer to the UserInfo class documentation.
@chiefnoah, I do not believe spaceblue has had any activity on this site for almost a year now.
@comandodude101, the scrolling code is the 'act' method of the world class which will only move each star in the world the distance determined by each star's speed value. The 'background' is a flat black color and does not move at all; therefore, this would not be much help.
You need a way to change or remove tiles placed while editing.
@actinium, I would think the mathematical solution would be too complex to even fathom. There are way to many variants involved: time and location are both interacting with each other. For instance, in level 2, start moving the green toward its final destination BEFORE the final push on the blue one. You will find that one of the moves in getting the green toward its destination will push the blue into its destination. This makes this one move double dutiful, saving two moves in the total move count (the other move is saved by not having to move back from having pushed blue into its final destination).
danpostdanpost

2012/12/22

It may be that UserInfo is not available (which may occur even when a user is logged in). Try either saving the user name when you initially check for user login, or use 'isStorageAvailable' before using 'getUserName'.