problem with my game...

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Bernard51
Prole
Posts: 46
Joined: Fri Jan 20, 2017 5:51 pm

problem with my game...

Post by Bernard51 »

hello
I encounter a problem with my game in particular with the menu screen


https://www.dropbox.com/s/cd71hh4qlfsxa ... 7.zip?dl=0


Thank you for your help
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: problem with my game...

Post by zorg »

Okay, so i see two problems.

One is that the GAME OVER text is not centered correctly;
The other is that after missing the ball and getting the game over, restarting the game brings me directly to the game over screen.

Which is it?

Edit: Okay, i found a lot more issues, and i stopped after i got bored of fixing them; i uploaded the game with my modifications, in most places i put english comments (sorry, french isn't a strong suit of mine) that explain why i did what.

I also packaged it normally this time, as in, not the whole folder, but the contents; this way, renaming the .zip to a .love will also make it work.
BreakOut2017.love
(114.86 KiB) Downloaded 57 times
BreakOut2017.zip
(114.86 KiB) Downloaded 72 times
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Bernard51
Prole
Posts: 46
Joined: Fri Jan 20, 2017 5:51 pm

Re: problem with my game...

Post by Bernard51 »

Thank you very very much


How to do it when all the bricks are destroyed and display a screen Well done ?


Thank you
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: problem with my game...

Post by zorg »

You should have a variable that has how many bricks are still present in the game, and if one brick gets removed, subtract 1 from that variable; if that reaches 0, go to the well done screen, which would be a new gamestate, like the menu, game and game over screens.

Also don't forget to reset the variable; doing something like

Code: Select all

TotalDeBriques = 90
inside your init function would probably be enough for that.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Bernard51
Prole
Posts: 46
Joined: Fri Jan 20, 2017 5:51 pm

Re: problem with my game...

Post by Bernard51 »

Thanks but it does not work with variable
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: problem with my game...

Post by zorg »

Yes it does.
BreakOut2017_.zip
(114.98 KiB) Downloaded 62 times
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Bernard51
Prole
Posts: 46
Joined: Fri Jan 20, 2017 5:51 pm

Re: problem with my game...

Post by Bernard51 »

Thanks you

How do my ball destroy several bricks at the same time?
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 90 guests