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
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.
A question. how to remove
By Zwemvis, with 6 replies.
Last reply by Zwemvis, over 6 years ago:
Hoi Danpost Thanks for your help :-) Bedankt voor je hulp.
Need help with my Snake game
By Sedrik, with 4 replies.
Last reply by danpost, over 6 years ago:
Sedrik wrote...
But when I put static number there instead of variable, it works. When there is static number snake gets bigger with bigger numbers. Once I put variable there it stops working.
That is usual behavior for when the variables are in the wrong class -- but, I am not sure that is the case here. The
if
statements in your
getScore
and
getPocitadlo
methods are misplaced - or, at least the one in
getScore
is. Each
Chvost
instance will call these methods and the value of
score
, in particular, will be inflated (incremented once per
C
How to add a score that is more than 1
By Sebastiano, with 3 replies.
Last reply by danpost, over 6 years ago:
Sebastiano wrote...
Thankyou @danpost , helped alot however i have just published my space invaders game however the run button acts as if it is the act button and only executes the instruction once
Re-publish it again. This time, check the
Publish source code
check box.
154
155
156
157
158
159
160
X