A few questions

hi, i have a few questions.
1.- how can i let the game in pause when i move to another tab in html?
2.- how can i mantain the game in landcape in html mobile and erase the fullscreen bottom?.
3.- the game in html is a little blured how i can scaling for the game look well?.
4.- can i add libraries of another api or sdk to defold?

Hi!

The game should stop updating once you change tab, as far as I understand.

The bundled HTML5 output is using a template HTML file that is located in the /builtins/manifests/web/folder. You can make a copy of it and modify to your liking, for example removing the fullscreen button.

I’m not sure how to solve “maintain the game in landscape” though, I don’t think we have orientation information from HTML5 on mobile. It seems to be possible to detect, maybe we should look into it…

It might be an issue with the current HTML5 template actually. There is an issue reported for it, and a workaround here: How to get better quality web render?

(ping @britzl maybe this is a quick win we should look at! :slight_smile: )

Yes, definitely! A good starting point might be the asset portal.

3 Likes

Yep, added it!

1 Like

Also, when switching away from the tab, you should get an event: https://www.defold.com/ref/window/#window.WINDOW_EVENT_FOCUS_LOST