Ascii Patrol Forum

General Category => Development Progress => Topic started by: gumix on April 14, 2016, 09:16:13 am

Title: Web platform, possible?
Post by: gumix on April 14, 2016, 09:16:13 am
I have done several experiments trying to port the game to browsers. Reasults are promising but still there are many quircks, especially on mobile platforms.

Rendering experiments, both should run well on major desktop browsers.
Test 1: canvas (2d) (
Test 2: canvas (web-gl) (

On mobile devices unfortunately:
Test1: makes too many graphics calls so framerates are rather low: 5-15fps
Test2: web-gl gives promising performance of 60fps, if only web-gl is avaliable on more devices :)

Porting game code to java script is another story. I gave a try to Emscripten.
Test3: (
It is using web-gl for rendering, desktop browsers should feel comfortable with it.
Unfortunately strange effects appear on my BB Q10 mobile.

Title: Re: Web platform, possible?
Post by: gumix on April 14, 2016, 12:57:09 pm
Ok, figured out what caused problems to my BB - but still don't understand why.
So setting LLVM optimization to -O0 done the trick but why does it affect my mobile device only? All desktop browsers are fine with -O3.

Another tiny problem was with webgl shaders, they need a bit more precise control on arithmetic errors.

Summarizing everything, seams Ascii Patrol will have a web port, with requirement for desktop browser to have either canvas 2d or web-gl support while mobile browsers if one lacks of web-gl it may fall into really low frame rates because of unaccelerated 2d canvas.