Jump to content
MakeWebGames

Recommended Posts

Posted (edited)

Lately I have seen several games stating powered by HTML5; am I right in saying this is merely a more convenient and nicer way of integrating javascript, images and sounds onto your page? From my understanding you would still need a lot of PHP for all the server-side work.

Edited by Mint Berry Crunch
Posted

The importance of HTML5 is on cross-platform as I think.

In the future we all don't have to prepare anything except browser.

But for now it's a little bit dangerous to focus on only HTML5.

And it is also needed to have server-side work to make permanent game.

Posted (edited)

I am actually building my game based on the HTML5 canvas,

It is a lot easier to implement then if you where to use JavaScript alone, you can render directly into the browser.

You do require a server environment to run all the features, however it isn't 'essential'.

As I say, I am using it for my game which you can read here: http://makewebgames.io/showthread.php/42729-Project-Echo-An-Online-City-Role-Playing-Game

In it I have briefly covered the possibilities with HTML5, such as easily rendering 625 images in less than 500 ms... it is rather powerful for what it is.

 

In terms of server side, you don't need PHP to run the game, the only thing PHP or AJAX would be required to do is communicate with a database and thus allowing you to save, or login but then this is the same for any game so there isn't a difference.

Edited by Octet
Posted

But can't JS write it's own files, therefore allowing you to make your own DB of some type disregarding php/ajax? :) or is that some epic dream?

Posted

Javascript can write files, though it is server side (ala: Node.js), and interact with a database.

I would imagine that games "Powered by HTML5" do a lot more work client side than normal (which dependent on the game, could also be in the form of data storage too).

Posted (edited)

No, it certainly isn't replacing PHP.

PHP is a server side language whereas JavaScript is primarily a client side language, a huge difference and they both have critical and unique roles. You can have a small lapse between the two sides however they won't be replacing each other any time soon.

Happy Coding!

Edited by Octet
  • 4 weeks later...
Posted

HTML5 is a term used to describe a specification, or a collection of APIs.

Most HTML5 elements themselves are markup related to Javascript objects.

 

In particular, HTML5 adds many new syntactic features. These include the new <video>, <audio> and <canvas> elements, as well as the integration of scalable vector graphics (SVG) content (that replaces the uses of generic <object> tags) and MathML for mathematical formulas. These features are designed to make it easy to include and handle multimedia and graphical content on the web without having to resort to proprietary plugins and APIs.

Source: http://en.wikipedia.org/wiki/HTML5

For the two features asked about previously within this thread with relation to file storage and databases, I'll shed some light.

Firstly, Node.js and HTML5 is not related, and have nothing in common with eachother.

Node.js is a server-side programming language interpreter able to compile Javascript to executable bytecode.

HTML5 is a markup language in itself, but the APIs commonly connected to it is pure Javascript, that are objects that "may" be connected to the DOM(Document Object Model).

Writing and reading files is a genuine possibility, HTML5 spec's the FileAPI, and is "technically" supported by all popular browsers.

Creating and storing a database on the client-side has been possible for a long time, but the method of doing so has been refined to a few APIs. These are WebSQL, others and IndexedDB, the latter being the leader from a spec's standpoint. Browsers that support this are IE10, Mozilla, Chome and BB10.

Theoretically, a single player game written in HTML5 would be playable even without a connection to any network.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...