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
addObject within a set Distance, using vectors
By matt.milan, with 1 reply.
Replied to by davmac, over 13 years ago:
Working on the assumption that you want 'vtr' to represent the distance and direction that you want to place a planet from myShip, then, there are a few lines that look wrong to me: 18. addObject(new Planet() 19. (int)vtr.getX(),(int)vtr.getY()); You're not adding the ship's co-ordinates the vector; it should be more like: addObject(new Planet() (int)vtr.getX() + myShip.getX(),(int)vtr.getY() + myShip.getY()); And with this: 08. vtr = new Vector((double)myShip.getX(),(double)myShip.getY()); ... is setting the vector size an
compiling problems
By danbhome, with 4 replies.
Last reply by danbhome, over 13 years ago:
btw for first error i based it off tut access p2 and a little of nightmare: emergence
Update on Live Scores...
By Omniscience, with 9 replies.
Last reply by sp33dy, over 13 years ago:
Hi, No need to thank, I'm just pleased to help. You are trying to call setFont on the String object text. You need to setFont on a GreenfootImage I believe, so image.setFont(font) in your case.
Is it possible to make a high score list? If so, how?
By Sneaky4296, with 2 replies.
Last reply by Sneaky4296, over 13 years ago:
Is there any way to see what else is coming in that update?
Mouse Movement Error
By matt.milan, with 5 replies.
Last reply by matt.milan, over 13 years ago:
haha yeah that's pretty redundant...thanks for the optimization tip, i'm gonna switch that now. i guess i should have seen that earlier
Help with abstraction
By Sneaky4296, with 2 replies.
Last reply by Duta, over 13 years ago:
replace
if(KeyNum = x)
with
if(KeyNum == x)
.
=
is used when you're
setting
something equal to something else (
int score = 7
makes a variable "score" and
sets it equal to 7
.
==
is used when you're
checking if
something is equal to something else (
score == 7
checks
if the variable "score" is equal to 7, and
returns a boolean
, meaning that when score
is
equal to 7,
score == 7
is exactly the same as
true
) Oh and in case you didn't know (I assume you do but just on the off chance) a
Piano shows the piano_complete but no sound to be heard
By PKHG, with 2 replies.
Last reply by PKHG, over 13 years ago:
Thanks, but problem is solved by reading the book better! Not using the mouse to touch the keys but using the keyboard really ... sorry for (stupid) question ;-) Peter
Shoot delay code?
By MakerOfGames, with 1 reply.
Replied to by matt.milan, over 13 years ago:
private int shootDelay = 0; private final int SHOOT_DELAY_MAX = some number; // shootDelay++ if (shootDelay >= SHOOT_DELAY_MAX) { do stuff shootDelay = 0; } what do you think about this
Lines
By Razzo, with 3 replies.
Last reply by Morran, over 13 years ago:
You could make the images wider, or you could drop 3 per act. You could try: <Code Omitted> instead of <Code Omitted> I hope that this helps.
counter
By joemoma, with 15 replies.
Last reply by Morran, over 13 years ago:
Yeah, it's not affected by the speed slider because it counts off of real milliseconds and not frames. (Although, to be honest, I normally use the "int--, if < 0" anyway).
Something
By ihatenoahbravo, with 3 replies.
Last reply by Duta, over 13 years ago:
Morran wrote...
<Code Omitted>
Or <Code Omitted>
Greenfoot Start up Help
By mylinnn, with 5 replies.
Last reply by hbdavies, over 13 years ago:
Thanks so much tut newbies eh
Help with Letters
By theDoctor, with 41 replies.
Last reply by theDoctor, over 13 years ago:
Yes. I'll go through the tutorials. Can't argue with your logic!
kinect
By swapthomas, with 1 reply.
Replied to by mjrb4, over 13 years ago:
Is there a question here or...?
Zombie spawn
By armoredarmada, with 5 replies.
Last reply by danpost, over 13 years ago:
The Java Tutorials
contain many trails, and has an abundant supply of information linked to this page. I suggest you start by going to the second sub-title on the left in red --'Trails Covering the Basics', and the second item listed under that is 'Learning the Java Language'. Click on that and you will be on your way.
999
1000
1001
1002
1003
1004
1005
X