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

2011/5/15

Help With Abysmal Performance?

1
2
3
Transpire Transpire

2011/5/18

#
Well, it's part of my time snippet. I don't need to call it - I could just manually inline the code. Also, that bug I found where the border was being drawn onto the world doesn't seem to appear in 1.5.6.
Transpire Transpire

2011/5/19

#
I just checked, the border definitely got some sort of regression from 1.5.6 to 2.0.1.
Transpire Transpire

2011/5/19

#
I fixed an issue with Player falling through. I really don't understand comparable :( Anyways, Davmac, can you describe how "reset" works in greenfoot? I get OddDuplicateAddExceptions, which should never happen.
nccb nccb

2011/5/19

#
Reset constructs a new world but it does not change static state (compile will). So that should explain those exceptions. There is also a bug in your code that the skip-list-set can be out of sync with the world; when you remove a disappearing platform from the world, it remains in your skip-list-set which can subsequently cause a NullPointerException. From a glance your comparable code looks right -- what problem are you having with it currently? Edit: mistaken about reset, originally.
Transpire Transpire

2011/5/19

#
I know about the out-of-sync bug; just don't remove it. I'll obviously need to implement a remove method that removes the reference. Where did I mention comparable? EDIT: Just fixed collision to detect for the x dimension.
davmac davmac

2011/5/20

#
Transpire wrote...
Where did I mention comparable?
In your previous post:
I really don't understand comparable :(
Transpire Transpire

2011/5/20

#
davmac wrote...
Transpire wrote...
Where did I mention comparable?
In your previous post:
I really don't understand comparable :(
I swear, CTRL+F didn't find it! About comparable: When I change the variable that determines the number the compareTo() method returns, does the navigable set account for that?
nccb nccb

2011/5/20

#
No, it won't account for that -- you'll need to remove and re-add the item you've changed.
Transpire Transpire

2011/5/20

#
Bah! Anyways, a note to myself. 1. Collision is still not working too well. The above may be the reason, but I'm not sure why; the result of the compareTo() method is supposed to be consistent in my program. Sometimes, the player will randomly fall through the platforms. These bugs always seem to disappear after a while. I also am programming this at school on 1.5.6, and at home on 2.0.1, so that may be an issue. Sometimes the player falls through a platform if he moves through at a low angle. 2. I need to make x movement act-independent, and look better. 3. I need to make comparable work for platforms at the same y level. 3. For some reason, moving up through a platform sometimes causes the player to zoom up.
Transpire Transpire

2011/5/22

#
As usual, all my bugs disappear when I get home to 2.0.1 #1, and the second #3 are fixed with a pure greenfoot version adjustment, seemingly. I can no longer reproduce the bug. #3 was trivially easy to reproduce on 1.5.6 and now impossible to reproduce on 2.0.1.
Transpire Transpire

2011/5/22

#
Does anyone know where the wanderer class that had world wrap-around went?
Transpire Transpire

2011/5/23

#
Oh, and one more thing I forgot to mention. Greenfoot doesn't install on Ubuntu seamlessly; it doesn't recognize OpenJDK. It asks for Oracle's JDK.
davmac davmac

2011/5/23

#
That's deliberate. The documentation (installation instructions) says you need the Oracle JDK. There were problems with OpenJDK in the past, so Greenfoot requires the Oracle JDK (the package is called "sun-java6-jdk"). Having said that, the next Greenfoot release will allow OpenJDK as an alternative.
Transpire Transpire

2011/5/24

#
Scenarios exhibits unwanted behavior under Oracle JDK 1.6.07. Does not exhibit under 1.6.22. Greenfoot versions both 2.0.2. Test case to be uploaded by this afternoon. Keyboard motion obviously is broken on the web version. (Movement went wild.) It is bug free when I self-compile.
davmac davmac

2011/5/24

#
Sorry if I'm stating the obvious, but the movement on your uploaded scenario seems fine if I reduce the speed slider a bit. If the speed is at maximum then pressing left/right causes the square crate thing to move way too fast.
There are more replies on the next page.
1
2
3