Question

I'm creating a 2D Canvas game with cubes raining down on players. Their goal is to shoot or dodge them. Right now the cubes are just 2D JavaScript OOP entities. What I want to do is replace the 2D cube graphics with WebGL 3D cubes.

My question is, what's the best approach to use WebGL's 3D graphics in a 2D game? I'm looking for something similar to Opera's HTML5 Emberwind. They use 3D graphics in a 2D space to create character animations instead of using image sprites.

Was it helpful?

Solution

Use three.js ( http://mrdoob.github.com/three.js/ ) to easily handle 3D graphics, and put all the game itemes in the same plane, so you can build a so called 2.5D game.

If you are worried about IE users, stick with the Canvas renderer, otherwise use the high performances WebGL renderer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top