The Free Super Mario Game: Only 14kB
Written by IT News on 4:27 PMBy: Catalin Bocanu, Web News Editor
Every Internet user enjoys rapid loading online games, web pages and other applications. Secret web pages and application optimization is to a large extent in the code structure.
JavaScript, as a client-side programming language, widely used to add a variety of functions and features to web sites. There are many aspects that influence the final size of the script. The purpose of optimizing the code is to reduce the file size of the scenario, in order to reduce the load time of pages and bandwidth.
Compression means as desktop applications, scripts and autonomous free online services that will optimize the entire structure of JavaScript code. As a result, code optimization utility would eliminate gaps, comments; obfuscate local variables with shorter names of variables, and more.
Usually, compression Javascript code will give you a final file size reduction of up to 50 per cent compared with the original version. Of course, the initial selection algorithm and coding variables, the name will also affect the compression effect.
For example, Super Mario game consists of a single file Javascript, which in uncompressed form has 35 kb. The game does not use external graphics files (of the game is using JavaScript), and the music is included as encoded data. All aspects of the code structure have been optimized from the beginning, and as the game sprites represented encoded strings, determining their size only 60 bytes for a single sprite. Once the code compressed with YUI compressor, the JavaScript file size is 14 KB.
Finally, it should be noted that Javascript code optimization through specific compression methods show better results (as a reduction of the original file size by 50%), if the source code is a degree of optimization of the project design stage. In Javascript, as well as HTML and CSS code can also support compression on the server side, but not all browsers have the ability decompressing files on the client side.
If you want this game, download super Mario here
0 comments: Responses to “ The Free Super Mario Game: Only 14kB ”