javascript - How can I make a 3D shooting game using HTML5 Canvas? - Stack Overflow

I want to make a 3D shooter (just shooting, no movements or anything) using HTML5 Canvas. How can I do

I want to make a 3D shooter (just shooting, no movements or anything) using HTML5 Canvas.

How can I do that? I searched for some tutorials but I couldn't find any good ones.

I want to make a 3D shooter (just shooting, no movements or anything) using HTML5 Canvas.

How can I do that? I searched for some tutorials but I couldn't find any good ones.

Share Improve this question edited Apr 8, 2016 at 14:40 user128511 asked Apr 13, 2011 at 14:01 ThewThew 16k19 gold badges61 silver badges102 bronze badges 2
  • I think you're a little ahead of the pack on this one. :) Take a look at this though: blog.nihilogic.dk/2008/03/… – Diodeus - James MacFarlane Commented Apr 13, 2011 at 14:03
  • @Diodeus I already searched through that website on my search for tutorials... – Thew Commented Apr 13, 2011 at 14:06
Add a ment  | 

5 Answers 5

Reset to default 4

First of all I think this question is more suitable for the gamedev stackexchange website (http://gamedev.stackexchange./)

As said by the others, you gonna need to learn WebGL, which is the OpenGL ES 2.0 API for the ECMAScript implementation of most browsers. You need a WebGL enabled browser (The latest version of Firefox, Chrome or Safari) and a graphics card driver patible with OpenGL ES 2.0.

The first thing to learn when beginning with game development imo are the maths about some matrix and vector operations. Search the web for some nice and fast tutorials on how to do matrix multiplication, transposition, how to get the determinant of a 4x4 matrix (which is different from getting a 3x3 or 2x2 matrix determinant) and how to invert a matrix should be enough. Then learn some (pretty easy) vector operations, Dot product, Cross product, adition, multiplication, normalization and scaling.

Then learn about the transformation matrices, the rotation, translation and scale matrices. And the view and projection matrices as well.

A little of the GLSL shading language and what are 3D models (Vertex positions, normals, texture coordinates and materials).

Ok, those are the keywords, now google it all. Here is a nice series of tutorials about vector operations for ya: http://www.dickbaldwin./KjellTutorial/KjellVectorTutorialIndex.htm

Here is a nice website with 16 starter tutorials

http://learningwebgl./blog/?page_id=1217

What you are looking for Canvas with 3D content, has now bee WebGL.

I found a tutorial: Learning WebGL

You probably want something like three.js. It's primarily a WebGL framework, but you can also use/fallback on (2D) canvas.

Here are some of the 3D canvas demos.

Do you know WebGL? http://en.wikipedia/wiki/WebGL

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743764168a4503184.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信