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
2048 merge error?
By whattheheck, with 2 replies.
Last reply by whattheheck, over 6 years ago:
Adding the displayValue function doesn't seem to fix the issue. It seems like when squares merge, they get stuck in place
My Code LØØps?
By DecentRug03, with 4 replies.
Last reply by danpost, over 6 years ago:
DecentRug03 wrote...
But I need to have a while loop in there.
Why?
DanPost I challenge you to make a game for me.
By popo88, with 2 replies.
Last reply by danpost, over 6 years ago:
popo88 wrote...
Some kid said that you are the best and now I am now challenging you to make the best game using greenfoot.
I doubt the kid meant that I was the best in the game development department. See my
Games by danpost
collection to see what I mean.
Chapter 2 - Little Crab (Differences between the book and the scenarios!!!)
By pazi2000, with 2 replies.
Last reply by danpost, over 6 years ago:
On page 37, I do not see: <Code Omitted>but I do see: <Code Omitted>
Boss with healthbar
By Yoshi21137, with 30 replies.
Last reply by Yoshi21137, over 6 years ago:
danpost wrote...
Probably the easiest way is to create a method in the Boss class to accept a BossHealth object and then assign it to the field.
how do I assign an object to a field?
Collision and removal between two actors when size is larger than the other
By tudibk, with 11 replies.
Last reply by tudibk, over 6 years ago:
Got it fixed, thanks a lot danpost :)
My game is VERY laggy
By footpickle, with 8 replies.
Last reply by danpost, over 6 years ago:
footpickle wrote...
Oh, so it was making TONNS of unnecessary objects? From my experience, more actors in the world cause more lag because the program can't keep up with the amount of data all the objects are sending? or something like that, I guess...
Well, yes -- anytime you have more than 100 or so actors doing stuff in the world, lag will creep in (due to CPU processing time). However, image processing is a hog on CPU time as well -- and multiple images are created for each
Explosion
object created.
help me please..about how to handle about this error
By ZiadTheVortex, with 3 replies.
Last reply by danpost, over 6 years ago:
Remove the semi-colon at the end of the problem line.
Placeholder Help
By ItzTigerr, with 2 replies.
Last reply by ItzTigerr, over 6 years ago:
danpost wrote...
ItzTigerr wrote...
So im making a place holder for my tic tac toe game and I know that the error im getting in the class is cause I need to put the method in my world codes. I just don't know where << Code Omitted >>
Anywhere within the class that is not within another method. A new image (see line 7 of
PH
class) is already a transparent one. You can remove lines 8 thru 10. In populate, you should either use all literals or make all depend on the size of the world. At any rate, line 32 places a
PH
object at the same location as line 37. Remove line
resizing a gif image
By DaRafster, with 1 reply.
Replied to by danpost, over 6 years ago:
DaRafster wrote...
I've managed to get a gif image to act within the world when ran, but it's way too big. So how would I scale my gif image?
Use a
for
-each loop to iterate through the images to scale them all.
Making an actor face right or left
By nextstone, with 5 replies.
Last reply by danpost, over 6 years ago:
I am saying to store all 8 images. If not using an array, you may might want to use
switch
blocks to hash out which image to use (out of 4 for each block).
IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed.
By footpickle, with 11 replies.
Last reply by footpickle, over 6 years ago:
It doesnt matter anymore i figured it out :)
Coding more smart
By DaRafster, with 2 replies.
Last reply by DaRafster, over 6 years ago:
danpost wrote...
You could combine the
addObject
lines with the assignment lines before them (in most cases. That is, use the assigned values in place of what the variable the value is assigned to in the
addObject
line. As the pairs of lines for your labels are already quite long, I might leave them alone (or just put the
String
values in a variable and use it when creating the actor in the
addObject
line). A non-label example would be to combine lines 10 and 11 into the following: <Code Omitted>
T
GamePads
By Laks, with no replies.
Hi, I am trying Greenfoot with GamePad but I am having trouble with the GamePadTester. I am getting the error package net.java.games.input does not exist. Any help on how to get this started? I am using Greenfoot 2.4.2. Thanks
Help with programming 2048?
By whattheheck, with 1 reply.
Replied to by danpost, over 6 years ago:
Here are examples: <Code Omitted>or (combined) <Code Omitted>
143
144
145
146
147
148
149
X