Forums

OverviewV-Play 1 SupportHow to make a level bigger than the GameWindow? › Reply To: How to make a level bigger than the GameWindow?

OverviewV-Play 1 SupportHow to make a level bigger than the GameWindow? › Reply To: How to make a level bigger than the GameWindow?
#7168

Alex
V-Play Team

Hi,

the scene is more or less the visible part of your game. As you already mentioned Chicken Outbreak, the level IS in fact bigger than the scene and scrolls past it. The platforms get created outside of the visible area and also get destroyed after they leave the screen.

So your level item inside your scene can have any size you like, the scene (gamewindow) dimension only defines which part of the level is visible.

Short example:

GameWindow {
  Scene {
    width: 480
    height: 320

    Level {
      // make the level bigger then the scene
      // only the upper left corner of the level will be visible in the scene
      width: 3000
      height: 3000
    }
  }
}

Now you only need to add a behavior to move the level in the scene. Possibilities would be wrapping the level with a Flickable item, so the user can scroll around freely. Or programmatically change the x and y value of the level, e.g. depending on the character movement. In Zelda, the character is always centered in the screen, you can achieve this by ONLY moving the level.

I hope this is what you were looking for.

Cheers,
Alex

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support