Ezelia Posted May 17, 2013 Share Posted May 17, 2013 I was surprised when I discovered that there is no web worker support on android stock browser (it was supported on Android 2.1 then abandonned :/ ==> http://caniuse.com/#search=web%20worker ) .now all HTML5 applications wrappers (Phonegap, Titanium, coccoon ...etc) does not support web workers since they use Android webview witch is based on Android stock browser. is there any workaround for that ? without web workers I can't imagine any game with good AI Quote Link to comment Share on other sites More sharing options...
AshleyScirra Posted May 17, 2013 Share Posted May 17, 2013 I don't think any wrappers support it, but Chrome for Android does support Web Workers, so at least it might work on the browser of newer Android devices. Quote Link to comment Share on other sites More sharing options...
Ezelia Posted May 17, 2013 Author Share Posted May 17, 2013 actually it works just fine on chrome mobile ... but what I want is to convert it to a native app without rewriting the whole code Quote Link to comment Share on other sites More sharing options...
Chris Posted May 17, 2013 Share Posted May 17, 2013 Well, you could try a shim for webworkers when they are not available.Not as perfect, but still better than nothing. Quote Link to comment Share on other sites More sharing options...
Ezelia Posted May 17, 2013 Author Share Posted May 17, 2013 I'm already using this to test how the game will look on mobile, but it's not a solution because everytime a web worker starts processing the game hangs until it finishes ... this is not acceptable on a mobile game especialy with animations I'll maybe need to rewrite my code :/ Quote Link to comment Share on other sites More sharing options...
martensms Posted May 19, 2013 Share Posted May 19, 2013 @previous answer:gifsockets are synchronous as they are calculated on the CPU (as there is no GPU side codec implementation due to having no initial frames amount inside the header), so it's blocking the whole UI stack - no matter if you are running it in threads or not, it will only run smoothly on intelligent threads being run on different CPU cores, which is impossible for single threaded JavaScript applications (as most engines have concurrent threads). Did you try out the nodejs WebGL wrappers that are known to work on Android?I'm pretty stuck with my v8gl runtime, but I'll be developing it further in around a month or so when lycheeJS 0.7 is shipped. WebSockets v13 is implemented in the lycheeJS' node and html5 platform, so there's a binary reader that handles the (char) streams bitwise. Maybe it helps you to implement it manually:https://github.com/martensms/lycheeJS/tree/forge/lychee/platform/nodejs/net ~Cheers Quote Link to comment Share on other sites More sharing options...
Ezelia Posted May 19, 2013 Author Share Posted May 19, 2013 @martensms I was looking for a solution with minimal modification to my current code webGL will need to rewrite my renderer ...beside that, I'm working on another aproach to create native mobile games using TypeScript ; no wrapping nor webview but real native output. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.