I am trying to make my background become visible at the center of the screen but unfortunately, my background is only visible at the left side of the screen and there is a big white space located at the right side of the screen when I preview my layout. Can someone suggest me a solution so my background can be at the center of my screen when I preview my layout rather than at the left? Here's a picture so you can understand my issue:
The appearance of my layout in Contruct 2:
The preview of my layout with the big white space located at the right side of the screen:
Just drag your background image to the center in layout view. Alternatively, click once on your background image and hit C on your keyboard.
If you observe the previous images that I have submitted, my image is already over the layout but when I preview my layout the image appears at the left side of the screen. I was wondering how I can make my image appear at the center of the screen just like this picture for example:
Right. You have to center it (or resize it) to fit in the dotted-line box. That box represents what you see on-screen when you run the game.
That space-shooter screenshot is like that because the layout is sized vertically (height is larger than width) and is centered automatically in the browser. Layouts are always centered.
Open that space-shooter project and look at the layout for it. You will see that the background is stretched to fit over the dotted-line box.
Develop games in your browser. Powerful, performant & highly capable.
How can I stretch the layout to fit over the dotted-line box? Tell me the steps I have to follow.
Are you seriously saying you don't know how to resize an image? Or resize a layout?
Like I said in my previous post, look at the space-shooter project and see how it was done. I really don't know how to explain it any simpler.
Do you think that it's possible to reduce the visible area (dotted lines)?
The Dotted-line box is your window size. It's what is visible when you run your game. You set the size of it in your Project's Properties panel.
Ok Thank you I have solved the problem.