Previewing HTML in browser not the same set resolution ?

The game i preview basically just expands to the whole of the browser. I have to resize the browser to an approximate size of the set resolution to test each time. Is there a solution to this ?

You don’t usually use absolute size because the screen/viewport size varies when inside a phone.
You can try to embed the game in a frame like this: holypangolin.itch.io/karambola

It was only required for testing. Is there a way to edit the localhost html file which gdevelop uses to preview to put in a frame there of a specific resolution everytime i preview ? That was what i was looking for. :confused:

It’s not necessary though since i haave now resized the browser window to an approximate and each time i can open with it when i open the browser. But i was looking if there was a clear solution for this.

Well it is complicated.

But why do you want to do that? The game only scales the whole canvas, so your graphics still show correctly.

If you are using google chrome, you can hit f12 to open the console, click the toggle device mode ircon on the upper left side, add a custom device that uses your desired size.

Edit*
You can do similar in IE11 and firefox, I think.

I think the index.html file used for preview (copied to the preview temporary folder) is located at “GDevelop install directory/JsPlatform/Runtime”, you could try to edit that file, add a frame and see… :slight_smile:

Thanks this was what i was looking for in curiosity. :smiley:

Yes. There was no use for it anyway and there was no need to it in the first place especially while building the game. Currently, i am only building a web game to upload to Kongregate and it automatically adapts the resolution to there. It’s not indented for any other device other than PC for now. I am only starting and want to release just one game now to have my start. :unamused: