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
Greenfoot Scoreboard text issue?
By Zwadouggie, with 3 replies.
Last reply by danpost, almost 11 years ago:
Whatever is going on, it is not caused by anything within this class. This class works fine as is (tested and approved). To see if it is something within the scenario or something that is more systemic, create a new scenario, fill the background of the world with some non-red color, sub-class the Actor class with this Score class and test it. If it works with no problems in the test scenario, you can then by process of elimination determine the cause within the project scenario (comment out blocks of code until the problem goes away -- then start uncommenting bits of it until it returns).
Creating a multi-word point and click game
By ode2joy, with no replies.
Hello, I know this is a biggy but I am creating a multi-world point and click game for a computing project. I'm pretty much starting from scratch with Greenfoot and completely starting from scratch with java. I am creating a game that goes from one level to another by clicking an image to advance to the next level. It will have a help screen, menu screen and finish screen. I would like music and the ability to mute the music through a button. I know the basics of Greenfoot but knowing where to put code and how to make certain things work would be greatly appreciated. Many thanks.
help cannot find symbol
By samwertwert, with 2 replies.
Last reply by samwertwert, almost 11 years ago:
Thank You very much, It is working now.
Help Plz
By DemonsWhiteSoul, with 5 replies.
Last reply by DemonsWhiteSoul, almost 11 years ago:
Thanks^
Help with sprites and sidescrolling
By n1nikko, with no replies.
I want my sprites to move along when i side scroll, but I dont know how to do it. when my character reaches the border to start scrolling, he freezes it place and move along with the screen. Code import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Superclass of all actors. * * @author Bertie Wheen * @version 0.1 */ public class Erm extends Actor { public boolean shouldScroll; //A boolean to determine if scrolling is needed, according to how far left/right across the screen the player is. public int playerX; //The player's x value public Erm(){ } public void act() { updateShouldScroll(100, 900); //This should be in the act method so that the shouldScroll boolean is constantly updated. } /** * This method checks the players x position and sets the shouldScroll boolean accordingly. * @param The x value limits within which scrolling is not required for left/right movement. */ public void updateShouldScroll(int minX, int maxX) { Background theWorld = (Background) getWorld(); Player player = (Player) theWorld.getPlayer(); playerX = player.getX(); if(playerX <= minX || playerX >= maxX) { shouldScroll = true; } else { shouldScroll = false; } if(shouldScroll == true && (playerX >= 900 && Greenfoot.isKeyDown("a")) || (playerX <= 100 && Greenfoot.isKeyDown("d"))) { shouldScroll = false; } } }
how do I make words appear
By kylecompton31, with 7 replies.
Last reply by kylecompton31, almost 11 years ago:
MrGigglez wrote...
What a guy
what a guy
Math/Car Game
By MrGigglez, with no replies.
Im trying to create a math/car. The game asks the user math questions. There is a race track at the top of the world with two car classes. I want one car to start moving towards a finish line at a rate while the other car stays still and every time the user answers the right question the car that is still moves. the goal is to answer the questions faster and get the car towards the finish race faster than the car that is already moving. I don't know how to make the questions appear. Or make the cars move like I want them to. Im very new to programming and this is a school project.
Image won't be set??
By elementa, with no replies.
Hi, I'm trying to set an image to my actor by either <Code Omitted> or by manually doing it in right click, "Set Image". However, the image never appears to be set and when I do it manually, the image file disappears from the images folder. I'm not sure why this is happening??
Generic Type
By Busch2207, with no replies.
Done. Found another solution for my problem.
Is it OK to ask coding help questions here that aren't about greenfoot, like about Eclipse?
By Entity1037, with 4 replies.
Last reply by davmac, almost 11 years ago:
I've tried StackOverflow, but they won't let you post any questions that are like "I don't know what's wrong with my coding, someone help me!"
I've found in general that on StackOverflow it's fine to ask questions as long as you are very precise about what is going wrong and give a
short
but
complete
code sample showing what you've tried. I.e. if you try something and it doesn't do what you expect, it should be ok to ask about it on StackOverflow. If you just want general "tell me how to do xyz" then it's probably not the place. A big part of the process is l
Can't get coordinate (pixel) of actor, help please!
By Socrates, with 6 replies.
Last reply by Socrates, almost 11 years ago:
I wanted to remove collision from a few objects that you could walk by. For example I wanted a portal to the next level and I wanted the player to stand inside of it, but it has collision and it just stands next to it. I posted my scenario, it would be great if you could look at it for me ,thanks. http://www.greenfoot.org/scenarios/13110
Two final bugs with game - help needed
By Dillybar, with 15 replies.
Last reply by Dillybar, almost 11 years ago:
Finally got it working! thank you for your help danpost
My lwjgl buffer to texture code
By Entity1037, with 5 replies.
Last reply by danpost, almost 11 years ago:
DesaGrammer wrote...
I'm not sure how to do something as advanced as this sorry but it could be a simple as when the class is calling the method in line ten you put " }; " not sure if that's going to make a big difference but it probably will if you get erase the " ; " in the 10 it's made a big difference to me before Hope it work
@DesaGrammer, this IS java; and all java statements are to end with a semi-colon; so, it should not be removed.
DesaGrammer wrote...
Also when the class is calling the method in line 4 under " textMatrix = { " you put " ,"\"", " and I'm guessing there shoul
Cannot find symbol-Variable Counter
By Dan123, with 5 replies.
Last reply by Dan123, almost 11 years ago:
thanks for your help
please help. level2 cannot be cast to level1 terminal window error
By khalid11, with 2 replies.
Last reply by khalid11, almost 11 years ago:
i tried but it didnt work
608
609
610
611
612
613
614
X