Hi,<div><br></div><div>Thanks for the pro-tip Stefan ;)</div><div><br></div><div>I spent last 2 days looking at the code of kbreakout keeping in mind</div><div>the purpose of porting it to QML. I observed that the game engine</div>
<div>directly handles the movement of the bar, ball, etc. items in the game</div><div>in accordance with the logic of the moment. But this is not how it </div><div>should be imo, or at least from qml's point of view.</div>
<div><br></div><div>What I have in mind for qml kbreakout is something of the sort:</div><div><br></div><div>1. The KGameCanvasWidget of the game is replaced by the</div><div>QDeclarativeView which loads the qml game view.</div>
<div><br></div><div>2. There is pure logic code in c++ classes which does not interact</div><div>with the graphic items whatsoever.</div><div><br></div><div>3. Whatever data the logic needs from the graphics items (position,</div>
<div>direction, speed, etc. of the bricks, ball, bar, etc.) would be communicated</div><div>by the main window of the game.</div><div><br></div><div>4. Input events from the qml view will be taken in by the main window</div>
<div>and passed to the logic code, and the resulting reaction (if any) would</div><div>be passed form the logic code through the main window to the qml</div><div>view.</div><div><br></div><div>Ideas on this?</div><div><br>
</div><div>Cheers,</div><div>Viranch</div><div><br><div class="gmail_quote">On Fri, Mar 9, 2012 at 2:21 AM, Stefan Majewsky <span dir="ltr"><<a href="mailto:stefan.majewsky@googlemail.com">stefan.majewsky@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">$ svn checkout -N svn://anonsvn.blablabla/yadda/yadda/KDE/kdegames</div>
$ cd kdegames<br>$ svn update cmake<br>$ svn update libkdegames libkmahjongg<br>$ svn update kbreakout<br><br>
Pro-tip: If you want to avoid the hassle with installing everything,<br>
keep KBreakout's distribution package installed (for the game data:<br>
graphics etc.) and run the executable from the build directory.<br>
<br>
$ build/kbreakout/src/kbreakout.shell<br>
<br>
"kbreakout.shell" is an autogenerated shell script which runs the<br>
"kbreakout" binary in the same directory, and makes sure that you use<br>
the uninstalled libkdegames from your build.<br>
<br>
Greetings<br>
<font color="#888888">Stefan<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
kde-games-devel mailing list<br>
<a href="mailto:kde-games-devel@kde.org">kde-games-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-games-devel" target="_blank">https://mail.kde.org/mailman/listinfo/kde-games-devel</a><br>
</div></div></blockquote></div><br></div>