开发者

html5 of html and javascript?

开发者 https://www.devze.com 2023-02-16 09:56 出处:网络
At my website I\'ve been developing an RPG based game with Html and Javascript; I was now wondering if it would be more logical to use Html 开发者_JS百科5, even though I don\'t know any Html 5 yet.

At my website I've been developing an RPG based game with Html and Javascript; I was now wondering if it would be more logical to use Html 开发者_JS百科5, even though I don't know any Html 5 yet.

http://trevorrudolph.com/move/ is my Html + Javascript game so far. I'm planning to add progress with Mysql and accounts, or simple cookies.


It is never logical to use every feature of a technology just because you can. There may be some features in HTML 5 that can help you — for example, local storage and offline support in particular might be nice for regular users, since they'll allow your game to work even without a network connection.


Html5 is the latest version of html. So if you know html you know a lot of html5. Html5 adds new features to html like location awareness, audio, video and canvases. We would need to know more information about what specific part of html5 you are considering to tell you how it would work. But just about anything you do in html+javascript is in html5 + javascript.


That all depends on wether or not you are planning to actually use HTML5 features. There certainly is a strong case for HTML5 when building Javascript games with features like localStorage, WebSQL and Canvas. But if you don't plan on using there technologies you might as well stick with the technologies you are using right now.

There is a consideration to make too since HTML5 isn't widely supported yet among browsers. You'll probably have to resort to fallback mechanisms if you want to support non-html5 capable browsers and that might not be worth it.

It actually all boils down to your personal preference.


Take a look at http://www.w3.org/TR/html5-diff/#new-elements to decide whether HTML 5 has enough new features useful to you to make it harder for people using old browsers.

Be aware though that most modern browsers have only implemented bits of HTML 5. The video and audio tags are relevant to games but browser implementors are still actively working on implementing those.

Then there are things like canvas and local storage which are not in HTML 4 but which are widely supported already.


I choose to stick to html and javascript and use cookies to store my data.

0

精彩评论

暂无评论...
验证码 换一张
取 消