[Kde-games-devel] KBounce - Bug or feature?

Danyluk Tamás tamas.danyluk2 at gmail.com
Thu Mar 25 19:40:57 CET 2010


Hi!
Yes that is the same bug, i think i understood it right, so we have
the correction....
Thank you if you patch it..
What improvements do u work on?
Please someone tell me how can i join so that i can also write patches
and everything... (I dont know much  about the svn.. ) I use
windows/msvc but i can use gentoo/gcc too.. .
Maybe I could help improving Windows support or anything..
Thanks!

On Thu, Mar 25, 2010 at 7:27 PM, Andreas Scherf <ascherfy at googlemail.com> wrote:
> Hi, yes that is a bug.
> I think it is something like:
> https://bugs.kde.org/show_bug.cgi?id=162527
> If you want, i could patch kbounce for you. I currently working on some
> improvents in kbounce.
> Andreas
>
> 2010/3/25 Danyluk Tamás <tamas.danyluk2 at gmail.com>
>>
>> Dear Developers,
>> I am very new to mailing lists and open source programming, but I
>> ported KBounce (newest SVN) to J2ME recently as a school project.
>> I think I found a bug in it.
>> If you click the very left empty tile with horizontal cursor, or the
>> very top empty tile with vertical cursor, no wall will be built.
>> This behavior is caused by the following code:
>> board.cpp 296:
>>
>>     // This small constant is added to each of the coordinates to
>>     // avoid positive collision test result when tested rect lies
>>     // on the edge of non-free space
>>     qreal D = 0.01;
>>     ....
>>     p = rect.topRight();
>>     int ur = m_tiles[static_cast<int>( p.x() - D )][static_cast<int>(
>> p.y() + D )];
>>     if ( ur != Free) normal += KBounceVector( -1, 1 );
>>
>> It makes the "right wall" collide with tile(0,y), because
>> m_tiles[1-0.01] is m_tiles[0].
>> The same way the "down wall" collides with tile(x,0).
>>
>> To correct this (i think) unresponsive behaviour, you should insert this
>> code to
>> wall.cpp 218
>>
>> if (m_dir == Right)
>> {
>>         m_boundingRect.setRight(x + 1);
>> }
>> else if (m_dir == Down)
>> {
>>         m_boundingRect.setBottom(y + 1);
>> }
>>
>> It works fine in my java implementation, but i didnt try to build the
>> original.
>> Please give it a try if you think it makes the program better.
>> By the way my J2ME portcan be found here:
>> http://kennysp2.info/programs/jbounce/microemu-demo.html
>> Thanks...
>>
>> Danyluk Tamás
>> _______________________________________________
>> kde-games-devel mailing list
>> kde-games-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/kde-games-devel
>
>


More information about the kde-games-devel mailing list