Breakout for META

Creations

jicehel

6 years ago

As the title can maybe explain it, it's a Breakout for the META  ;)


Last change: 

  • Add bonus / malus


All suggestions, propositions of code optimizing, code part to do it better, perfect the display low the blink, ... are welcome



 



View full creation

jicehel

NEW 6 years ago

Update of the version:

  • change titlescreen,
  • added sprite for Paddle and ball
  • change system of collisions but i need help to make it better because sometimes collisions are a little crazy between bricks. If someone can perfect the collision system, it's will be appeciated.
  • score system with save added

Sorunome

NEW 6 years ago

I just tried it, and i was positively surprised that it seems like the hitbox of the paddle is more like that of a dome, what it should be (as you get different angles throughout the game then) which is great!

I personally found the flashing on the display  a tad annoying every time thje ball hit something.

Are you planning on adding powerups or thelike?

jicehel

NEW 6 years ago

Hi Sorunome. nope at the moment i didn't thought about that. But yes, it's a good idea, and i have probably to do it.

I need help to have correct bounds on bricks, because sometimes, it's make not at all a logical. 

I can remove the flashing lights on sides or bricks. Did you let some flashing lights ? Maybe at start and then ball go out ?

So the first thing i would is to have good physical (for paddle and sides, it's good for me) for bricks

After i'll had a line to show the sides (it's better to show them i think) else i was asking me what could be better: make the paddle, the levels and the bricks more big and add scrolling or let them as they are).

In third i would add bricks data (color, number of hits or unbreakable,  next brick to show after hit)

Forth, a system a levels (with maybe an editor to make them) as external data file.

At last, yes powers (positives and negatives: paddle larger, three balls,  

jicehel

NEW 6 years ago

@Sorunome if you know how to do it's could be cool that you give me a little example of writting data to a dat file and read the data from him (to make the levels dat file)

Others - Someone have try ? what's your opinion about lights and evol of the game ?

jicehel

NEW 6 years ago

I have a problem to load an ray of level.

I would use:


int8_t level_brick[NB_LEVEL][ROWS * (COLUMNS + 1)]; // Array of data for the levels; last is the type of visual brick of bonuses

level_brick[1][51] = {              4, 4,  4,  6,  6,  6,  4,  6, 4,  6,
                                    6, 3,  6,  6,  6,  3,  6,  6, 3,  6,
                                   20, 3, 17,  3, 17,  3, 12,  7, 3, 12,
                                    2, 2,  7, 14,  7,  2,  7, 18, 2,  7,
                                    9, 2,  9,  9,  9,  9,  2,  9, 2,  2, 7 }

 level_brick[2][51] = {            9, 9, 19,  7,  7, 6, 6, 6, 6, 6,
                                   11, 7,  7, 11, 20, 6, 6, 6, 6, 6,
                                   18, 7, 16,  7, 18, 6, 6, 6, 6, 6,
                                    6, 6,  6,  6,  6, 6, 6, 6, 6, 6,
                                    6, 6,  6,  6,  6, 6, 6, 6, 6, 6, 7 }

level_brick[3][51] = {              5, 10,  1,  7,  7,  7,  7, 1, 10,  5,
                                    5, 10,  1, 16,  7,  7, 16, 1, 10,  5,
                                    1, 10,  1,  7, 12, 12,  7, 1, 10,  1,
                                    2, 10,  2,  2,  2,  2,  2, 2, 10,  2,
                                    2, 10,  2,  2,  2,  2,  2, 2, 10,  2, 7 }


But i have errors due to my level of c but on internet i don't understand my error. Can you explain me how to do ?

Sorunome

NEW 6 years ago

you are missing semicolums after your array definitions. Also, you say it was a 2D-array but define as 1D. And you didn't specify a variable type

uint8_t arr[3][2] = { {0, 1}, {2, 3}, {4, 5}};

jicehel

NEW 6 years ago

yes, the problem is i was not using it like i had. I have corrected with your example. Your little example is more clear for me than all pages on the web ...

I have corrected like that and it's works:

int8_t level_brick[NB_LEVEL][ROWS * COLUMNS + 1] = { 

  { 4, 4,  4,  6,  6,  6,  4,  6, 4,  6,
    6, 3,  6,  6,  6,  3,  6,  6, 3,  6,
   20, 3, 17,  3, 17,  3, 12,  7, 3, 12,
    2, 2,  7, 14,  7,  2,  7, 18, 2,  7,
    9, 2,  9,  9,  9,  9,  2,  9, 2,  2, 7 }, 

  { 9, 9, 19,  7,  7, 6, 6, 6, 6, 6,
   11, 7,  7, 11, 20, 6, 6, 6, 6, 6,
   18, 7, 16,  7, 18, 6, 6, 6, 6, 6,
    6, 6,  6,  6,  6, 6, 6, 6, 6, 6,
    6, 6,  6,  6,  6, 6, 6, 6, 6, 6, 7 },

  { 5, 10,  1,  7,  7,  7,  7, 1, 10,  5,
    5, 10,  1, 16,  7,  7, 16, 1, 10,  5,
    1, 10,  1,  7, 12, 12,  7, 1, 10,  1,
    2, 10,  2,  2,  2,  2,  2, 2, 10,  2,
    2, 10,  2,  2,  2,  2,  2, 2, 10,  2, 7 }};

Thanks Sorunome. Now this evening i'll be able to make 'levels' for this game and i hope to add soon bonuses  ;)  (I hve had const to activate or desactivte light blink and atm i have put them off. it's will maybe be a parameterin a menu  later)

jicehel

NEW 6 years ago

Last change: 

  • change a few the method to manage objects (ball and paddle)
  • added brick sprites at place of the actual system of color
  • added in code levels as i don't konw how to manage a dat file for these informations
  • a little change system of collisions for bricks but it's always not perfect and if you can propose a good solution to make it more efficient, i'll take it...


In my minds: 

  • Add some levels
  • Manage special bricks (no brick and unbreakables)
  • Add some bonus / malus
  • Add a sprite for 'score bar' with hearths for lives and add
  • Add a menu to activate options and save them (lights for events atm but maybe some options will seems usefull later) and to show scores


I need help to perfect the system collision with bricks because the actual don't works very well.

All suggestions, propositions of code optimizing, code part to do it better are welcome

jicehel

NEW 6 years ago

Last change: 

  • a little change system of collisions for bricks but it's always not perfect and if you can propose a good solution to make it more efficient, i'll take it even i have an idea now to do it but i have to try this evenning if i have some time. The ystem works better anyway and you should have less bugs even it's don't satisfy me atm
  • added managment of empty brick and unbreakables (sometimes when ball hit them, it can go through in it but i hope what it will be resolved
  • added two other levels


In my minds: 

  • Add some levels
  • Add some bonus / malus
  • Add a sprite for 'score bar' with hearths for lives 
  • Add a menu to activate / desactivate options, save them (lights for events atm but maybe some options will seems usefull later) and to show scores


I need help to perfect the system collision with bricks because the actual don't works very well.

All suggestions, propositions of code optimizing for that or for perfect display (avoid blinking) are welcome

jicehel

NEW 6 years ago

Last change: 

  • Added the  first 'bonuses' Life + et Life -


In my minds: 

  • Add some bonus / malus
  • Add a menu to activate / desactivate options, save them (lights for events atm but maybe some options will seems usefull later) and to show scores

jicehel

NEW 6 years ago

Last change: Add the 2 first bonus / malus: Life more or Less. Say me what you think about it ? Some change to do on speed, sounds, ... ?

I could reset bonus/malus when they fall and what we lost life. Do you think i should do it ?


In my minds: 

  • Add more bonus / malus
  • Add a menu to activate / desactivate options, save them (lights for events atm but maybe some options will seems usefull later) and to show scores

jicehel

NEW 6 years ago

Last changes: I have added the bonuses.

I don't think to change it anymore for the moment.

I hope that someone will propose a better bricks collision part of program because it's sucks at some moments (with unbreakable bricks mostly).

If you have any amelioration's idea or code optimisation, i'll take too.


=======================================


Derniers changement: J'ai ajout les bonus / malus

Je ne pense plus faire de changement sur ce jeu pour le moment

J'espère que quelqu'un pourra proposer une amélioration du bout de code concernant les collisions briques / balle par ce que c'est (selon moi) la seule partie qui pose réellement problème surtout avec les briques incassables mais bon si vous avez des idées d'améliorations ou des bouts de codes pour améliorer le jeu, je prends  ;)

klotz

NEW 6 years ago

Could you please upload this somewhere as a single zip file? I don't know how to download from github.

jicehel

NEW 6 years ago

No problem i can do than this evening if you need. Else, you can click on the green button (top right of the files part): "Clone or Download", it will ask you what to do and you'll choose the zip file. Please say me if you succed with this explain. If you don't i'll send a zip link.

Have fun ;)

jicehel

NEW 6 years ago

An alternative Titlescreen.bmp quick done this evening but it's too quick. I should add pictures to smooth it. If you want try, use picture below