[Kde-games-devel] Kollision

Clemens Werther cl3m3ns at googlemail.com
Thu Feb 5 17:16:50 CET 2009


-- pause_on_lost_focus_r1.diff
second try :)
this time, if the focus is lost, the game only toggles pause, if it
isn't paused already

-- consistent_formatting.diff
just some inconsistencies I stumbled across
2x double new line removed
1x space added

-- regarding update_blue_ball_as_needed.diff from my previous mail
 > My bigger concern is that it has a fairly large effect on game play.
 >  It removes the frustration of a stuck ball near the edge and as you
  > mention it removes the "glitch" that allowed the ball to teleport from
 >  one edge to another. Personally, I quite like both those changes. But
 >  this change also makes it quite a lot easier to zip along the edge of
 >  the play area in a perfectly straight, generally safe line. After
 >  applying the patch I find myself playing a lot closer to the edges to
 >  take advantage of this.

A player could also drag the Kollision window to the corner of his
screen and would get the same result as in my patch, but only at two
edges (however, one could also change screen resolution to get it on
even more edges).
Furthermore the blue ball doesn't stick, when it touches an edge: The
mouse pointer hast to leave the play area to make this happen.
In my opinion, the ball should stick, if it touches an edge or it
shouldn't be able to stick at all.
But as Kollison already provides code to handle touches of edges(code
below), and it doens't make the ball stick, the proper solution is to
not allow the ball to stick at all.

void MainArea::setManPosition(const QPointF& p)
{
    Q_ASSERT(m_man);

    QPointF pos = p;

    if (pos.x() <= radius()) pos.setX((int) radius());
    if (pos.x() >= m_size - radius()) pos.setX(m_size - (int) radius());
    if (pos.y() <= radius()) pos.setY((int) radius());
    if (pos.y() >= m_size - radius()) pos.setY(m_size - (int) radius());

    m_man->setPosition(pos);
}


Clemens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pause_on_lost_focus_r1.diff
Type: text/x-patch
Size: 822 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20090205/d82984e8/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: consistent_formatting.diff
Type: text/x-patch
Size: 721 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20090205/d82984e8/attachment-0001.diff 


More information about the kde-games-devel mailing list