This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
Can anyone help me, I'm trying to make the lobster move forward and back like the shells in super mario games
By pactz, with 3 replies.
Last reply by pactz, almost 12 years ago:
Thanks
Title won't show up?
By sabrim, with 1 reply.
Replied to by danpost, almost 12 years ago:
The greenfoot framewok changes the drawing color of the default background to WHITE. You need to change the drawing color before drawing the string onto it (use the GreenfootImage method 'setColor').
Help Needed! <identifier> expected
By TheGoldenBucket, with 3 replies.
Last reply by TheGoldenBucket, almost 12 years ago:
Thanks guys. Got it working, and now I'm off to create walls. -TheGoldenBucket
Scenario is lagging
By berdie, with 1 reply.
Replied to by danpost, almost 12 years ago:
A 900 by 900 background is a large area to cover with an image; and having to paint an image that size every act cycle will most undoubtedly be a cause of lagging. You could scale down the size of the project. At half size, 450 by 450, you would be reducing the workload by 75 percent. That would certainly help in reducing the lag. Most computers do not have screens of that height (900) anyway -- most everyone would have to either zoom out to reduce the size to fit their screens or be tied down to using the scroll bars (which may not work too well on the site); there is little on the downsi
Recovering Code?
By DemonsWhiteSoul, with 1 reply.
Replied to by danpost, almost 12 years ago:
Unless you saved the project under a different name or uploaded it on the site with published source, you are pretty much out of luck.
Making a loading bar for game, help!!
By Stoeptegel, with 6 replies.
Last reply by Stoeptegel, almost 12 years ago:
Everything works! Thanks so much. :) I see you posting on every thread basically, you have my everlasting gratitude for doing that. Cheers
isKeyDown issue
By Kryptonous, with 6 replies.
Last reply by Kryptonous, almost 12 years ago:
Didn't think of that (...)
is in the world
(...)! Thanks, that was the problem, then.
Discussion locked!
Help with dropping objects.
By radekdv, with 1 reply.
Replied to by danpost, almost 12 years ago:
If some or all of your random ships move faster than one pixel per act, they may not actually end up at the location being checked (and therefore, never drop their oil). Please show the entire class code for the Ship objects.
Need help on coding
By lionkitten, with 15 replies.
Last reply by danpost, almost 12 years ago:
Which class did you place the 'getScoreBoard' method? it should be in your FilmWorldPLAY class.
Spawning Objects at a fixed distance that scroll across the screen?
By DiplomatikCow, with 6 replies.
Last reply by DiplomatikCow, almost 12 years ago:
Ohhhh, I got it now, Thank you so much :D
Actor not in world! Please Help
By SomeRandomStuff, with 7 replies.
Last reply by SomeRandomStuff, almost 12 years ago:
danpost wrote...
From your original post code, line 4 calls a method that could potentially remove the actor from the world. If it does, then 'getY' in line 5 must fail because there is no world to get a y coordinate from. You must ensure the actor is still in the world before executing 'getY' on line 5. The proper conditional check would be 'if (getWorld() != null)'. 'getWorld' is an Actor object method that returns the world the actor is in (or 'null' if not currently in a world).
Thank you danpost! Everything is now working! I appreciate you helping me!
Help with scrolling background
By berdie, with 4 replies.
Last reply by berdie, almost 12 years ago:
danpost wrote...
Copy/paste what I just posted and see if it does the same. It might be the sign on the last line.
Thanks for your input i already fixed it. My picture wasn't the same size as the world ( U know i can throw myself out the window right know).
Scrolling background
By berdie, with 5 replies.
Last reply by danpost, almost 12 years ago:
danpost wrote...
< Quote Omitted > Change the '-' to a '+' on line 24.
This advice was not correct. The correct solution was to change the sign of 'scrollSpeed' on line 7 (in the first code post). It may appear to do the same thing; however, the sign of the field is used in determining scroll break points (see lines 25 and 26 of the first code post). A final thought on that is that the sign of the 'scrollSpeed' should not be needed as a factor in those lines -- if the value of 'scrollPosition' ever got too low or too high, then is was because the sign of the value of 'scrollspeed' w
Help! The world pause when I remove object
By iguru1996, with 3 replies.
Last reply by danpost, almost 12 years ago:
The problem is that you cannot write to a file while on the site (security reasons).
How do you create a timer in a greenfoot world or actor class?
By PalmTree, with 1 reply.
Replied to by danpost, almost 12 years ago:
A timer will work in either type of class (World or Actor). Just do not try to spawn (or create) actors from its own class. If you do, then if none of that type actor are in the world to begin with, none will ever spawn; and if one is in the world and one produces another, then both produce one more each, then... , the population of that type actor will increase exponentially. Your World subclass is the logical place to spawn objects into the world. You say you tried, but you did not show what you tried; so, it would be difficult to assist you with you code.
614
615
616
617
618
619
620
X