move a layer or its contents?

0 favourites
  • 2 posts
From the Asset Store
Move Block
$10 USD
Captivating puzzle game. With challenging gameplay, this game will keep you very engaged.
  • There is a main game screen, and a settings screen (where you can set the number of lines, switch sound on/off etc).

    We have spent 3 weeks so far trying to scroll the settings screen over the top of the games screen (or shift it over) with the unpredictable width of crop fullscreen mode (which is a requirement for mobile).

    We tried these and rejected these strategies:

    1) make setttings a different layout. Rejected this strategy as you cant scroll another layout in/out of the current layout, and you lose game state.

    2) put the settings form as a single sprite, move the sprite over the layouts, and try and use the cursors X&Y corrdinates to work out which button you are over. This failed as the relationship between the X coordinate of the touch event has no relationship to the object its over due to scaling, browser size, crop mode, viewport etc and these relationships seem to be undocumented. We dont know what a viewport or canvas is.

    Now we are considering putting the settings objects (buttons to increase/decrease volume etc) in its own layer with the contents to the far left outside the window area. however, how do you scroll just a single layer? We cant scroll the entire layout, as the variable screen size in crop scaling mode means we dont know how much gap to create beteween the main screen and the settings screen (if the window width was fixed, this would be easy).

    Any thoughts or strategies to try would be much appreciated.

    So far we have spent 3 times more money trying to swipe in a settings screen that it took to create the entire game.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes, unfortunately there's no way to set parallax or scroll desired layer.

    If your setting screen is made of sprites only You could put them all into one family object. Then you can slide/scale/move them as you like.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)