<div>Hi all,</div><div><br></div><div>Here's my first draft of the proposal for the project idea "Write a KDE Game using QML".</div><div>(Its a long one :S) I'd appreciate comments/suggestions on it :)</div>
<div><br></div><div><b>Name:</b> Viranch Mehta</div><div><b>IRC:</b> viranch</div><div><b>Project:</b> Port a KDE Game to QML</div><div><span style="font-weight:800"><br></span></div><b>Motivation:</b><div><br></div><div>
Games have been a part of the KDE since the beginning of the project itself. It has accumulated and tailored an impressive selection of high quality games across numerous genres and tailored them to satisfy the entertainment demands of its users. The games being powered by the KDE technology, have their own set of libraries too which make developing games relatively very easy on the developer's part.</div>
<div><br></div><div>Qt 4.7 came out with a new module QtQuick with a declarative QML language. QML enabled designers the showcase their designs with the declarative language, reducing the gap between the designers and the developers. QML was primarily focused for mobile devices for creating fluid like interfaces. But it was quickly optimized for desktop usage too. The Javascript integration allows complex logic computations to be done within itself.</div>
<div><br></div><div>QtQuick being the next big thing replacing QGraphicsView at most places, it was a very clear decision to have KDE games be also ported to QML from KGameCanvas/QGV. QML, being a declarative language, reduces the amount of code by a great factor, also reducing the maintenance costs. With a little modification, these games can also be made suitable to be played on mobile devices if desired so in future.</div>
<div><br></div><div>I have been working on various projects using QML and I have to say, I really like it. It is simply one of the most intuitive and simple languages and perfect for creating 2D games. I have a deep interest (and a little experience) in user interface and interaction and in making them as intuitive and simple as possible. I also have a liking for developing games besides above, and this project seemed like a perfect one to spend a summer on. For this purpose, I have chosen KBreakout, being one of my favorite games, for porting to QML.</div>
<div><br></div><div><b>Tentative Implementation Plan:</b></div><div><br></div><div>First and foremost, a QML component would have to be written in C++ for displaying the game elements from the SVGs in QML. The current game engine manages the moving around of game elements by itself, depending on the logic calculations applicable at the moment. The logic seems to be spread out across classes for different tasks. While most of the logic would remain as-is, the game engine will only accumulate all the logic, and pass it on to the QML part. QML will basically be loaded in a QDeclarativeView central widget in the main window. QML is where all the animation logic and effects would go. So all the inputs will go from QDeclarativeView (throught main window) to the game engine and the game engine will <span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">send back the resulting reaction (if any) to the QML part.</span></div>
<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">The QML components would include the ball, the bar at the bottom, the bricks, the gifts, the background and rest of the minor visual elements. The logic related to bounce angles, ball speed, ball miss, game pause/resume and other animations </span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">(referred from the current game engine)</span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px"> will also go into QML (specifically, the Javascript part). Consequently, this logic would vanish from the game engine.</span></div>
<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px"><b>Tentative Timeline:</b></span></div>
<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255)"><font face="arial, sans-serif">I plan to start working starting early May and finish up with most of the project, including the complete QML port by end of June.</font></span></div>
<div><span style="background-color:rgb(255,255,255)"><font face="arial, sans-serif"><br></font></span></div><div><font face="arial, sans-serif"><b>May 1-15:</b> Start reading up code and related documentation to figure out the areas which need porting. Most of the agenda would be to discard the KGameCanvas and replace it with QDeclarativeView, which loads a simple set of QML files. Also identify the parts of the game engine that would land up in the QML part.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><b>May 15-31:</b> Write the QML component for loading SVGs in QML. I used this in Plasma widget, and can be taken straight off it. The little problem with it is, it heavily uses the plasma library. With some help, I'll have the component in ready and put in libkdegames. After that, the basic and static view of the initial game would be done in QML, taking care of positioning and laying out of items. Also, registering and responding to keyboard/mouse events would be done in this time period.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><b>June 1-15:</b> Implement loading the levelsets from XML via the game engine into the QML. Once the levels are loaded correctly, game play can be started. So the parts identified previously from the game engine relating to the game logic would start being ported to QML's bundled Javascript. Make sure the bouncing and breaking of bricks occur on time and there is no glitch in the animations.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><b>June 15-30:</b> Make sure all the keyboard/mouse inputs are correctly accounted for. Update the score at appropriate times. Make sure the move across levels is smooth enough without any visual bugs. Fix other bugs and have the game majorly reviewed by the mentor.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><b>July 1 onwards:</b> Discuss and identify how libkdegames can be evolved to more support the games in QML. Also look into small feature requests/bug fixes in the ported game.</font></div>
<div><span style="background-color:rgb(255,255,255)"><font face="arial, sans-serif"><br></font></span></div><div><span style="background-color:rgb(255,255,255)"><font face="arial, sans-serif"><b>Other obligations:</b></font></span></div>
<div><span style="background-color:rgb(255,255,255)"><font face="arial, sans-serif"><br></font></span></div><div><span style="font-family:arial,sans-serif;background-color:rgb(255,255,255)">I am in my final year of college and I am joining a job starting July 1, 2012. My college finishes in the last week of April. Being fairly experienced with QML and KDE development, I can assure that I would finish up with the project within the months of May and June as described above. </span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif">I would still have enough spare time after that for discussions on how libkdegames can be changed to </span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif">accommodate and facilitate the porting of various other games</span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"> in future, as is also desired by the project idea.</span><span style="background-color:rgb(255,255,255)"><font face="arial, sans-serif"><br>
</font></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"><b>About me:</b></span></div>
<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif">As I just mentioned, I'm a final year under-grad engineering student from DA-IICT, India.</span></div>
<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif">I have been a GNU/Linux and KDE user since 3 years now and have fair experience with software development. I learned Qt about 2 years ago and fell in love with it. Working with Qt since then, I have worked on numerous projects[1].</span></div>
<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif">My first QML project was at a summer intern with a comapany in which I made a coverflow-like movie browser, where a user can browse through a pre-loaded list of movie covers flowing in a manner similar to the popular coverflow. </span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif">I have also been a part of GSoC 2011 with KDE Plasma and since working on porting the plasma widgets to QML[2].</span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"> </span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif">I'm also working on my final year project at college involving a LAN game for the card game Contract Bridge[3] in QML.</span></div>
<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif">Apart from these, I'm a python/bash scripting enthusiast automating most of day to day tasks.</span></div>
<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"><b>Links:</b></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"><br>
</span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif">[1] <a href="http://github.com/viranch/">http://github.com/viranch/</a></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif">[2] </span><font face="arial, sans-serif"><a href="http://viranchmehta.wordpress.com/category/kde/">http://viranchmehta.wordpress.com/category/kde/</a></font></div>
<div><font face="arial, sans-serif">[3] <a href="http://viranchmehta.wordpress.com/2012/02/16/bridge/">http://viranchmehta.wordpress.com/2012/02/16/bridge/</a></font></div><div><font face="arial, sans-serif"><br></font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Thanks,</font></div><div><font face="arial, sans-serif">Viranch</font></div><div><br></div>