Hi,
in V-Play we have made good experience with the component-based architecture and an entity system that we designed. What this means, is that you have components for displaying an entity (defined in the set of "visual components":http://v-play.net/doc/vplay-group.html#visual-components), some for collision detection, sounds, and then there are some for logic like AI behaviors or others.
Here is an example how one of a game entity in the open-source game "StackTheBox":http://v-play.net/doc/demos-stackthebox.html looks like, taken from Wall.qml:
@
import QtQuick 1.1
import VPlay 1.0
import Box2D 1.0 // for accessing the Body.Static type
EntityBase {
entityType: "wall"
// this gets used by the top wall to detect when the game is over
signal collidedWithBox
// this allows setting the color property or the Rectangle from outside, to use another color for the top wall
property alias color: rectangle.color
Rectangle {
id: rectangle
color: "blue"
anchors.fill: parent
}
BoxCollider {
anchors.fill: parent
// use "import Box2D 1.0" to access the Body.Static type
bodyType: Body.Static // the body shouldnt move
fixture.onBeginContact: collidedWithBox()
}
}@
It does not really matter if you write the base components in QML or C++, although I would start with QML & JavaScript and only write the stuff that requires high performance in C++ because you are much faster to develop and iterate quicker.
You can also have a look at our other open-source games, maybe you find some concepts that you can use in your game: http://v-play.net/doc/vplay-examples.html
Cheers, Chris