Hi,
the easiest way to do this, is by moving the Level inside the scene. The level would be of a bigger size and is a child of the Scene, and it contains all game entities. By moving the Level then, you adjust the visible portion of the Scene. This is the same approach we are using for our Chicken Outbreak demo, where we move the level endlessly to the top, which has the visual effect of all objects going down. You can test that with the following example code:
GameWindow {
Scene {
width: 480
height: 320
Level {
// make the Level any size, only the 480x320 section will be visible though
width: 4000
height: 3000
Rectangle {
width: 50; height: 30
}
Rectangle {
x: 300
width: 50; height: 30
}
Rectangle {
x: 600
width: 50; height: 30
}
// this will move the level from its original x position 0 to -800, which will have the effect of the Rectangles moving right
// instead of this NumberAnimation, you can set the position of your level to whatever you want your visible part to be
NumberAnimation on x {
from: 0
to: -800
duration: 3000
}
}// Level
}// Scene
}// GameWindow
The Level item is just a normal QML Item element, but if you design multiple levels you will probably put that file into an own qml file and name it Level01, Level02, etc.
Cheers, Chris