Arkanoid / Breakout

G

gaijinco

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?

Thanks a lot I hope to post soon about the experience so far.
 
C

Chris Smith

gaijinco said:
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)

In any conventional sense of the word, there is no physics in a
"breakout" game. You pretty much get to pick your own rules. The
typical rules are that hitting a wall just inverts the corresponding
component of velocity, and hitting the paddle sets the horizontal
velocity depending on the position where the ball hits. None of this
has any physical justification. There is also no gravity, although a
version with gravity (and a suitably fast initial velocity so that the
ball could reach the top) would be interesting, I suppose.
Does anyone can point tutorials or resources that could help me?

The Java Tutorial on java.sun.com is good, and very extensive and
detailed. Google should find it easily. If you want something more
specific, please ask a specific question.
 
M

Mark Space

gaijinco said:
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.
 
G

gaijinco

Thank you all for your responses!

Ok. I thnik I know now enough to start building. I'm going to check
NetBeans and Matisse.

So there is no physics, per se? But I would think that to create a
better game it would be great to put physics. Fortunalety it seems that
it doesn't have to be quite complex, just to bouncing of the balls and
the ability to put effects into the ball (like in tennis) Is there any
library that helps with that? Standard or not?

A what about collision, is there something to built upon?

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top