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
Making Randomly generated worlds
By ArchMageGaming, with 3 replies.
Last reply by Super_Hippo, about 11 years ago:
It doesn't really matter if you want levels or not. It was just an example. You can also save the room in which the user currently is, things which he picked up or whatever. So you have a dungeon with many rooms and each room should be generated randomly. I think the best way to start is to create one room randomly. You could create your rooms with arrays or the dungeon as a whole. In the first case, you would split your room into squares. Then you want to place objects on these squares. So for example 0=nothing, 1=block, 2=player, 3=enemy. A room could look like this then: 1 1 1 0 1 1
Making An On Screen Piano - Chapter 5; Part 4
By ConG36C, with 1 reply.
Replied to by Super_Hippo, about 11 years ago:
In line 33, you start with 'Key whiteKeys'. Shouldn't it be 'Key myKey'? You use 'myKey' in the next lines and 'whiteKeys' is the name of your array.
addObject
By Vellyxenya, with 27 replies.
Last reply by Vellyxenya, about 11 years ago:
Thank you very much :D
Can't get the 'Game Over' screen to work?
By rolando09, with 1 reply.
Replied to by Super_Hippo, about 11 years ago:
Insert the following line at the end of the act method (line 48): <Code Omitted> As it is now, this method is never executed, so it doesn't check if the player is intersecting an enemy.
Could anyone help me understand this, please?
By aromero2, with 3 replies.
Last reply by danpost, about 11 years ago:
I think that if the parts of the sum were reversed, it would be different. If: <Code Omitted>you would get: i = 0 + 1
What was the last version of Greenfoot to require JDK 1.5?
By awent0428, with 2 replies.
Last reply by lordhershey, about 11 years ago:
They might be stuck on a machine that they cannot update.
good open source projects for machine learnig
By fejfo, with 1 reply.
Replied to by fejfo, about 11 years ago:
ow I didn't think of the Programming/other categories is there a way to change it now ?
Bouncing Objects Off Other Objects
By Camyh15, with 3 replies.
Last reply by fejfo, about 11 years ago:
glad I could help
i need a score board
By dj_cammy-ron-man, with 6 replies.
Last reply by fejfo, about 11 years ago:
or just import the greenfoot Label class
Greenfoot move() function
By JeppDev, with 2 replies.
Last reply by danpost, about 11 years ago:
Any actions you actors take is dependent on any code relating to that actor. If you are wanting an explanation as to why any actor behaves the way it does, you need to show what code you are using to control that actor.
How to Have a Wombat Turn a Random Direction?
By letin, with 3 replies.
Last reply by letin, about 11 years ago:
wow none of the pictures are even showing up
Bring Objects To The Front
By Camyh15, with 4 replies.
Last reply by Camyh15, about 11 years ago:
Thank you! That's helped a lot!
I get a null error
By WarRaven, with 1 reply.
Replied to by danpost, about 11 years ago:
You cannot use 'getWorld' in the constructor of the Actor subclass. The object must be created (or, the constructor is executed) prior to the actor ever being placed into a world. So, 'getWorld' will return a 'null' value at that time. There are several ways to retrieve the value of the 'lives' field of the Unit object (or maybe you can just set the value of the 'lives' field of the HealthBar object to the appropriate value literally ('public byte lives = 5;', for example). If you must get the value directly from the Unit object, then you can do so in the 'addedToWorld' method. Like the '
Going Up and Down
By Camyh15, with 4 replies.
Last reply by danpost, about 11 years ago:
In my last code-set posted (the final 4-liner), move line 1 outside the method and set its value to 1 or -1. Check he the same value for changing direction (the inserted code between lines 3 and 4), but you now have dual conditions for changing each way. If currently moving toward a specific edge and the new coordinate reaches that edge, then change directions. You will need a set of dual conditions for each possible edge that the object can reach.
Problem with mathematical operations...
By Vellyxenya, with 2 replies.
Last reply by Vellyxenya, about 11 years ago:
Thank you very much :D
544
545
546
547
548
549
550
X