Construct 2 layout question

I'm having a go at putting together a game in Construct 2.
Have a look at this screen dump. (pardon my lack of use of correct terms - if i'm clear as mud - holla)
for my player to move through the maze but have an area that persists -- results in the last bit where the player is at the bottom of the game play area obscured.

Do i have to make the play area smaller - i.e. end before the persist area or is there a trick
tx
U

Comments

  • I would love to help you but there must be something wrong with your post because I am not seeing a
    screen dump
  • Oh dear, still figuring this place out, Sorry. Got pulled onto another project will get a dump at the office tomorrow.
  • here we go..
    game.png
    615 x 537 - 43K
  • If i understand correctly your problem is that your level is bigger than your viewport ?

    If this is the case you can simply let the viewport follow the character(by adding the follow behaviour) or you can increase the size of your viewport.

    It would help if you could explain the problem a bit better for me.
  • uniuni
    edited
    Hey no. game scrolls along with the player to the end of my level as expected, but if i want to place a layer that persists (grey box in screen dump) to display info - for example credits / or life bar that is visible wherever the player is - this then obscures from view the bottom bits of my level when the player is at the bottom end of the maze.

    So my question is - for example of my grey persist area was 100px height - would I then have to offset my maze (level) by 100px so that all of the maze(level) is visible
  • Ohhh. There is a tickbox somewhere in layout options that allows your camera to scroll past the layout. So even if your layout is only 100px tall the camera can be at 10000x 10000y.

    Otherwise, yes just make your layout a bit bigger.

    I would use my own code for following the camera (this means I can change it later) and then allow the camera to scroll outside of the layout and then just code in a boundry in my camera code. For eg :
    //Pseudo code:
    (If myCameraPosY > 100) then 
    myCameraPosY = 100

  • hmmm okay. I'll fiddle around tonight. Thanks.
  • https://www.scirra.com/manual/67/layouts Its called unbounded scrolling.
    Thanked by 1uni
  • shot thanks. that will work
Sign In or Register to comment.