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

Builderboy2005's Comments

Back to Builderboy2005's profile

kenshinakh I think you are mistaken about what double-buffering is. Double buffering does not prevent lag, it prevents flicker, and Greenfoot does implement it. Double buffering only means that what you make an adjustment to the image, you are not modifying the image that is on the screen, but a separate buffer that also contains a duplicate image. When the image you are drawing to is considered 'complete' (mostly done at the end of a frame or act cycle) the buffer is copied to the screen without any need to do any graphical calculations. This prevents flicker while images/objects are being modified between frames. You can see that greenfoot uses a version of double buffering, as changes to the actors positions are not seen until the act method is completed.
Ah, i see where the problems would arise. I did the outlined text in kind of a roundabout manner. I have an overlay actor that handles effects like the highlight ring, transitions, and text. The text actor writes its text onto the overlay image, but instead of writinig it once in one color, it first writes it 4 times in white, and then once more in black. Using small offsets, it gives the outline effect that i intended.
Hehe, that final level took a while to design :) Glad you guys like it! I believe the font still works because i am using Greenfoots default font, not others that can only be found on linux/windows ect...
Its giving me an error java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM.0) 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.checkExit(Unknown Source) at javax.swing.JFrame.setDefaultCloseOperation(Unknown Source) at SnakeGame.<init>(SnakeGame.java:29) at SnakeGame.main(SnakeGame.java:59) at Button1.act(Button1.java:19) at greenfoot.core.Simulation.runOneLoop(Simulation.java:288) at greenfoot.core.Simulation.run(Simulation.java:158) Seems your doing things that applets wont allow, for security reasons?
Thanks everybody! I'm so glad everybody likes it :)
Thanks! The physics took me so long to get right, and even more so to implement objects and different elasticity levels.
Yeah, the physics is not perfect, and since the terrain is so dynamic (you influence a big part!) there are sometimes weird things that happen. It mostly happens when there are small gaps between objects or walls.
Click and drag an object to move it. To rotate, click inside the highlight ring and drag. Its all entirely mouse based :)
Yeah, that would have to be the way to do it.