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
quick question
By suushi, with 12 replies.
Last reply by suushi, almost 13 years ago:
whew! ok. thank you very much!
How to make a "Check for Updates" Button
By minecraft15, with no replies.
Ok, so I have created a video game. I am putting this video game up on my website where users can purchase it. Now, I would love to know how I can implement either a Check for new version updates button, or an auto detector for a new version of the game. Is this even possible to implement into a green foot game or Java in general? Thanks to anyone that helps.
project help
By suushi, with 5 replies.
Last reply by suushi, almost 13 years ago:
if ( Greenfoot.isKeyDown("2")){ if (Greenfoot.isKeyDown("2")) isLooping = !isLooping; if (isLooping) { java.awt.Color a; int r = Greenfoot.getRandomNumber(255); int g = Greenfoot.getRandomNumber(255); int b = Greenfoot.getRandomNumber(255); int x = Greenfoot.getRandomNumber(this.getWidth()); int y = Greenfoot.getRandomNumber(this.getHeight()); int x1 = Greenfoot.getRandomNumber(this.getWidth()); int y1 =
help me
By spooky, with 3 replies.
Last reply by mjrb4, almost 13 years ago:
You'd do well to follow the tutorials here: http://www.greenfoot.org/doc They'll take you through the interface for Greenfoot and start you off with some basic coding.
New to this - non-static method cannot be referenced from static contex
By sausagefingers, with 2 replies.
Last reply by mjrb4, almost 13 years ago:
CrabWorld in this example is your class - you could create a thousand different CrabWorld objects as far as Java is concerned and that would be perfectly legitimate. A method like addObject() needs to be called on a specific instance of CrabWorld, which in this case is what getWorld() returns (the world that's currently active in the scenario.) If you call it on the CrabWorld class instead, the compiler has no way of knowing whether you want the method called on one world object, which world object, or whether you want it called on all the CrabWorld objects! From the compiler's perspective
healthbar help
By diy_surgery, with 1 reply.
Replied to by delmar, almost 13 years ago:
You need to access the player object from the Healthbar object. Or the other way around. Either you make a method in Player that returns the health value, e.g. public int getHealth() { return health; } and then call player.getHealth() from your Healthbar object. But you have to work out how to access the player
object
(not the class) from your Healthbar object. Or you make a method in Healthbar: public void setValue(int value) { currentValue = value; } and call that method from player whenever the value changes. Again, you
Greenfoot Greeps
By bobbythewhale, with 1 reply.
Replied to by davmac, almost 13 years ago:
Please don't share Greeps code and please don't ask for Greeps code. The Greeps scenario is used as a competition in classrooms. You are meant to experiment to figure out how to improve the Greep performance. It's fine to ask for help with other scenarios - but not Greeps.
How to spit paint trails of greenfoot greeps?
By bobbythewhale, with no replies.
*ON ..Can anyone help me with this?
Game crash need help!
By FatCat, with 5 replies.
Last reply by darkmist255, almost 13 years ago:
Maybe call getWorld().konecIgre(someVariable) and have someVariable be the number?
Galaga Help
By NathanH, with 10 replies.
Last reply by NathanH, almost 13 years ago:
Mine is telling me that it can't connect to its host. It might be because I'm on a school computer. We have everything fixed now and we're back on track. We've got all of our aliens working and everything else. We're currently trying to get the aliens to shoot back at us now. Thanks for all of your help though and be willing to help.
Problem with Act() method in sprite class
By mal, with 5 replies.
Last reply by mal, almost 13 years ago:
OK, the class doesn't extend actor, it's a completely new class, I added the Act() method myself under the assumption that it would be called automatically. I've changed it to updateSprites() and now call it from the World. Hi danpost, we decided on using a spriteFactory to represent our images so we would only have one instance of each image required for the game, then we reference that image in whatever actor requires it. Each sprite can have up to 11 images (currently) that increment every time act is called. without the spriteFactory we could be looking at loading up to 17 image
Declaring a color variable
By carterfootball, with 1 reply.
Replied to by darkmist255, almost 13 years ago:
Yup. Just say something like <Code Omitted>
move() is not accurate?
By iiRainzZ, with 7 replies.
Last reply by darkmist255, almost 13 years ago:
Nope :D. It looks good when it's rounded to pixels though, don't worry, as long as the precise coordinates are kept.
Strange behavior, what am I missing?
By darkmist255, with 7 replies.
Last reply by darkmist255, almost 13 years ago:
Haha, thanks! I'm gonna read through this again for any more copy-paste mistakes. So, advice to all: NEVER code when you're very tired :D! I did this yesterday after working a few hours on a model then doing my homework, bad idea :D.
Assistance?
By Nassam, with 3 replies.
Last reply by danpost, almost 13 years ago:
You need to add a reference to TestWorld to prefix the call to explode(). 'reference.explode();'
1019
1020
1021
1022
1023
1024
1025
X