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
Second array?
By Tomc84, with 7 replies.
Last reply by Duta, about 12 years ago:
What your teacher is suggesting sounds a bit like a bubble sort - if that is what he's getting at, I can provide code. It is, however, a very inefficient sorting method
What is the general code for a sidescrolling game?
By MakerOfGames, with 2 replies.
Last reply by JayWood860, about 12 years ago:
for vertical scrolling, would you replace all X's with Y's and all Width's with Height's?
wait();
By Drew, with 5 replies.
Last reply by Duta, about 12 years ago:
davmac wrote...
As a matter of style I would also include the { }s after the 'for' even though it is not strictly necessary in this case. The technique will interfere a little with Greenfoot's input handling (keyboard/mouse) though it might be ok for some scenarios. Finally, this technique will only work with one actor - once another one tries to do the same thing, strange things may start to happen (actor A will make actor B act, and actor B will then try to make actor A act).
Oh fair point, I hadn't thought about the possible recursiveness of it. I suppose you could have a List of ac
SENIORPROJECT:Recyclingpaperballgame.byGava. NEED a lil help haha
By OGava, with 3 replies.
Last reply by OGava, about 12 years ago:
thx, lol
Set to same level - why does this not work?
By PStigerID, with 3 replies.
Last reply by danpost, about 12 years ago:
Just create a world constructor to recieve the actor. Example (still using 'Arena', and adding actor Player class 'player'): 'Greenfoot.setWorld(new Arena(player));'.
Won't Publish or Export
By xillius200, with 2 replies.
Last reply by xillius200, about 12 years ago:
Thanks for the help :) yep it was to do with file access xD it hated getting images from another folder such as /smurf/smurf1.png once I had exported it xD so stuck images back in /images/ instead of /images/smurf/ and it worked perfect ^^
Letter game constructor confusion
By chris4800, with 2 replies.
Last reply by chris4800, about 12 years ago:
That's it! Thank you for explaining that. It seems so obvious now haha. Thanks again. It is much appreciated!
Someone help me fix this problem
By 2patrickMurphy, with 7 replies.
Last reply by 2patrickMurphy, about 12 years ago:
ok thanks thats a much easier fix and ill make all nessciary corrections later when we combine our pieces.
...what am I doing wrong? :(
By Omniscience, with 18 replies.
Last reply by danpost, about 12 years ago:
One thing is: you are storing the possible submitted responses in String variables, and then trying to ask if they hold a value of 'true'. Another thing: you are using 'Greenfoot.isKeyDown(String key)' to catch the response; using 'Greenfoot.getKey()' would be more appropriate in this case. One other thing (and I hope and pray that this is not what it looks like): the first line is not in a method, is it? (it should be a world variable -- and possibly static). Anyways, for getting the keystrokes:
how to make menu in the beginning of the game?
By snow13, with 2 replies.
Last reply by Builderboy2005, about 12 years ago:
Alternatively, it might be easier to create an entirely different world that you can switch into. This can make pausing a bit easier, since if you stayed in the same world, you would need methods in all the objects to support pausing.
range
By tylers, with 3 replies.
Last reply by danpost, about 12 years ago:
You will need to track two things within the for loop, that need to be initialized
before
the for loop. One to hold to closest gun object found, so far ('closestGun'), and one to hold the closest distance of that gun object ('closeness'). As you go through the for loop, compare the distance of the current gun class object with 'closeness' and if it is closer than replace the values of both variables. When the for loop is done, 'closestGun' will contain the correct gun class object. Calculate the angle between 'this' and the 'closestGun' and pass that to the projectile object class c
AI Work
By cobblerschris, with 9 replies.
Last reply by cobblerschris, about 12 years ago:
Hi i have emailed you.....
How to make sprite that move animatedly when the key is pressed down?
By snow13, with 5 replies.
Last reply by tylers, about 12 years ago:
uploaded the source now
If One Statement is True
By RM6442, with 2 replies.
Last reply by RM6442, about 12 years ago:
Never mind, I took a closer look at my code and found that this works <Code Omitted>
Fancy Collision Detection
By RedPhoneBooth, with 2 replies.
Last reply by RedPhoneBooth, about 12 years ago:
yeah, I was considering doing that, but would that eventually lead to an unreasonable amount of actors? oh well, for my game I only really need the block one and then special ones like chests and bosses. Oh well, ill improvise
974
975
976
977
978
979
980
X