Mint Berry Crunch Posted December 27, 2012 Share Posted December 27, 2012 (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 May 30, 2013 by Mint Berry Crunch Quote Link to comment Share on other sites More sharing options...
tkbonline Posted December 27, 2012 Share Posted December 27, 2012 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. Quote Link to comment Share on other sites More sharing options...
Octet Posted December 27, 2012 Share Posted December 27, 2012 (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 December 27, 2012 by Octet Quote Link to comment Share on other sites More sharing options...
Sim Posted December 27, 2012 Share Posted December 27, 2012 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? Quote Link to comment Share on other sites More sharing options...
Octet Posted December 27, 2012 Share Posted December 27, 2012 Unfortunately JavaScript cannot write to files, so a server side would be required to either write to a flat file or to a relational DB such as MySQL. Quote Link to comment Share on other sites More sharing options...
Djkanna Posted December 27, 2012 Share Posted December 27, 2012 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). Quote Link to comment Share on other sites More sharing options...
Joel Posted December 27, 2012 Share Posted December 27, 2012 Database connection is possible with Node.js using modules. Check https://github.com/felixge/node-mysql for connecting to MySQL. Also check http://socket.io/ for developing real-time apps using Node.js. There is also MongoDB (no SQL): http://www.mongodb.org/display/DOCS/Node.js Quote Link to comment Share on other sites More sharing options...
Mint Berry Crunch Posted December 27, 2012 Author Share Posted December 27, 2012 (edited) Interesting, some game devs display what they're using HTML5 for, using this badge http://www.w3.org/html/logo/ , it appears to be mostly used for CSS3, graphics and multimedia. I can rest easy that it hasn't replaced PHP :) Edited May 30, 2013 by Mint Berry Crunch Quote Link to comment Share on other sites More sharing options...
Octet Posted December 28, 2012 Share Posted December 28, 2012 (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 December 28, 2012 by Octet Quote Link to comment Share on other sites More sharing options...
Mint Berry Crunch Posted December 28, 2012 Author Share Posted December 28, 2012 Yes, it was largely the bit about storage of data and database conenction. Cheers. Quote Link to comment Share on other sites More sharing options...
JimiBrews Posted January 22, 2013 Share Posted January 22, 2013 A great example of an engine that utilizes HTML5 to create games is http://www.scirra.com/construct2 .. CONSTRUCT2. Quote Link to comment Share on other sites More sharing options...
Spudinski Posted January 22, 2013 Share Posted January 22, 2013 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.