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
Writing a file
By Busch2207, with 9 replies.
Last reply by K_O_P, over 12 years ago:
@ Busch Maybe you can store more ints, when u use Symbols instead of numbers if you take 100 different symbols, you can write the numers 0 to 99 in just one space! you just need a method that converts a number in this code and backwards.
Bring Image To Front
By RedPhoneBooth, with 4 replies.
Last reply by danpost, over 12 years ago:
RedPhoneBooth wrote...
but actors cant add objects to the world right?
That is not quite true. As long as the actor is in the world, you can use the 'getWorld()' method to access the 'removeObject' and 'addObject' methods. <Code Omitted>
Assignment to make the classic "Frogger" game.
By decobro, with 7 replies.
Last reply by decobro, over 12 years ago:
Okay I have added some squiggly brackets around my code and I have managed to get it working again! Thanks for your help everyone, much appreciated.
List.toString() then String.toList()
By Razzo, with 3 replies.
Last reply by tkiesel, over 12 years ago:
I should mention that while the work to write something like this can be finicky and tough, once you have it, writing new levels for your game becomes so much easier, and for really complex levels, your world file can shrink from an enormous monstrosity to something far more manageable! :) Two high school students of mine (with some help on file IO from me) used this basic system to write a Galaga-type space shooter, and their level Strings even included timing data. Cool stuff.
Sounds for Movement
By lgbrf, with 2 replies.
Last reply by lgbrf, over 12 years ago:
That worked great, thanks :D
Cant figure it out!!!! scenario
By mfiala5, with 2 replies.
Last reply by davmac, over 12 years ago:
I cant even get the move(); command to work
Why not - what goes wrong? Post your code here.
changeing the img
By -nic-, with 13 replies.
Last reply by -nic-, over 12 years ago:
[Disallowed URL] [Disallowed URL] the first is the bosshealth classes value and the second is the bosses value but there different
Help with programming basics
By mfiala5, with 2 replies.
Last reply by SPower, over 12 years ago:
I think I know what you did wrong. In the greenfoot book, there are APIs already defined for you. In a new scenario, those APIs aren't there. You just have to copy those APIs into your scenario. Next time, you have to think about it yourself. You are doing this for school, so you have to understand it, or you'll get bad grades. I'm not going to create a scenario for you anymore, I realized you really have to do it yourself. Success!
The Third Dimension
By Razzo, with 5 replies.
Last reply by Razzo, over 12 years ago:
Just looked at it, Looked really smooth and all :) Opened the code, 0.0, Way too difficult for me D:
How do you make an actor face another actor if they are a certain distance apart.
By MakerOfGames, with no replies.
Title: How do you make an actor face another actor if they are a certain distance apart? Like in a TowerDefense game
start applet not initialized??
By -nic-, with 3 replies.
Last reply by -nic-, over 12 years ago:
anyway i will have to install another day (need perms)
how would you find what direction a sprite is ??
By -nic-, with 3 replies.
Last reply by SPower, over 12 years ago:
You're welcome
how to get a picture without a white bagschreen
By martijn13039, with 5 replies.
Last reply by -nic-, over 12 years ago:
press ctrl+n for a new img and go to advanced options go to fill with and select trancparancy then paste img and then use eraser tool to delete bits you want to be inviable i hop i helped please ask if you have more questions [Disallowed URL]
Object moving from one spot to another continually
By Alfie5, with 2 replies.
Last reply by danpost, over 12 years ago:
Another way is by saving just the other location (the one it is not at). I will call your object a 'Teleporter': Use <Code Omitted>to add the object to the world (nextX, nextY, currentX, and currentY need to be set to the coordinates of the two points the object teleports between). The 'Teleporter' class needs a constructor to receive the two coordinates sent to it; so, this code would go in the 'Teleporter' class:
removing objects at the left of screen
By e_e13, with 57 replies.
Last reply by danpost, over 12 years ago:
When 'getWorld' is called, it tries to return the world that the object in question (the counter) is in. If is has not been 'addObject'ed to the world or it has been 'removeObject'ed from the world, then 'getWorld' will return 'null' and a NullPointerException occurs.
987
988
989
990
991
992
993
X