Forums

OverviewV-Play 1 SupportShow only a section of a level › Reply To: Show only a section of a level

OverviewV-Play 1 SupportShow only a section of a level › Reply To: Show only a section of a level
#4325

Thomas

thank you very much. i knew i was on the right track. that did it for me..

 

another problem: how to keep my object in the center of my scene while moving it through the level?

at the moment i have something like this:

GameWindow {
activeScene: scene
width: 960
height: 640
id: gameWindow
Scene {
id: scene
width: 480
height: 320
x: 480 - level.space_ship.x * 2
y: 320 - level.space_ship.y * 2
Level {
id: level
width: gameWindow.width
height: gameWindow.height
}
}
}

what i do here is to scale the movement of the object to the scaling factor, in this case 2.

this is a problem when it comes to other screensizes.

is there a better way to handle this?

 

thanks again!

cheers,

TS

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