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

danpost's Comments

Back to danpost's profile

@oscarreks, it is not the actual placement or rotation that is increased, just the precision of the values that track these states. Time is not being dealt with at all -- just distance and rotation. Speed is the ratio of distance per time, so being more precise with distance give speed more precision.
danpostdanpost

2015/9/10

I realized you used a 'try-catch' block for the second 'if' which probably solves what I was thinking was an issue. What about the filename at line 56 in the Guy class -- try removing the slash from the: "/ppl2.png" filename.
My bad. I was not aware of that new GreenfootImage constructor. The only other possible issue that I see is the two 'if' statements that each could remove the Guy class. If the first one removes the actor, then the second one cannot properly execute (calling 'isTouching' while the actor is not in the world). However, this would not stop the execution after just one act cycle as it appears to be doing here on the site.
I downloaded your source code and took a look. I do not know why -- but your project should not have compiled and it should not have been allowed to be uploaded as is. The last line in your Label class (line 101) has too many Color parameters (3) for a GreenfootImage constructor. You should be getting an error message saying something about 'no suitable constructor found'.
The way that the images of the actors remain along the edges, it is acting like the background image is not completely covering the world canvas but the actors still being painted there -- like the edges of the world background image are transparent. If a discussion thread were started on this issue, we could try different codes that I could suggest to attempt to resolve the issue.
@Super_Hippo, your scenario does not have the source published, so all that is possible is to see the result -- not what may be causing it. As I have not ever had any issues similar to what you all are experiencing, I am wondering if it could be related to the operating systems we are using.
Okay. I downloaded it and checked it out. I seems to be okay on the download. Maybe it is the particular version of greenfoot you are using.
You have some transparency within the world background along the edges. You can probably avoid this by not using the 'clear' method on the background image. Greenfoot will automatically tile any image smaller than the size of the world when set to the background.
Solving time is now displayed when a puzzle is tested and found completed correctly.