Re: Arkanoid / Breakout
gaijinco wrote:
Hi! I been programming in C/C++ for 2 years basically in a hobbist way
(never done anything serious)
For a while I did really basic game programming in ActionScript.
Now I'm begging to learn Java I have set my first big project: An
arkanoid / breakout clone game.
Because I want to learn from the process I don't want to use any
libraries besides what comes with JDK. Aside from the basics I want to
include a level editor.
As I advance in the development I would like to share my thoughts,
problems, code, etc.
Right now I'm a bit scarried about physics / collision detection. When
I was programming in ActionScript I remember having a headache with
that (specially simulating the physics for the ball)
Does anyone can point tutorials or resources that could help me?
Java GUI programming:
http://java.sun.com/developer/onlineTraining/GUI/
You really should use Swing for all your graphical/GUI programming with
Java. Swing is "new" but really at least 5 years old now, and pretty
much the standard. Definitely use it to get started, until you know Java
APIs much better.
Java Swing:
http://java.sun.com/docs/books/tutorial/uiswing/
Basic Java:
http://java.sun.com/developer/onlineTraining/essentials/
More links:
http://java.sun.com/developer/onlineTraining/
Also, get NetBeans. Trust me on this.
http://www.netbeans.info/downloads/download.php?type=5.0
After you play around with NetBeans a bit, or after you play around
with NetBeans, Java and the Swing/GUI, check out Matisse. It comes
with NetBeans, and if it doesn't blow your mind after struggling with
Java Swing alone, then your mind is completely proof against all excitement.
http://www.netbeans.org/kb/50/quickstart-gui.html
Collision detection
http://www.gamedev.net/reference/articles/article735.asp
As mentioned, there are no "physics" in a Breakout type game. The ball
just moves in straight lines, and either the X or the Y velocity is
inverted when it touches a boundary or block. Some blocks will also add
to velocity. These are simple things you can look up almost anywhere.
Some vector math will help. Try "vector math" in Goggle.
Hint: messing about in code is fun, but for real smooth coding, you
should plan out your program first. Think about this once you think you
have learned enough Java and are ready to start writing the game for real.