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
Restart Timer
By badatcoding1325, with 4 replies.
Last reply by badatcoding1325, over 6 years ago:
OH. Thank you
Activate Gif when Timer Over
By badatcoding1325, with 2 replies.
Last reply by danpost, over 6 years ago:
badatcoding1325 wrote...
oh note: The there is text that it already displays on the timer when it is over however I want to change it to activate a separate gif to appear on screen
Use a separate actor to run the gif. You can adjust lines 200 and 201 to create the actor and put it in the world (before the possibility of removing the timer itself from the world.
collisions
By Bigbobatesloppyjoe, with 1 reply.
Replied to by danpost, over 6 years ago:
Bigbobatesloppyjoe wrote...
I'm making a shooter's game and I want the bullet to disappear when I hit a bad guy. But the code for the collision doesn't seem to work with my if at edge remove the object. here's the code. << Code Omitted >>
Between
shot
and
checkEdge
calls in
act
, place the following line: <Code Omitted>Btw, the
return
statements in your given code are kind of pointlessly placed at the end of the methods. Methods are automatically returned from when the end is reached.
Ideas for a Game
By Woriz, with 2 replies.
Last reply by Super_Hippo, over 6 years ago:
Are you sure? Pac-Man is a fantastic game. It is not really easy for a beginner to program though. But possible in three month if you like programming and want to invest some time into it. Space Invaders seems more like a one hour project.
How do I Resize my backround
By Yuuki, with 1 reply.
Replied to by danpost, over 6 years ago:
Yuuki wrote...
So basically im new to Greenfoot, and I want to learn how to resize my backround so it isnt all tiles. Help !
The
World constructor
, which is called by the first line in your
World
subclass constructor beginning with the word
super
, specifies the cell size. Do not let any tiled background image fool you into believing that the world is still tiled when giving a cell size of 1.
Platformer game
By Alex99, with 9 replies.
Last reply by danpost, over 6 years ago:
Alex99 wrote...
if i edit anything from the second world, the whole thing turns grey and i can't access anything
Show your edited version of the second world for review.
Getting world to use class methods
By PowerDj, with 6 replies.
Last reply by PowerDj, over 6 years ago:
Works perfectly, huge thanks!
The scenario run perfectly in Greenfoot IDE but doesn't at web site
By Rabestro, with no replies.
Hello, My scenario worked fine at web site some time ago. After some update it still run fine at Greenfoot IDE but web site. I can't understand why and I can't find the case. I will be glad to get any advice.
Scenario
Source codes
ClassNotFoundException
By Yehuda, with 1 reply.
Replied to by Yehuda, over 6 years ago:
...or at least advice.
I need help
By Schizorenius, with 2 replies.
Last reply by danpost, over 6 years ago:
AdiBak wrote...
setPaintOrder(street.class, stripes.class, player.class);
I am quite sure you meant:
setPaintOrder(player.class, stripes.class, street.class);
Also, the
super
constructor call would need to be called prior to this line in that constructor.
I need help with my code
By jjc289, with 2 replies.
Last reply by jjc289, over 6 years ago:
I was trying to get the figure to jump. I deleted the scenario on here, figured I'd just start over from scratch again.
How do I make an actor "fall" where there is a line?
By pio22mibi, with 3 replies.
Last reply by danpost, over 6 years ago:
pio22mibi wrote...
any thoughts on the whole code itself because it does not work.
It would be difficult to give any advice without knowing exactly what you are dealing with. A detailed explanation of how you want the ball to behave would be a start. However, usually, a move would be made before checking that it is okay and retracted if found not to be.
Can you help me?
By Alex_White1501, with 8 replies.
Last reply by danpost, over 6 years ago:
Alex_White1501 wrote...
What is the best code to make a ball bounce around in a realistic way? << Code Omitted >> This is what I'm using
To be "realistic", you would change the angle based on its current rotation (direction) and the angle of the surface on which it bounces.
How to I draw?
By pio22mibi, with 11 replies.
Last reply by pio22mibi, over 6 years ago:
Thank you so much!! It works now
How to initialize a Vector containing objects containing float values?
By ihjufaeshiju, with 7 replies.
Last reply by danpost, over 6 years ago:
ihjufaeshiju wrote...
The first method results in a syntax error and the 2nd method prints this to the log: java.lang.ClassCastException: class java.util.Arrays$ArrayList cannot be cast to class java.util.Vector (java.util.Arrays$ArrayList and java.util.Vector are in module java.base of loader 'bootstrap') any alternatives?
Alternative has already been provided:
There may be a conversion problem which would then require you to iterate through the array (from parameter argument) and place the triangles into the vector via a loop.
154
155
156
157
158
159
160
X