Changing how much of the level you can see at once

Eileen King
2 min readJul 18, 2019

--

The window you see the game through can be any shape or size you want! Read on to see how to change it:

Your “window” into the game is called the viewport.

The dotted lines in the editor show the viewport size:

  1. To change the viewport size, look in the Project Bar on the right, and click on the folder that says Platformer Template.

2. The Properties Bar on the left will now show settings you can change about the entire game. Look for Viewport Size.

Pro tips:

  • If you want to see the whole game at once — no scrolling — then make the viewport size the same as the layout size!
  • If you want to only scroll vertically, make the viewport width the same as the layout width. If you want to only scroll horizontally, make the viewport height the same as the layout height.

Be sure to test your game with the new viewport size! Then go back and try something else.

--

--

Eileen King
Eileen King

Written by Eileen King

Minnesota educator primarily using Medium as a publishing platform for coding tutorials | nfldcoderdojo.org | #cs4all | #mncodes