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
Points based on how fast you finish the game?
By jlee2014, with no replies.
How would I go about programming points that are based on how fast you finish the game. Like say points start at 100 and it counts down 5 with every second?
Access Data from a Non-Actor class through getWorld()
By GRIFFIN, with 4 replies.
Last reply by GRIFFIN, over 12 years ago:
Thanks a lot! I'll need to look at your code for a little bit to understand it, but this will help a lot!
How can i make enemies spawn
By GamesGrinder1998, with 20 replies.
Last reply by GamesGrinder1998, over 12 years ago:
danpost wrote...
I just realized that your Fireball class extends Player. That should not be. A fireball is NOT a player. Change it so that Fireball extends Actor.
also my atWorldEdge method won't work anymore, how can i fix this as well
Check ball speed in Breakout?
By mpmarino, with 1 reply.
Replied to by danpost, over 12 years ago:
Is there a question here?? Is there some code you are having trouble getting to work the way you want?
Starting world after pressing enter
By collint25, with 3 replies.
Last reply by danpost, over 12 years ago:
Use a separate world for your title screen and have its act method detect the press of the "enter" key. When detected, create and set active a new game world instance.
Objective C help
By Mint_Green, with 1 reply.
Replied to by Zamoht, over 12 years ago:
First of all you will have to provide us with some code.
Actor bouncing using vectors
By Unicus, with 6 replies.
Last reply by Unicus, over 12 years ago:
Sure, but I think you misunderstood me. Your code applies a force vector (using 'addForce') which is independent of the original object velocity. A true 'bounce' should take the original velocity into account, even if you want to reduce it by some proportion.
Yeah, I know what you mean, and I'll implement it :) There are many things to consider at this point still, and now I'm working on transmitting the collision power from one actor to another, Ill see if I manage that... :)
need help trying to figure out how to count how long the longest line is
By newprogramming, with 1 reply.
Replied to by danpost, over 12 years ago:
If it is only the length of the longest line that needs to be determined (that is, which line does not matter), then you only need two int fields -- one to hold the longest line found so far; and one to hold the running count of the line being counted (a third int field would be required to hold the column number of the longest line, if needed). If when turning, if kara ends up facing north, add one to the running count; If kara ends up moving east, compare the value of the running count with the value of the longest line found so far. - if the running count is greater, set longest line f
How do I make words in a string appear and go across the screen?
By hugotherobot, with 3 replies.
Last reply by danpost, over 12 years ago:
First create a new Actor subclass and name it something like 'Text'. Open up the code editor for that class and find the constructor ( 'public Text()' ). Add the words 'String word' between the parethesis; this will facilitate in receiving the word so the proper image can be set to the new 'Text' object. Between the curly brackets, create an image of the 'word', by using the GreenfootImage constructor that creates the image of a String, and use the 'setImage' method of the Actor class to set the image of the actor to that image. In the world class, you can now create an Actor object tha
Help with my Project no idea how to do it?
By bizzard, with 2 replies.
Last reply by bizzard, over 12 years ago:
thank you
้How to lose health from the left side on Healthbar
By Maydonna, with 8 replies.
Last reply by Super_Hippo, over 12 years ago:
Ugh, you are right. I should have checked the API before answering.
Creating new Wombat object
By mpmarino, with 3 replies.
Last reply by mpmarino, over 12 years ago:
Zamoht... thanks!!!
Help me with programming - BEGINNER
By Sayah, with 1 reply.
Replied to by Entity1037, over 12 years ago:
Look up "for" loops and "while" loops. Also, Greenfoot. has the methods "getWidth()", "getHeight()", and "getWorld()".You can use them to find out when to go to the next colomn/row. I can't just give you the code though; you wouldn't learn really anything. I can tell you that it will involve a nested loop though.
Is there a way to find the number of objects in a list?
By wasdodinian, with 3 replies.
Last reply by danpost, over 12 years ago:
bilzard wrote...
<Code Omitted>This gives you the size of your list 'plant'.
or just use: <Code Omitted>
Problem with running Greenfoot game on a webpage
By Conor_Begley, with 14 replies.
Last reply by davmac, over 12 years ago:
Conor_Begley:
I tried removing the space and I still get the error, though the java console says "0" which means I should "set trace level to <n>" but I'm not sure what that means....
Could you post a link to the scenario, wherever you've uploaded it?
701
702
703
704
705
706
707
X