Rockbox

Tasklist

FS#10959 - Brickmania - Ball disappears.

Attached to Project: Rockbox
Opened by Bert Wooster (wooster) - Wednesday, 03 February 2010, 05:29 GMT
Last edited by Tomer Shalev (tomers) - Tuesday, 27 April 2010, 12:28 GMT
Task Type Patches
Category Games
Status Requires testing   Reopened
Assigned To Tomer Shalev (tomers)
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Running "current build" r24477-100203 on Sansa e200 V1

Game Brickmania bug:
The ball just disappears (often on Level 2, but maybe on others). Ball will just usually go to the top corner and not "bounce" back, but the game acts as if a ball is still alive (doesn't register a lost ball) though there is no further movement on screen. I just have to quit the game.

The ball doesn't bounce back. No further ball is issued. It just disappears and I can't interact w/ the game anymore due to no active ball.

FIRST APPEARED: This began a few weeks ago (sorry I can't be more specific), but has persisted in several "daily build" updates I've done and is in the current build I just installed.

REPRODUCIBLE: I reproduce the bug each time I just play through Brickmania. It generally happens in level 2 of the game though it may happen in subsequent levels-- I don't get through to them to see.

I've installed with rbuitil and manually, same thing happens. I have 2 different V1 e200s and it happens on both of them.

Thanks for all your work on the great Rockbox.


This task depends upon

Comment by Robert Kukla (roolku) - Wednesday, 03 February 2010, 09:41 GMT
I can confirm this behaviour for gigabeat f. The following may be related: When the ball gets stuck on the glue paddle it doesn't always stick on the surface. Sometimes it hovers above, sometimes it sinks in up to 2 thirds. It looks as if the virtual position used for detection gets out of sync with the real one, but I don't know the code enough to say that this is really the case.
Comment by amaury pouly (pamaury) - Saturday, 06 February 2010, 17:30 GMT
I can also confirm this bug on my e200. It took me while to be able to trigger it but I eventually managed too. I'll try to look at the code.
I will also try under the simulator but if anyone of you can also try under the simulator, that would help me.
Comment by Bert Wooster (wooster) - Thursday, 11 February 2010, 05:08 GMT
Adding to confirm that this bug also occurs in the same target in version 3.5.

Comment by Tomer Shalev (tomers) - Monday, 15 February 2010, 20:35 GMT
This patch is a suggested solution for this bug. I haven't played enough yet to verify it solves the issue - please test and report.
I've printed the ball's data in the middle of the screen while playing, and noticed that when reproducing the issue, the ball exits the screen from the corner, and keeps flying to infinity. I figured it has to do with the line collision calculation of the ball against the screen's edges. The line collision algorithm probably doesn't consider it a collision when the ball is just adjacent to the line, e.g. in location (-1,0) when the line is (0,0)-(100,0).
Maybe the line collision algorithm is incorrect (I didn't bother reading it), but a straight forward solution is to extend the screen edge's lines a bit, e.g. (-10,0)-(110,0) instead of (0,0)-(100,0) for the top screen's edge when the screen's width is 100, and that's exactly what this patch does.
Comment by amaury pouly (pamaury) - Monday, 15 February 2010, 21:05 GMT
I think a real solution is to review the way the intersection is calculated: it uses an approximate method to determine *whether* there is an intersection or not, *whereas* there is an exact method (using cross products).
Comment by Tomer Shalev (tomers) - Sunday, 21 February 2010, 16:15 GMT
I encountered a case where the ball fell to the bottom-left corner of the screen and disappeared.
Comment by Tomer Shalev (tomers) - Saturday, 27 March 2010, 05:19 GMT
The issue still exist. Verified by Tommy and me.

Tommy (winfor):
> When we play from time to time and the ball will go exactly in the corner, it disappears. The game still works, but we do not have any balls. Makes it impossible to fully play and we must play from the beginning.

This happens in two cases:

1) The pad is in glue mode, and the ball sticks to the corner of the pad (e.g. left corner), and then the pad moves all the way to left. The ball is then outside the left edge of the screen. When the pad shoots the ball, it is fired upward and to the left, making it move outside of the screen region, towards infinity.

2) The ball collides with the edge of the screen, but keeps moving to the left. This effect is also visible from time to time when the ball collides with a brick but is not reflected from it, rather it keeps the same direction and hits other bricks as well.
Comment by Tommy (winfor) - Monday, 05 April 2010, 13:23 GMT
Ok, but exist any solution?
Comment by Tomer Shalev (tomers) - Tuesday, 27 April 2010, 13:07 GMT
Oh no, it still happens...
I can confirm on e200 (easy to reproduce in this target).

Alex Bridges (Acb5649) opened a duplicate, " FS#11220  - Brickmania plugin lost ball":
"I was playing Brick mania level 1 and when the ball got hit towards the upper right corner of the screen, It disappeared and crashed the plugin. H10, current build."
Comment by ken nguyen (nnkvnus) - Thursday, 29 April 2010, 05:15 GMT
Hi,

We know that the game load fine beside this problem.

I am on level 21 with 15 lives and the ball disappear, then i have start a new game.

My suggestion to fix this problem easily is to add a command to one of the button

For example, press "Rec" to start a new live or die so you have a new ball to continue playing.

Too bad if you have no live to restart and continue, but at least you can get on the high score board instead of get nothing as of now.

Thanks.



Comment by Tomer Shalev (tomers) - Thursday, 29 April 2010, 05:32 GMT
> My suggestion to fix this problem easily is to add a command to one of the button. For example, press "Rec" to start a new live or die so you have a new ball to continue playing.

That would be just a workaround. The problem itself must be fixed.
Comment by TC (eflat) - Thursday, 15 July 2010, 02:40 GMT
It appears to be mostly fixed on 3.6. It didn't happen until level 29 in the lower right hand side. Paddle was all the way over right, ball seemed to hit in the corner just as I also picked up the pill to expand the paddle; ball disappeared. I second the suggestion from Ken Nguyen.
Comment by Matteo Italia (MItaly) - Saturday, 21 August 2010, 19:52 GMT
I confirm that the bug is still present in the current build. A fix would be great, but I cannot but second Ken Nguyen's suggestion, a "suicide" key would be a good emergency workaround, and is almost always present in arkanoid clones "just in case".

Still, my compliments to the author of this nice little game.
Comment by Matteo Italia (MItaly) - Sunday, 22 August 2010, 19:27 GMT
Here's a little patch to address the "out of screen ball" issue; it's more a proof of concept than anything, but it seems to work.
It checks at each game cycle (when the balls are painted) if any ball has gone offscreen, and, if so, it starts a new round without losing any life (after all it's not player's fault :) ).

I tested it with a saved game with a ball went offscreen and it worked, but it certainly can be improved. In the next days I'll work to add the "suicide" button and add some other checks for "impossible" conditions (e.g. ball stuck in the middle of the screen): adding some code that performs this kind of basic checks should be easy and useful (also for debugging these issues).
Comment by Matteo Italia (MItaly) - Sunday, 22 August 2010, 19:28 GMT
s/address/workaround :)
Comment by Matteo Italia (MItaly) - Monday, 23 August 2010, 20:09 GMT
Here's a new patch (to be applied to the current SVN build, NOT to files already patched with the previous one).
It features:
- offscreen ball check;
- "suicide button", with its documentation in the help (defaults to Down+Fire+Quit on targets that have DOWN defined, Fire+Quit held for some time for the others) ;
- help screen made a little more clear (IMO) by underlining the key names;
- help screen *code* made a little easier to handle, adding the last element number in the words array (this eases the formatting specified in the other array);
- now the game does not delete the savefile after it loads it, but only by request (to do it a new menu entry was added); so, now "Quit without saving" will actually leave you to the state of the last savefile instead of resetting the game;
- my name in the copyrights :)

It seems to work well in the sim and on my Fuze, if any owner of other targets tries it I'm open to any suggestion, especially regarding the "suicide" keys combination.
Comment by menachem shapiro (menachem) - Sunday, 12 August 2012, 21:19 GMT
I have been experiencing issues as described in this thread.

I have a Sansa Clip+, and I'm running version e92fbb4-120415, but I've seen it in previous versions as well.

There doesn't seem to be any specific level that it happens on, but the ball will get lost in the lower left-hand corner.

Every once in a while, the paddle will be in glue mode, and not release the ball. If I have multiple balls in play, I can release the ball by getting a "N" or "F" pellet, which the paddle out of glue mode, and releases the ball.
Comment by menachem shapiro (menachem) - Sunday, 12 August 2012, 21:26 GMT
Sorry, I meant to make it clear that I'm experiencing two different issues with brickmania, both mentioned in this thread:

1) There doesn't seem to be any specific level that it happens on, but the ball will get lost in the lower left-hand corner.

2) Every once in a while, the paddle will be in glue mode, and not release the ball. If I have multiple balls in play, I can release the ball by getting a "N" or "F" pellet, which the paddle out of glue mode, and releases the ball.

Loading...