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
caesars chiffe
By Heidkamp, with 1 reply.
Replied to by danpost, 8 months ago:
Heidkamp wrote...
how can I find the proper syntax for adding the ascii value of a character an integer (lets call it offset) and then convert this new integer into the respective string (ascii code)? in principle, char of (value of char+offset) - this is how I would describe it
<Code Omitted>
How to do a loop background music.
By I3litz, with 1 reply.
Replied to by danpost, 8 months ago:
I3litz wrote...
The music goes 13 sec but i need it in a loop. AND it muss go in multiple levels without stopping only when he dies.
Please provide the class code from where you music is started.
How to shoot in the direction where the player is looking at.
By I3litz, with 1 reply.
Replied to by danpost, 8 months ago:
I3litz wrote...
I need help in my game. I cant figure it out how to do it. When the player is looking to the right the bullet flies to the right and the same in the other direction (left)
Please provide the class codes for the player.
Why are my hearts offset from the left?
By daviddd, with 2 replies.
Last reply by danpost, 8 months ago:
daviddd wrote...
Hey, i am trying to make a game, on the main menu screen you select your difficulty, e.g easy, you will have 5 lives and they will show up as hearts in the top left corner of the game, but when i pick medium or hard they will be moved a bit to the right, does anyone know why is that? << Code Omitted >>
The location of the
HealthBar
instance does not vary; but, its image size does. That is the essence of your problem. Either adjust the location as the health value changes or just don't change the size of the image. That is, replace
health
on line 12 wit
Why can't Greenfoot 3.8.2 export jar files?
By sandhsf, with no replies.
Why can't Greenfoot 3.8.2 export jar files?
Why is any Game on my Greenfoot Not opening
By User_7382, with 1 reply.
Replied to by Jasonh, 8 months ago:
try to restart your computer and doing it again. I had this same problem last week and it worked for me
This time we won't talk about the program, let's talk about something else.
By sandhsf, with no replies.
I have a question for you, are the people who use Greenfoot to develop games new to game development?
getX() getY() public variable actor not in world
By power_coding, with 14 replies.
Last reply by danpost, 8 months ago:
I did notice one issue. In both the longen_onderkant and longen_top classes, the check to remove all instances of its type from the world should be the last
if
in the
act
block. The first attempt to execute a
move
call
after
all instances were removed will fail for actor not in world. My long-standing concern is the reference to
background
.in lines 11 and 12 in the
longen_middel
class. I do not see how it could reference an instance of the
background
class (at lest not straight off). As far as I can tell, it is just a class name (which yo
my scrolling background ends up getting pixelated every time
By Spacer, with 6 replies.
Last reply by Spacer, 8 months ago:
It finally worked!! Thank you :)
Animate Delay
By risebille, with 2 replies.
Last reply by danpost, 8 months ago:
In lines 5 and 6, use: <Code Omitted> You can remove lines 22 and 23 (making only one loop) without changing what it does. Plus, then, you can make line 24 to be: <Code Omitted> To slow down the animation, you must allow time between image changes; more specifically, act frames where the image does not change. You can accomplish this by multiplying the number of images by the number of frames for each image. That is the maximum value of the
animationCount
field. The modulus 8 of the value acqui
removing buttom
By nuggetnugget123, with 5 replies.
Last reply by nuggetnugget123, 8 months ago:
thanks man it worked
Como fazer para atirar?
By KFEdward, with 1 reply.
Replied to by merial9, 8 months ago:
Cara eu não tenho a menor ideia
. No momento estou lendo o livro em inglês mesmo. Sugiro dar uma olhada em alguns dos materiais ou jogos que estão na galeria. Mas vá enfrente não desista! Já estou na pagina 40 atividade 3.8 . Achei que era complicado mas seguindo da forma que eles ensinam é bem intuitivo.
player gets stuck
By Jip_maris, with 1 reply.
Replied to by danpost, 8 months ago:
Jip_maris wrote...
trying to make a platformer game. i already got stuck on the following problem: my character can jump, but it doesn't jump anymore after touching/standing on the big "platform" I made. does anyone have a tip to help me to fix this? I'd really appreciate it :) << Code Omitted >>
I do not condone the
onGround
method used here. First off, it only checks one point of contact (center of image's base). Secondly, it does not tell you what part of the platform is there at that point (actor could fall or ascent into the platform with any amount of shared space).
Greenfoot.ask() question
By Cbazz, with 2 replies.
Last reply by danpost, 8 months ago:
Cbazz wrote...
when I try to use this with an If() statement ( if ( lastKey == "w" ) ) it doesn't work. Any reason?
Yes. The literal is not the SAME
String
instance as what the variable
lastKey
may hold. It is a different instance containing the very same character string. Use the following for comparing the contents of the
String
objects: <Code Omitted> Note that the variable name and the literal string may be swapped around; however, if the contents of the variable is
null
, an error will ensue (
NullPointerException
).
java.lang.RuntimeException
By prelaoved, with 5 replies.
Last reply by prelaoved, 8 months ago:
Spock47 wrote...
As far as I see, it has only problems when being executed on the website, not in Java. I guess it has to do with the awt.Font and awt.Color that are used in the scenario. As far as I know, for running correctly on the website, it has to use greenfoot.Color and greenfoot.Font instead of the awt font and color. For details see here: https://www.greenfoot.org/doc/font_color Live long and prosper, Spock47
I've followed it but it's still giving me an error, can you help me fix it?
4
5
6
7
8
9
10
X