#### Archived

This topic is now archived and is closed to further replies.

# Here is my latest release, please give it a try (Breakout Clone)

## Recommended Posts

Here is my latest release, please give it a try (An Arkanoid/Breakout Clone) You can get it: http://www.gamedev.net/community/gds/projects/default.asp?projectID=595 http://www.libsdl.org/games.php?match_id=1092or http://www.conceptofzero.com/downloads/ZB05.zip (i left out space in the help screen, use it to leave help or credits and also to launch the ball in the actual game) Once I add an options menu it will be multiplayer, have sound, and will run in a window or fullscreen (they are all off while i add an options menu) And later on I'll implement the power up system. [edited by - cozman on June 7, 2002 8:28:44 PM]

##### Share on other sites
Looking good Pretty simple, but hey, it''s Breakout. But yeah, it''s a nice little game. The only problem I had when I played it was that it seemed a little hard. Granted, I didn''t play it long, but I had a hard time hitting the ball back. Maybe it was just me, but perhaps the paddle could move faster, or the ball faster?

Again, nice stuff; keep it up!

##### Share on other sites
yeah i am still in the process of working on finding a good speed for everything (by the way everyone: email jturk@conceptofzero.com if you are interested in an updated version, I already implemented multiplayer and an options menu)

(and does anybody know an easy way to do config files?)

##### Share on other sites
A couple of things, the physics are off a bit. The ball will suddenly move up or down faster after a rebound on a side wall. The ball also seems to move a bit choppy, maybe you should use a better method or more precision when deciding it''s coordinates for rendering.

Maybe you could use the mouse for input?

Otherwise, pretty nice.

##### Share on other sites
please note, this is all from my memory, it may have to be fiddled with to get it werking properly, hope it helps tho!

    void ReadConfigFile() { FILE *f=fopen("config.cfg","rt");  while(!feof(f)){   char line[100] = {0};   do {     fgets(line,100,f);   } while(line[0]==' '||line[0]=='\0'||line[0]=='\n');   DoCommand(line);  }  fclose(f);}void DoCommand(char *line) {   char cfg[25] = {0};   char params[3][25] = {0};   int ivals[3];   // for a setting with a string value   // add as many params as you want go params[0]..params[1]..      sscanf(line,"%s %s",cfg,params[0]...);   if(!strcmp(cfg,"data_path"}){     setDataPath(params[0]);   }   // for a setting with a integer value   sscanf(line,"%s %i",cfg,ivals[0]);        if(!strcmp(cfg,"fullscreen"}){     setFullscreenPath(ivals[0]);   }

[edited by - silvermace on June 10, 2002 2:14:05 AM]

##### Share on other sites
I have to agree with iwasbiggs, the physics are strange, the ball seems to bounce off randomly. And you should defenetively use the mouse for input, IMO, or at least have an option for it.
Other than that, it looked good, I''m sure it will be a good game when finished.

/John

##### Share on other sites
Thanks for the help and suggestions everyone, I''ve got the config file working I think. As for the physics, I am not good at all with physics (still too young to take it at my school, and the tutorials online are to complicated for a simple breakout game) and Mouse support actually was in it, but I took it out because of bugs, and I had more important things to work on, soon it will be an option again.

Suggestions and Code Examples are still welcome

##### Share on other sites
ok so the following powerups are being implemented:

powerball (ball creates bomberman-esque chain reaction on impact)
gun (paddle can shoot some sort of projectile)
add an extra ball to play

any other suggestions?

##### Share on other sites
SlowDown/SpeedUp Ball.

,Jay

##### Share on other sites
quote:
Original post by cozman
As for the physics, I am not good at all with physics (still too young to take it at my school, and the tutorials online are to complicated for a simple breakout game)

Suggestions and Code Examples are still welcome

Hi,

I am going to try to give you a very basic idea of the physics behind break-out, but please forgive my bad English on this: Technical English is not one of my strengths :-)

Generally speaking, keep angles always of the same ?size. What I want to say is this: Suppose your ball moves at a speed of 4 pixels to the right and 9 pixels up in each frame (-- just an example --), now it bounces against a wall on the top of the screen, now negate the y direction (9 pixels down) and keep the x direction. Same goes for bouncings on right/left walls: negate x direction and keep y direction. Although very basic, this works quite well for me.
Now for something a little harder: What about reflections on the paddle? The greedy approach is to measure the distance between the middle of the paddle and the point, where the ball hits the paddle. Now, if this point is on the left half of the paddle, reflect it using the above general rule (keep x and change y), but alter x by giving it a little thrust.
Small example:

Collision detection at x, y
Ball speed is vx, vy
Pad middle is at x + 7
(so x is on the left side of the paddle and 7 pixels off the center)
New Ball speed is -vy, vx - 7/SomeValue

You can even experiment by taking into account the movement of the paddle, so: if the player is just moving the pad to the left, add a drift to the ball that reflects it a little harder to the left...

Am I talking gibberish?? Hope that could help you a little... Good luck!!

Beren
Do or do not do! There is no try. -- Yoda

##### Share on other sites
I have most of that in the game, the small degree of randomness (which turned out not to be so small due to a bit of old code that did the randomness twice) was creating bad physics. I have that setup working for my paddle too, it was just the wall bounce that seemed to slow down. I have fixed that and the upcoming release 0.8 will feature my new code. Thanks for all the advice everyone

##### Share on other sites
New version is out!!!!!!! Please give it a try
either the gamedev showcase again:
http://www.gamedev.net/community/gds/projects/default.asp?projectID=595
or at
http://conceptofzero.com/

New features include multiplayer and five powerups, as well as sound effects (which you can turn off if they annoy you ). Give it a try, and please continue with the feedback.

(there are 2 installers, the .msi installer is smaller but not everybody on Windows9x has Microsoft Installer installed, so I provided a zip with all the needed files, if you have 2000 or XP or know you have Microsoft Installer I recommend the smaller .msi)

[edited by - cozman on June 20, 2002 8:48:22 PM]

##### Share on other sites
lol!
i found it funny how the ball randomy bounces off in all directions, and sometimes speeds up or slows down. i was very impressed by how if the ball is lower than your paddle, and u touch it, instead of just falling through the paddle, or magically bouncing up, it changed direction, but was still falling down. it''s a small nice touch that everyone seems to ignore. and for that, me likes! lol, good job on this game.

---
shurcool
my project

• ### Forum Statistics

• Total Topics
628400
• Total Posts
2982446

• 10
• 9
• 19
• 24
• 10