[lbreakouthd] Premature end (asserting "Congratulations")
Good-looking and addictive OpenSource games
Brought to you by:
kulkanie
On r567 of https://svn.code.sf.net/p/lgames/code/trunk/lbreakouthd built on current Tumbleweed x86_64, playing the custom level "Outbreak" spontaneously asserts end with "Congratulations, you have cleared all levels" early in the game.
Once, there was also an abort with
Floating point exception (core dumped)
but unfortunately, no corefile was written.
I ran lbreakouthd "Outbreak" in valgrind and short before the premature end, there were the following warnings:
I fixed the memory violation, thanks for pointing out. About the premature ending of outbreak: The mini game ends when you loose the ball or there are 7 bricks on the screen. It ends on generating the 7th brick so the counter still shows 6/7 infections. So only if the counter is lower than 6 it really ended prematurely. Can you please check this and send a screenshot if this happens? I tested it and it works for me. I think the congrats message causes some confusion: The mini game is the only level in the special set so when it ends you cleared all levels, hence the message. But I admit this is confusing, so if the set only contains one mini game it now shows "Game Over".
Thanks for your cleanups.
On end, there are 6 bricks left.
However, the Outbreak level still does not feel right, it may end literally just a few seconds after start.
When compared with lbreakout2 (where the level could go on for quite long), the difference I notice is that new bricks appear at a faster rate.
Further, just before the end there is now this valgrind trace:
For completeness I am attaching the full valgrind log.
OK, so the game over condition works properly. Yes, I changed the minigame for LBrHD a bit because in the old version you could get stuck endlessly in a wave quite quickly as the "victory condition" was to clear all bricks and the limit of 50 pretty high. So you neither won nor lost. So to speed things up bricks grow faster and the limit is severely reduced. But instead of clearing all bricks you now just need to hold out for a fixed number of bricks to end a wave. So you don't need to "stop the infection" but just keep it at bay for some time. It's a bit harder and plays differently but I like it more this way because you have more progress. So it's more like a tower defence game now: You need to survive for some time without getting overwhelmed.
Just to be clear: The level may spontaneously end after only three or four paddle hits. There is no way whatsoever to survive.
OK, can you please send a screenshot of the game over screen? Because for me it works properly and always exists when the 7th brick is about to appear. Which admittedly happens quite fast unless you start clearing bricks immediately and without ball auto turbo it's quite hard to stay in the game so maybe I need to tweak this a bit.