WebView on HTML5 games

Hi everybody. I'm trying to display some dynamic data that come from a API of mine, and I wondering if there's a webview extansion that I could use.
PS. Yes. It's a html content, runing on a html project. I'm a web developer, I need to do kind of a iframe inside my game. Is that possible?
 

chamaeleon

Member
Hi everybody. I'm trying to display some dynamic data that come from a API of mine, and I wondering if there's a webview extansion that I could use.
PS. Yes. It's a html content, runing on a html project. I'm a web developer, I need to do kind of a iframe inside my game. Is that possible?
Write an extension that uses fancy CSS to place content over the game area suitably? That way you can have the data you wish to have displayed sit separately in the DOM while appearing like it's in the game area. The game itself is inside a single div containing a canvas element which doesn't seem like it would lend itself to placing arbitrary HTML inside.
 

chirpy

Member
For iOS/Android there are some WebView extensions out there in the GMS marketplace. However, if you're planning to release the build to iOS, Apple had been strictly deprecating UIWebViews so you'll need to contact extension developers to make sure they're compatible with WKWebView.

Note: I've never used any of them; my limited knowledge only came from use of AdMob ads.
 
For iOS/Android there are some WebView extensions out there in the GMS marketplace. However, if you're planning to release the build to iOS, Apple had been strictly deprecating UIWebViews so you'll need to contact extension developers to make sure they're compatible with WKWebView.

Note: I've never used any of them; my limited knowledge only came from use of AdMob ads.
My target plataform is html, I've asked to the developer of one webview for android if his extension would work in html and I'm waiting for an answear but I'm no very optmistic.
 

chamaeleon

Member
My target plataform is html, I've asked to the developer of one webview for android if his extension would work in html and I'm waiting for an answear but I'm no very optmistic.
A game running in the browser is just a bunch of Javascript drawing on a canvas. From the browser's point of view there's nothing else there. Having additional HTML would imply splicing it into the DOM dynamically (or in an iframe), but it would not be "inside" the game view. If you're a web developer you're a better judge than I what can be achieved with a canvas and what magic Javascript developers are up to these days. In short, unless you go with an approach similar to what I proposed I think you need to search for ideas in the web development world, not GMS related sources, and if something exist, wrap it as an extension.
 
Top