Ball movement speed in KBreakout

Julian Helfferich julian.helfferich at googlemail.com
Tue Jan 9 12:27:12 UTC 2018


Hi,

I can confirm the speed decrease on the current master. I can also confirm
the crashes on my box (kubuntu + kbreakout from master).

I think I also know why slow-down bug appears. The log output shows that
the interval is cut in half from 16 to 8. However, the documentation [1]
states:

"The Timer type is synchronized with the animation timer. Since the
animation timer is usually set to 60fps, the resolution of Timer will be at
best 16ms."

Unfortunately, I have no idea how to work around this limitation. Has
anybody else an idea?

Best regards,
Julian

[1] http://doc.qt.io/qt-5/qml-qtqml-timer.html

2018-01-06 13:32 GMT+01:00 Frederik Schwarzer <schwarzer at kde.org>:

>
>
> Am 03.01.2018 23:31 schrieb Albert Astals Cid:
>
>> El dimecres, 3 de gener de 2018, a les 20:20:38 CET, Frederik Schwarzer va
>> escriure:
>>
>>> On Dienstag, 2. Januar 2018 00:34:42 CET Albert Astals Cid wrote:
>>> > El dissabte, 30 de desembre de 2017, a les 3:15:21 CET, Frederik
>>> Schwarzer
>>> > va
>>> >
>>> > escriure:
>>> > > Hi,
>>> >
>>> > Hey
>>> >
>>> > > in KBreakout I see the following:
>>> > > After a minute or so of playing a level, the ball speed decreases
>>> > > dramatically. From the source I can see that this is intended but
>>> comes
>>> > > with also cutting the game timer interval in half.
>>> > >
>>> > > console.log output:
>>> > > qml: Speed: 2.0837250000000003
>>> > > qml: Interval: 16
>>> > > qml: Speed: 1.0418625000000001
>>> > > qml: Interval: 8
>>> >
>>> > Can you share the patch you use for this output?
>>>
>>> Sorry, not at that computer at the moment. But it shows the correct
>>> values.
>>> Both values are cut in half which (as I suspect the intention) should
>>> result
>>> in the same movement speed. Not sure _why_ that is done but well. I can
>>> send the patch at the week end.
>>>
>>> > > For me however, it seems that only the ball speed value has any
>>> effect.
>>> > > So
>>> > > effectively, the ball speed is cut in half.
>>> > >
>>> > > Can anyone check on their boxes? Thanks.
>>> >
>>> > I can't really see it getting much slower i think, can you record it
>>> and
>>> > put it in youtube or something?
>>>
>>> https://vimeo.com/249561562
>>>
>>> At around second 52 it happens. The ball movement is not that clunky as
>>> seen
>>> in the video but I think it's well visible. I did the video with the
>>> released version 1.2.0 in KF 5.18.0 in Kubuntu 16.04.
>>>
>>> BTW. One in ten starts of the application crashed here at least with the
>>> window maximised. I saw the same on the other computer in the git master
>>> version. Can you please check that as well on your box?
>>>
>>
>> I haven't seen any crash :S
>>
>
> Weird. I have those quite regularily on two systems with different
> versions of Qt/KF/KBreakout. Both Debian-based though.
> I just made a gdb run but cannot read much out of it. Maybe you can see
> something there. As I said, it happens every 10th start and sometimes 3
> times in a row.
>
> https://paste.kde.org/phfwyxtkn/1kaxca
>
> But you could see the speed decrease, right?
>
> Cheers,
> Frederik
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20180109/7a42b881/attachment.html>


More information about the kde-games-devel mailing list