Questions about embedding and scaling

Get help using Construct 2

Post » Tue Nov 01, 2016 4:42 am

Hello!

I've been commissioned to create a small web game that will act as an interactive roadmap. This game must be responsive in that it will have at least 3 sizes to display at for phones, tablets, and web browsers.

After reading this article about scaling it seems like Construct 2 may be able to accomplish something like this reasonably quickly.

So my main question is this: how would I go about making a game that will scale to fit any parent element it is put in while maintaining aspect ratio, similarly to how the fullscreen scaling modes fill the whole browser?

Is this something that I can set up in construct or will I need to turn off scaling and do it on the html/css side of things?

The website is already responsive and has lots of responsive elements in scrolling areas etc, so I'm hoping I can create the game in a way that they can simply make this game a child of an existing responsive element, and it will appropriately resize to fit within the bounds of that element.

I've already created a solution using Unity3D, but the initial load times are far too slow.

Thanks
B
12
S
4
Posts: 48
Reputation: 910

Post » Fri Nov 04, 2016 2:38 pm

I found a solution. If I set the project properties to scale for fullscreen browser with letterboxing, and also export it as HTML5 website for embedding, it behaves as I was hoping. The game will treat any wrapper element as the bounds for the scaling and letterbox/pillarbox.
B
12
S
4
Posts: 48
Reputation: 910


Return to How do I....?

Who is online

Users browsing this forum: kainrazial and 16 guests