When testing the project build, the window is much bigger and it is zoomed in. Project resolution is 900x1600.
My monitor has a resolution of 3840x2160, using Windows 11, and Scale is 200% in Display section.
At Scale 100% looks good, but I can’t work at this scale in windows.
I did a Build HTML5 and has the same issue, but here I can do a browser scale to 50% and looks normal.
I searched for solution and found some settings for default.render_script but I don’t know if changes work because the file tells me is part of a library and it cannot be saved. If I copy the content of this file into a new file in my project and add it to default.render (Script), I have same message " the file is part of a library and it cannot be saved"
This is how display scaling works in Defold. To undo this effect you can read window.get_display_scale() and zoom out by this factor, for example using camera component. To resize window we have window.set_size().
The changes should work, at least for build, not sure for bundle, but you won’t be able to save them as stated.
To have these changes persistent you have to copy the default file somewhere else into your project.
All the “builtins” directory is not in your project, but that’s rather a collecion of default values, that can be overriden with your own files.
For example, in this project I have custom render script here:
This custom.render_script file can be edited, saved etc. The default.render_script can be edited, but cannot be saved.
You must also change the render script in the game.project file. Simply open game.project (1), go to “Bootstrap” (2) and select your new render script (3).
But tinkering with render script may be not the best idea for beginner to be honest.
If your game end up using resolution of 1800×3200, everything is working as expected - it should be scaled by 200%. Therefore, to avoid rendering everything twice as large, you need to zoom out, as mentioned earlier. I would stick with this solution, since manually tweaking the render script may lead to inconsistent results across machines with different display scaling settings. If you always zoom out by the scale factor, the game should look the same everywhere.