The < canvas> element, which came to us in HTML5 was the first step towards HTML5 games becoming big.
The canvas allows so many things that you wouldn't have been able to do otherwise, and does it rather efficiently.
Canvas renders 2D graphics onto a given area in the browser window. It does so dynamically via scripting (i.e. javascript). The shapes and images which are rendered on the canvas can be manipulated in several ways. The most obvious and useful ways is rotating the image; which you would not have been able to do without the canvas, unless you did some rather inefficient and complicated php scripting to alter an image at the pixel-level to make it do a similar thing.
Javascript has a 2D graphics API which accesses the canvas drawing area, which is how games can be written. But just because it only has a 2D API, don't let that make you think 3D isn't possible.
For a start, you could simply write your own 3D engine, which uses normal 2D functions to generate a 3D object and render the 2D projection on the canvas. Doing so just requires a bit of mathematics. But making it a huge and playable game is where it gets difficult.
You could create a whole 3D engine if you wanted, but there are people working on a standard for 3D. It's called WebGL, and it does what I just described, but it simplifies it by allowing you to just call the functions, rather than having to think up all that complicated stuff yourself.
To get started with using the HTML5 Canvas, try this introduction to using the HTML5 Canvas.
And to learn all the basics of making HTML5 games, check out the HTML5 Game Development Guide
Showing posts with label WebGL. Show all posts
Showing posts with label WebGL. Show all posts
Wednesday, 18 May 2011
Hardware Acceleration in Browsers
At the moment, Firefox 4, Internet Explorer 9 and Google Chrome have hardware acceleration. Opera are apparently also working on theirs at the moment.
This would hopefully mean that in the near future, everyone will be running in browsers with hardware acceleration capabilities.
So what will this mean?
It will mean that some really powerful HTML5 games will be able to be run by the vast majority of people.
When WebGL compatibility with browsers is better, you can then expect to see a whole lot more 3D HTML5 games being made. (WebGL is a graphics library for javascript)
With these WebGL games, hardware acceleration is going to be a big part to play in the performance of these games.
So in the (hopefully near) future, WebGL + hardware acceleration might just equal hardcore games available at the click of a bookmark.
For any hardcore game developer, this is an incredible jump in the potential of business. My prediction is that browser gaming will not only be big among casual gamers, but hardcore gamers too. In fact, I also have a feeling that it will help bring casual gamers and hardcore gamers together in harmony.
If you're quick, you should get stuck in and be in the front-row seat of the games dev paradise.
This would hopefully mean that in the near future, everyone will be running in browsers with hardware acceleration capabilities.
So what will this mean?
It will mean that some really powerful HTML5 games will be able to be run by the vast majority of people.
When WebGL compatibility with browsers is better, you can then expect to see a whole lot more 3D HTML5 games being made. (WebGL is a graphics library for javascript)
With these WebGL games, hardware acceleration is going to be a big part to play in the performance of these games.
So in the (hopefully near) future, WebGL + hardware acceleration might just equal hardcore games available at the click of a bookmark.
For any hardcore game developer, this is an incredible jump in the potential of business. My prediction is that browser gaming will not only be big among casual gamers, but hardcore gamers too. In fact, I also have a feeling that it will help bring casual gamers and hardcore gamers together in harmony.
If you're quick, you should get stuck in and be in the front-row seat of the games dev paradise.
Subscribe to:
Posts (Atom)