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

Started by
11 comments, last by cozman 21 years, 9 months ago
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]
Advertisement
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!
Peon
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?)
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.
___________________________Freeware development:ruinedsoft.com
about your config files reader.
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]
"I am a donut! Ask not how many tris/batch, but rather how many batches/frame!" -- Matthias Wloka & Richard Huddy, (GDC, DirectX 9 Performance)

http://www.silvermace.com/ -- My personal website
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
/John
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
ok so the following powerups are being implemented:

slow paddle
large paddle
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?
SlowDown/SpeedUp Ball.

,Jay
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

Although physicians would wildly shake their heads about this formula, it looks quite well (IMHO).
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

This topic is closed to new replies.

Advertisement