Solved, please delete this thread (I don't want my source files visible to anyone anymore). Thank you.
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Solved, please delete this thread (I don't want my source files visible to anyone anymore). Thank you.
Please post the code you have questions about here on the forum.
Be sure to wrap your code with code tags:
[code=java]
<YOUR CODE HERE>
[/code]
to get highlighting and preserve formatting.
How have you tried debugging the code to see what it is doing?
I add println statements to print out the values of variables to see what the computer sees as the code executes.
If you don't understand my answer, don't ignore it, ask a question.
This thread has been cross posted here:http://www.java-forums.org/advanced-java/66713-urgent-please-help-me-my-angry-birds-game.html
Although cross posting is allowed, for everyone's benefit, please read:
Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
Solved, please close thread.
The posted code does not compile: Missing class Velocity
Also there is no main() method for execution.
If you don't understand my answer, don't ignore it, ask a question.
Solved, please close thread.
I get this message: There is an IOException!
All catch blocks should call the printStackTrace() method.
If you don't understand my answer, don't ignore it, ask a question.
Just eye-balling your code, you look to be calling Thread.sleep(...) on the Swing event thread and look to be using a loop that is effectively while (true), also on the Swing event thread, both of which will put your entire application to sleep, something I don't think you desire. If I am mis-understanding your code, please clarify. Please look at the tutorial on Concurrency in Swing for more details on the Swing event thread.
Also for your next questions on this and other forums, please avoid using terms like "urgent" or ASAP. Remember that we're all volunteers, that no one likes to feel rushed, and that we strongly believe that *all* questions on this site are equally important, and that no question should be considered more urgent or important than the next. If you leave this out, and instead use an informative heading for your question, one that summarizes your problem, you'll likely get better help.
Solved, please close thread.
I have it executing now. It looks like you need to learn how to debug your code to see why it is doing what it is doing. I debug code by adding lots of println statements that print out the values of important variables that control what the code is doing. It is an iterative process. By that I mean that as you see what the code is doing, it is often necessary to print out more information to learn more.
Start with this:What variables control the bird going back? How do their values change as the code executes?the bird just continues to go back to the slingshot
If you don't understand my answer, don't ignore it, ask a question.
curmudgeon (December 18th, 2012)
Solved, please close thread.
Why not? What value of what variable controls the relaunch?I just cannot relaunch it.
If you don't understand my answer, don't ignore it, ask a question.