Hello,<br><br>I am a big fan of the game KBreakOut, but always thought it is sad, that it includes only one levelset. I am working on a way to enable players of KBreakOut to create, share and play their own levelsets. I have already emailed with Fela, the maintainer, about my plans.<br>
<br>I would be very happy, if you would comment on my code. The main changes are in GameEngine::loadLevel() which has been moved to LevelLoader::LoadLevel().<br><br>Best regards,<br>julian<br><br><div class="gmail_quote">
2011/2/21 Julian Helfferich <span dir="ltr"><<a href="mailto:julian.helfferich@googlemail.com">julian.helfferich@googlemail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<div style="font-family: Verdana,Arial,Helvetica,Sans-Serif;"><div class="im">
<table style="border: 1px solid rgb(201, 195, 153);" width="100%" bgcolor="#f9f3c9" cellpadding="8">
<tbody><tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://svn.reviewboard.kde.org/r/6541/" target="_blank">http://svn.reviewboard.kde.org/r/6541/</a>
</td>
</tr>
</tbody></table>
<br>
</div><table style="background-repeat: repeat-x; border: 1px solid black;" width="100%" bgcolor="#fefadf" cellpadding="8" cellspacing="0">
<tbody><tr>
<td><div class="im">
<div>Review request for KDE Games.</div>
<div>By Julian Helfferich.</div>
</div><p style="color: grey;"><i>Updated Feb. 20, 2011, 11:56 p.m.</i></p>
<h1 style="color: rgb(87, 80, 18); font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table style="border: 1px solid rgb(184, 181, 160);" width="100%" bgcolor="#ffffff" cellpadding="10" cellspacing="0">
<tbody><tr>
<td>
<pre style="margin: 0pt; padding: 0pt; white-space: pre-wrap; word-wrap: break-word;">The changes in CMakesList.txt were only made to allow a local build. They should not be included in the patch.</pre>
</td>
</tr>
</tbody></table><div class="im">
<h1 style="color: rgb(87, 80, 18); font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table style="border: 1px solid rgb(184, 181, 160);" width="100%" bgcolor="#ffffff" cellpadding="10" cellspacing="0">
<tbody><tr>
<td>
<pre style="margin: 0pt; padding: 0pt; white-space: pre-wrap; word-wrap: break-word;">I have moved the function loadLevel() in GameEngine to an external class LevelLoader and changed the style of the levelsets from a KConfig style to a QDocument object model (QDom) / XML-style. This is the first step in empowering (and encouraging) players to create, share and play their custom levelsets.
This patch addresses no bug and adds no feature. There are no changes to the user experience.
The QDom-style levelsets provide two main advantages:
1. More robust against errors:
Checks can be implemented very easily. An invalid levelset now leads to an empty level which can be played (but never won, because no last brick can be destroyed) instead of strange behaviour (mouse visible, but confined to KBreakout-Window). For the old style a list of gift types and a corresponding number of gift types had to be maintained in globals.h . This is not needed with the QDom-style.
2. Easily extendable:
Up to now the only two options are identical with the old style: <line></line> and <gift></gift>. New options are planned including <brick></brick> for the placement of single bricks and the possibility to set the position of a gift. This should empower the user to create his own levelsets with different written styles.</pre>
</td>
</tr>
</tbody></table>
<h1 style="color: rgb(87, 80, 18); font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table style="border: 1px solid rgb(184, 181, 160);" width="100%" bgcolor="#ffffff" cellpadding="10" cellspacing="0">
<tbody><tr>
<td>
<pre style="margin: 0pt; padding: 0pt; white-space: pre-wrap; word-wrap: break-word;">Testing has been done with a version prior to the port to KGameRenderer. Since the patch does interact with graphics, this should have no effects. Code works as expected, even when dealing with a broken levelset file.</pre>
</td>
</tr>
</tbody></table>
</div><h1 style="color: rgb(87, 80, 18); font-size: 10pt; margin-top: 1.5em;">Diffs (updated)</h1><div class="im">
<ul style="margin-left: 3em; padding-left: 0pt;">
<li>/trunk/KDE/kdegames/kbreakout/levelsets/default.levelset <span style="color: grey;">(1221881)</span></li>
<li>/trunk/KDE/kdegames/kbreakout/src/CMakeLists.txt <span style="color: grey;">(1221881)</span></li>
<li>/trunk/KDE/kdegames/kbreakout/src/brick.h <span style="color: grey;">(1221881)</span></li>
<li>/trunk/KDE/kdegames/kbreakout/src/brick.cpp <span style="color: grey;">(1221881)</span></li>
<li>/trunk/KDE/kdegames/kbreakout/src/gameengine.h <span style="color: grey;">(1221881)</span></li>
<li>/trunk/KDE/kdegames/kbreakout/src/gameengine.cpp <span style="color: grey;">(1221881)</span></li>
<li>/trunk/KDE/kdegames/kbreakout/src/gift.cpp <span style="color: grey;">(1221881)</span></li>
<li>/trunk/KDE/kdegames/kbreakout/src/globals.h <span style="color: grey;">(1221881)</span></li>
<li>/trunk/KDE/kdegames/kbreakout/src/levelloader.h <span style="color: grey;">(PRE-CREATION)</span></li>
<li>/trunk/KDE/kdegames/kbreakout/src/levelloader.cpp <span style="color: grey;">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://svn.reviewboard.kde.org/r/6541/diff/" style="margin-left: 3em;" target="_blank">View Diff</a></p>
</div></td>
</tr>
</tbody></table>
</div>
</div>
</blockquote></div><br>