Is it possible to make a browser game using plain HTML?

Is it possible to make the game in the browser-based divs

, <imgs>

, the HTML5, of CSS3 and good ole 'jQuery? According to this guy , browser rendering speed is very good these days and that's the only reason I even consider this option. Does his answer match making a game in vanilla HTML?

+3


source to share


6 answers


Yes. DHTML games have been around for over a decade, and HTML 5 provides some pretty advanced rendering with CANVAS

. Check out Microsoft's rendering examples for the IE engine to see the type of performance you can expect (some things work better than others). Most of them are very impressive).

Check out this little HTML 5 MMO and Illyriad project (which claims to be based on HTML 5).



Is it possible to write a game without an element CANVAS

? Visually, you will be limited, but the logic can still be tricky. The game engine should be based on high-performance structures, not DOM elements. For example, if you were calculating a collision in a 2D field, you can evaluate the matrix and redraw only the affected elements. You shouldn't be evaluating the position of DOM elements, as this will be very slow.

+1


source


Yes. Theres HTML5 Angry Birds, Cut the Rope, even Pac-man.



+1


source


I don't quite understand what you mean by "Plain HTML" since you also mention HTML5. If you just mean what you can build in a browser without plugins, I would take a look at the work done in Canvas and SVG. An example that really changed my mind about what is possible is the CAKE library demo, which you can view here here . Unfortunately this is outside IE8 (not sure about IE9 and I can't test it where I am), but it works well on the iPad which amazed me.

+1


source


Continuous use of the DOM is possible, but unlikely. I really wanted to do this, so I was thinking about using jQuery jQuery jQuery to move elements around and perform collision detection, ect ... It would be nice to see a game using strickly dom and javascript elements.

If you've ever played anyone who moved blocks to solve a puzzle game (I don't know what they are called for, but I'm sure it's something like "Locked") it would be very possible with strictly Div and Javascript elements and I will applaud you for such maneuvers.

+1


source


Is it possible to make a browser game using plain HTML?

Yes, but it is relatively limited; you won't create a World of Warcraft with complex 3D worlds, audio and animation without a serious performance hit.

0


source


Yes and no.

Most games like Angry Birds, Fieldrunners, etc. use what is called "HTML5" when they use a new tag canvas

.

Using the DOM to create a game is not possible (unless you write pong and else ...). The DOM is too slow.

The canvas is an element that you can manipulate by painting on a bitmap. In javascript.

You should read this answer to understand the choice of API and use it depending on your use case (DOM vs Canvas vs SVG).

0


source







All Articles