Adopted WebGL to draw the 3D background of 2D shooter game.
Introduction
Finally I adopted WebGL to draw the 3D background of the traditional 2D shooter game which I made.
The combination of 2D main game layer and 3D background layer looks good, isn't it?
Attention
Turn your hardware acceleration on to fully enjoy the game. The game must be very heavy unless doing it because software emulates WebGL.
See "chrome://gpu" and "chrome://flags" on your chrome to know if the hardware acceleration is enabled.
How
See the last article http://d.hatena.ne.jp/takahirox/20140420/1398019062 to know the idea which uses two layers, they're 2D canvas game layer and 3D background WebGL layer.
Note that I don't use any WebGL utility libraries now except for glMatrix which calculates matrix.
Conclusion
I haven't decided yet to adopt WebGL to draw ALL entities. When drawing speed become the issue again, I'll consider it.
Currently I don't think the drawing speed is a serious problem because the game works at 60fps on my old laptop which I bought 6-7 years ago.
However, if it's very heavy on your environment, please let me know.