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
Code Cleanup
By Sn3aKyGuY, with 12 replies.
Last reply by danpost, almost 11 years ago:
Sn3aKyGuY wrote...
but Greenfoot doesn't play it that way.
I am not sure what you mean by this. Greenfoot does not 'play' gif images in itself. The correct Java code, such as that which the 'GIFActor' class contains can be used to run gif image animation. If you have downloaded this class and are using it, there are 'pause' and 'resume' methods in the class, as well as a 'setImage(String)' method you can use to change the gif file used. All you then need is an int field to count the frames as one of the animations runs.
HI, I am currently working on a scrolling game. Im already done with creating the world and main actor is now moving with the scroll effect. I am now on the part where i need to add some random enemies on my map but when i do so, they move along with the
By angelomoloboco, with 12 replies.
Last reply by danpost, almost 11 years ago:
danpost wrote...
There are three types of actors in a scrolling environment -- the main actor which is always within the window (and usually in or near the center), the static actors that always remain in the same place within the window (usually info-text like score, lives, level number, etc.)
and those actors that interact with the main actor that may or may not have some movement code of their own AND are moved (scrolled) with the background image
. This last thing is what you appear to be having problems with or have not included within your project at all. < cont'd >
When I
Simulation Needed
By Cosme, with 1 reply.
Replied to by yedefei, almost 11 years ago:
You can search in the "scenerio“ part
My score is going up too Fast
By coder04, with 6 replies.
Last reply by Super_Hippo, almost 11 years ago:
You are already have the conditions to check if there is an enemy (line 37 and line 46). In this if-blocks, you need to call the 'addScore' method on the Counter object. (the part you commented out has to go there)
GreenfootImage not working
By CKnox, with 2 replies.
Last reply by CKnox, almost 11 years ago:
Thanks for your help!
removing copies
By Kirito101, with 1 reply.
Replied to by Super_Hippo, almost 11 years ago:
Maybe you should add a line like this in your act method: <Code Omitted>By the way, the following way is more efficient I think: <Code Omitted>
How do you make a game with scrolling
By steved, with 13 replies.
Last reply by Super_Hippo, almost 11 years ago:
http://www.greenfoot.org/search?query=scroll+world&commit=
There are some scenarios which you can download and see how it was done.
Need help with floats
By xxX_Muffin.man_Xxx, with 4 replies.
Last reply by Super_Hippo, almost 11 years ago:
Ok, I don't know what is causing this, but if you add an extra step, it is working... <Code Omitted>
I cant compile my work can you someone help me out please
By coder04, with 4 replies.
Last reply by erdelf, almost 11 years ago:
i said you have to replace it with "world" not "World"
Problem with resetting score to zero
By DarkSoulDemon, with 33 replies.
Last reply by DarkSoulDemon, almost 11 years ago:
Thank you for being so patient with me thank you very much it is really appreciated thank you very much.
The Score isn't Updating
By Vlad32142, with 4 replies.
Last reply by Super_Hippo, almost 11 years ago:
Ah, now I know what he meant with his second post...
When i shoot my bullet shoots then disapears which makes an error
By coder04, with 6 replies.
Last reply by coder04, almost 11 years ago:
It worked! Thanx so much!
Making an Actor Shake
By Dab1001, with 2 replies.
Last reply by Dab1001, almost 11 years ago:
danpost wrote...
This code is allowing the speed of the actor to range between 25 and -25 in both the horizontal and the vertical. The fields 'shakeX' and 'shakeY' are representing speeds along those directions. The way you adjust those speeds are what causes the slight variations in the movement -- slowly changing those speeds. I do not know if you have more movement code for this actor and cannot determine from what you have given exactly what you should do to fix it. However, a basic shake without any other movement involved would simply be:
Turtle game
By H000, with 4 replies.
Last reply by H000, almost 11 years ago:
Thanks a lot .... am going read about it : ) please be in touch
Carrying score over to a game over screen
By BrownBoii333, with 1 reply.
Replied to by Super_Hippo, almost 11 years ago:
First, why do you want to create the Scoreboard in both worlds? In the 'act' method of 'Liveboard', you check if the 'life' variable is 0. If it is 0, you set a new world ('Endgame', which creates a 'Scoreboard' object in its constructor) and then, you add a new 'Scoreboard' to the 'old' world. You can remove this line. You also check for dying in the 'Minho' class. You only need this once. (Normally in the class of the actor which is dying.) When setting the world, you can pass the score. <Code Omitted> And then, in th
646
647
648
649
650
651
652
X