<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>indiegamr &#187; html5</title>
	<atom:link href="http://indiegamr.com/category/html5/feed/" rel="self" type="application/rss+xml" />
	<link>http://indiegamr.com</link>
	<description>apps, indie &#38; beyond</description>
	<lastBuildDate>Sun, 30 Mar 2014 14:51:19 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.38</generator>
	<item>
		<title>SoundJS 0.5.2 Audio Plugin for CocoonJS 1.4.7</title>
		<link>http://indiegamr.com/soundjs-0-5-2-audio-plugin-for-cocoonjs-1-4-7/</link>
		<comments>http://indiegamr.com/soundjs-0-5-2-audio-plugin-for-cocoonjs-1-4-7/#comments</comments>
		<pubDate>Sun, 30 Mar 2014 14:45:36 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[audio]]></category>
		<category><![CDATA[CocoonJS]]></category>
		<category><![CDATA[EaselJS]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=739</guid>
		<description><![CDATA[I just updated the CocoonJSAudioPlugin.js to work with SoundJS 0.5.2 and CocoonJS 1.4.7 Download: CocoonJSAudioPlugin How to use: Just put the CocoonPlugin as the first entry to register and you can use everything else of the SoundJS-library just as is in &#8230; <a href="http://indiegamr.com/soundjs-0-5-2-audio-plugin-for-cocoonjs-1-4-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I just updated the CocoonJSAudioPlugin.js to work with SoundJS 0.5.2 and CocoonJS 1.4.7</p>
<p><strong>Download: <a href='http://indiegamr.com/wp-content/uploads/CocoonJSAudioPlugin_0.5.2.js'>CocoonJSAudioPlugin</a></strong></p>
<p><strong>How to use:</strong> Just put the CocoonPlugin as the first entry to register and you can use everything else of the SoundJS-library just as is in CocoonJS now.</p><pre class="crayon-plain-tag">createjs.Sound.registerPlugins([createjs.CocoonJSAudioPlugin]);</pre><p></p>
<hr />
<strong>Playing the same sound multiple times parallel/overlapping:</strong> You will have to set the maximum number of parallel sounds in the register-method:<br />
<pre class="crayon-plain-tag">//this will allow me to play 3 parallel instances of jump.ogg
  createjs.Sound.registerSound('jump.ogg','jump', 3);</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/soundjs-0-5-2-audio-plugin-for-cocoonjs-1-4-7/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Fading Waves Effect with EaselJS</title>
		<link>http://indiegamr.com/fading-line-effect-with-easeljs/</link>
		<comments>http://indiegamr.com/fading-line-effect-with-easeljs/#comments</comments>
		<pubDate>Wed, 15 May 2013 14:24:31 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[EaselJS]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=676</guid>
		<description><![CDATA[Today I made a basic JavaScript-version of my flash waves-effect, that I made a couple years back. direct link: http://labs.indiegamr.com/olines/index.html For bluring I used this filter: Link &#8211; but still: For those kind of operations HTML/JS is unfortunately still way &#8230; <a href="http://indiegamr.com/fading-line-effect-with-easeljs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Today I made a basic JavaScript-version of my <a href="http://activeden.net/item/owaves-wave-effect/full_screen_preview/124004">flash waves-effect</a>, that I made a couple years back.</p>
<p><iframe width="100%" height="250" scrolling="no" src="http://labs.indiegamr.com/olines/index.html"></iframe><br />
direct link: <a href="http://labs.indiegamr.com/olines/index.html">http://labs.indiegamr.com/olines/index.html</a></p>
<p>For bluring I used this filter: <a href="http://www.quasimondo.com/BoxBlurForCanvas/FastBlurDemo.html">Link</a> &#8211; but still: For those kind of operations HTML/JS is unfortunately still way behind flash in terms of performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/fading-line-effect-with-easeljs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The state of Audio in HTML5 Games</title>
		<link>http://indiegamr.com/the-state-of-audio-in-html5-games/</link>
		<comments>http://indiegamr.com/the-state-of-audio-in-html5-games/#comments</comments>
		<pubDate>Fri, 26 Apr 2013 10:46:00 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[audio]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=649</guid>
		<description><![CDATA[HTML5 Gaming for desktop and mobile is a very trendy topic these days. The performance of canvas applications is getting better and better each day and technologies like CocoonJS or Ejecta even enable a close to native performance for canvas &#8230; <a href="http://indiegamr.com/the-state-of-audio-in-html5-games/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: left;">HTML5 Gaming for desktop and mobile is a very trendy topic these days. The performance of canvas applications is getting better and better each day and technologies like <a href="http://ludei.com/tech/cocoonjs">CocoonJS</a> or <a href="http://impactjs.com/ejecta">Ejecta</a> even enable a close to native performance for canvas applications on mobile devices. &#8211; But what about audio? Is it really that easy to implement sound with your html app?<br />
This article features some interesting points that I collected while researching for my eBook ‘<a href="http://indiegamr.com/zerotoappstore/">From Zero to the Appstore’</a>.</p>
<h2>Audio != Audio</h2>
<p style="text-align: left;">While most browsers and devices already do support audio in general, that doesn’t mean you can just play any audio file in any modern browser. The following table briefly lists the support for Audio-codecs.</p>
<p><span id="more-649"></span></p>
<table style="font-size: 70%;" width="70%" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top"><strong>Browser</strong></td>
<td valign="top"><strong>Codec Support</strong></td>
</tr>
<tr>
<td valign="top"><strong>Chrome</strong></td>
<td valign="top">Ogg, MP3, WAV</td>
</tr>
<tr>
<td valign="top"><strong>Firefox</strong></td>
<td valign="top">Ogg, WAV</td>
</tr>
<tr>
<td valign="top"><strong>Internet Explorer (9+)</strong></td>
<td valign="top">MP3, AAC</td>
</tr>
<tr>
<td valign="top"><strong>Opera</strong></td>
<td valign="top">Ogg, WAV</td>
</tr>
<tr>
<td valign="top"><strong>Safari</strong></td>
<td valign="top">MP3, AAC, WAV</td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top"><strong>Android</strong></td>
<td valign="top">Depending on the Device</td>
</tr>
<tr>
<td valign="top"><strong>Blackberry</strong></td>
<td valign="top">MP3, AAC</td>
</tr>
<tr>
<td valign="top"><strong>Mobile Safari (iPhone, iPad, iPod Touch)</strong></td>
<td valign="top">MP3, AAC</td>
</tr>
<tr>
<td valign="top"><strong>Opera Mobile</strong></td>
<td valign="top">Depending on the Device</td>
</tr>
</tbody>
</table>
<p style="text-align: left;">As you can see there is no single codec and format that is supported by all browsers and devices. In addition to this not every device does support the <strong><a href="http://caniuse.com/#feat=audio-api">WebAudio-API</a></strong> and some devices only allow audio-playback upon a user-interaction or only allow playing one sound at a time. So what should you do? Setup an audio file for any codec and then check the browser’s support before loading and playing the file? While this would be currently the only way to do it right, this not only sounds like a lot of work, but also is. What about browsers that don’t support the audio-element at all? – Implementing a flash fallback is no easy task as well.</p>
<hr />
<p><span style="color: #000000; font-weight: bold;">SoundJS</span></p>
<p style="text-align: left;">One possible solution is <strong><a href="http://www.createjs.com/#!/SoundJS">SoundJS</a></strong> – SoundJS is a JavaScript framework that will take care of all the compatibility issues with audio on different devices and even adds the ability of a flash-fallback should the browser support no audio. You would still have to provide different files for each sound to ensure that a soundfile is available for each device depending on the codec support but besides this, playing a sound with SoundJS can be done with 2 lines of JavaScript:</p>
<p></p><pre class="crayon-plain-tag">var src = ‘mySound.m4a|mySound.ogg’;
createjs.Sound.registerSound(src);
//…after the sound was loaded, it can be played by:
createjs.Sound.play(src);</pre><p></p>
<p style="text-align: left;">What I also like about SoundJS is that it features a plugin-system, so you can write your custom playback-plugin for individual needs, for example I used it to write a CocoonJS-plugin for it.</p>
<hr />
<p><span style="color: #000000; font-weight: bold;">howler.js</span></p>
<p style="text-align: left;">Another solution is <strong><a href="https://github.com/goldfire/howler.js/">howler.js</a></strong>, it is also released under the MIT license, so you can use it free in any of you projects it works very similar to SoundJS. One advantage over SoundJS is that it is very lightweight with only 9kb and offers pretty much the same functionality as SoundJS – with one exception though: howler.js features no flash-fallback, but if you are targeting mobile platforms, this should be no problem.</p>
<p></p><pre class="crayon-plain-tag">var sound = new Howl({
  urls: ['mySound.m4a','mySound.ogg']
}).play();</pre><p>Another thing I like about howler is the support of sound-sprites:</p><pre class="crayon-plain-tag">var sound = new Howl({
  urls: ['sounds.mp3', 'sounds.ogg'],
  sprite: {
    blast: [0, 1000],
    laser: [2000, 3000],
    winner: [4000, 7500]
  }
});

// shoot the laser!
sound.play('laser');</pre><p>&nbsp;</p>
<hr />
<p style="text-align: left;"><span style="color: #000000; font-weight: bold;">SoundManager 2</span><br />
A third option is <strong><a href="http://www.schillmania.com/projects/soundmanager2/">SoundManager 2</a></strong>, (<strong><a href="https://github.com/scottschiller/soundmanager2/">github</a></strong>), just like SoundJS it features a flash fallback if HTML5 audio is not supported. SoundManager2 is used by popular site like SoundCloud, last.fm or the Nyan Cat site. The focus of SoundManager2 is more on implementing audio-players on web-sites as it also features UIs for audio playback. Sounds are played like this:</p>
<p></p><pre class="crayon-plain-tag">// create "mySound"...
soundManager.createSound({
  id: 'mySound',
  url: '/path/to/an.mp3'
});

// ...and play it
soundManager.play('mySound');</pre><p>&nbsp;</p>
<hr />
<p><span style="color: #000000; font-weight: bold;">Comparison</span></p>
<p style="text-align: left;">As you can see, all three frameworks have their pros and cons, you should check out their sites and see what features you need for your project. The following table is just a very brief overview on the differences:</p>
<table style="font-size: 70%;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="160"><strong>Feature/Player</strong></td>
<td width="160">
<p align="center"><strong>SoundJS</strong></p>
</td>
<td width="160">
<p align="center"><strong>howler.js</strong></p>
</td>
<td width="160">
<p align="center"><strong>SoundManager 2</strong></p>
</td>
</tr>
<tr>
<td width="160"><strong>Automatic playback of the correct codec/format</strong></td>
<td width="160">
<p align="center">Yes</p>
</td>
<td width="160">
<p align="center">Yes</p>
</td>
<td width="160">
<p align="center">Yes</p>
</td>
</tr>
<tr>
<td width="160"><strong>Flash fallback</strong></td>
<td width="160">
<p align="center">Yes</p>
</td>
<td width="160">
<p align="center">no</p>
</td>
<td width="160">
<p align="center">Yes</p>
</td>
</tr>
<tr>
<td width="160"><strong>Size (no gzip)</strong></td>
<td width="160">
<p align="center">25kb</p>
</td>
<td width="160">
<p align="center">9kb</p>
</td>
<td width="160">
<p align="center">34kb</p>
</td>
</tr>
<tr>
<td width="160"><strong>Sound Sprites</strong></td>
<td width="160">
<p align="center">No (can play with offset)</p>
</td>
<td width="160">
<p align="center">Yes</p>
</td>
<td width="160">
<p align="center">No (can play and stop at offset)</p>
</td>
</tr>
<tr>
<td width="160"><strong>License</strong></td>
<td width="160">
<p align="center">MIT</p>
</td>
<td width="160">
<p align="center">MIT</p>
</td>
<td width="160">
<p align="center">BSD</p>
</td>
</tr>
<tr>
<td width="160"><strong>Best used for*</strong></td>
<td width="160">
<p align="center">All-rounder, probably best used in combination with the CreateJS suite</p>
</td>
<td width="160">
<p align="center">games/mobile apps</p>
</td>
<td width="160">
<p align="center">Websites, mobile sites as an audio player</p>
</td>
</tr>
</tbody>
</table>
<p>*this doesn’t mean that you cannot use it for other cases, it’s just my personal evaluation</p>
<hr />
<p><span style="color: #000000; font-weight: bold;">A last word: Beware of MP3!</span></p>
<p style="text-align: left;">What a lot of people probably don’t know: <span style="text-decoration: underline;"><strong>MP3 is not free!</strong></span><br />
Implementing mp3 into your app/game is no problem, but what you should know is that if your game is ‘distributed’ (technically that includes 1 user playing the game in his browser) more than 5000 times, you have to pay an <a href="http://www.mp3licensing.com/royalty/games.html"><strong>mp3 codec royalty of $2500</strong></a>. But not only because of the licensing I would suggest you to use Ogg Vorbis(.ogg) or AAC(.m4a, MP4), OGG and AAC do have a better sound-quality while encoded with a smaller file-size than their MP3-counterpart.</p>
<p style="text-align: left;">If you want to learn more about the workflow of implementing audio into your html5- (mobile-) app/game and additional information on creating and publishing an HTML5 game, you should checkout my book at: <a href="http://indiegamr.com/zerotoappstore/">http://indiegamr.com/zerotoappstore/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/the-state-of-audio-in-html5-games/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quickfix to enable touch of EaselJS-DisplayObjects in CocoonJS</title>
		<link>http://indiegamr.com/quickfix-to-enable-touch-of-easeljs-displayobjects-in-cocoonjs/</link>
		<comments>http://indiegamr.com/quickfix-to-enable-touch-of-easeljs-displayobjects-in-cocoonjs/#comments</comments>
		<pubDate>Sat, 16 Mar 2013 14:39:27 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[CocoonJS]]></category>
		<category><![CDATA[EaselJS]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=594</guid>
		<description><![CDATA[So while on the Stage touch is working for EaselJS in CocoonJS, it is currently not possible to touch individual EaselJS-DisplayObjects in CocoonJS. I wrote a quick fix for that, in case anyone else needs it. Download: easeljs_cocoonjs_touchfix.js (updated version to &#8230; <a href="http://indiegamr.com/quickfix-to-enable-touch-of-easeljs-displayobjects-in-cocoonjs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>So while on the Stage touch is working for EaselJS in CocoonJS, it is currently not possible to touch individual EaselJS-DisplayObjects in CocoonJS. I wrote a quick fix for that, in case anyone else needs it.</p>
<h2>Download: <a href="http://indiegamr.com/wp-content/uploads/easeljs_cocoonjs_touchfix.js">easeljs_cocoonjs_touchfix.js</a></h2>
<p> (updated version to work with EaselJS 0.7+, thx to Jonny)<br />
<strong>How to use:</strong> Download JS-fix and implement it through a script-tag somewhere after the EaselJS-script-tag and your done!</p>
<p>Hope this helps someone, comment for any issues,cheers!</p>
<p><small>If you use an older version of EaselJS: <a href="http://indiegamr.com/wp-content/uploads/easeljs_cocoonjs_touchfix_pre_0.7.js">easeljs_cocoonjs_touchfix_pre_0.7.js</a> (for pre-EaselJS 0.7)</small><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/quickfix-to-enable-touch-of-easeljs-displayobjects-in-cocoonjs/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>&#8220;Can you make that loading screen stay longer?&#8221;</title>
		<link>http://indiegamr.com/can-you-make-that-loading-screen-stay-longer/</link>
		<comments>http://indiegamr.com/can-you-make-that-loading-screen-stay-longer/#comments</comments>
		<pubDate>Sun, 06 Jan 2013 04:58:42 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=569</guid>
		<description><![CDATA[Or in other words: When everything that can be wrong with a client is wrong! &#8211; The client had already made a couple requests that seemed odd or made no sense in my eyes, but this one really sums up &#8230; <a href="http://indiegamr.com/can-you-make-that-loading-screen-stay-longer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Or in other words: <strong>When everything that can be wrong with a client is wrong!</strong> &#8211; The client had already made a couple requests that seemed odd or made no sense in my eyes, but this one really sums up the nature of this client in one word.<br />
I&#8217;m currently working on a Phonegap App and the client&#8217;s latest request was to add a loading-screen to the app(not for initial loading), so we added a loading-screen.<br />
We didn&#8217;t think that one was necessary, but okay&#8230;the client wants a loading screen, so he gets one. Don&#8217;t get me wrong here, it&#8217;s not a splash-screen, it&#8217;s really just a loading-screen: <strong>a white screen, that says &#8220;loading&#8230;&#8221;</strong><br />
But it didn&#8217;t stop there: When he saw the thing implemented his reaction was like: &#8220;It dislays for less than a second, that makes the loading-screen seem kind of pointless. Can you make it stay longer?&#8221;</p>
<p>Long story short: This is probably the most senseless piece of code I have ever written and most likely will ever have written:</p><pre class="crayon-plain-tag">onComplete = function(e) {
  //...doing some other stuff

  // at this point everything is
  // loaded and ready to go
  // ...but ... you know ... the client ...
  setTimeout(
    function() {
      $('#loadingCover').hide();
    }, 3000
  );
}</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/can-you-make-that-loading-screen-stay-longer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>EaselJS Pixel Perfect Collision Detection for Bitmaps with Alpha Threshold</title>
		<link>http://indiegamr.com/easeljs-pixel-perfect-collision-detection-for-bitmaps-with-alpha-threshold/</link>
		<comments>http://indiegamr.com/easeljs-pixel-perfect-collision-detection-for-bitmaps-with-alpha-threshold/#comments</comments>
		<pubDate>Thu, 20 Dec 2012 05:24:10 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[EaselJS]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=558</guid>
		<description><![CDATA[I just finished the first version of a pixel perfect collision detection for EaselJS Bitmaps and BitmapAnimations. Get it from Github: https://github.com/olsn/Collision-Detection-for-EaselJS Here is an example (play around with the alpha threshold and toggle the detection mode): [crayon-69d09f8216754640940559/]]]></description>
				<content:encoded><![CDATA[<p>I just finished the first version of a pixel perfect collision detection for EaselJS Bitmaps and BitmapAnimations.<br />
<strong>Get it from Github: <a href="https://github.com/olsn/Collision-Detection-for-EaselJS" target="_blank">https://github.com/olsn/Collision-Detection-for-EaselJS</a></strong></p>
<p>Here is an example (play around with the alpha threshold and toggle the detection mode):<br />
<iframe width="320" height="240" style="width: 100%; height: 300px;" src="http://labs.indiegamr.com/easeljs_collision/"></iframe></p><pre class="crayon-plain-tag">// Rect Collision
var intersection = ndgmr.checkRectCollision(bitmap1,bitmap2);
// intersection is null if no collision, otherwise a {x,y,width,height}-Object is returned

// Pixel Perfect Collision
var collision = ndgmr.checkPixelCollision(bitmap1,bitmap2,alphaThreshold);
// true or false
// alphaThreshold default is 0, set to higher value to ignore collisions with semi transparent pixels</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/easeljs-pixel-perfect-collision-detection-for-bitmaps-with-alpha-threshold/feed/</wfw:commentRss>
		<slash:comments>59</slash:comments>
		</item>
		<item>
		<title>Removing Ads from Windows8 Apps</title>
		<link>http://indiegamr.com/removing-ads-from-windows8-apps/</link>
		<comments>http://indiegamr.com/removing-ads-from-windows8-apps/#comments</comments>
		<pubDate>Mon, 26 Nov 2012 04:45:43 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[win8]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=523</guid>
		<description><![CDATA[Two days ago I upgraded to Windows8 (Thank you Microsoft for your MSDNAA Platform!) And to my suprise I actually like it a lot, especially the ease of installing applications through the Windows 8 Store. However what I didn&#8217;t like &#8230; <a href="http://indiegamr.com/removing-ads-from-windows8-apps/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Two days ago I upgraded to Windows8 (Thank you Microsoft for your MSDNAA Platform!)<br />
And to my suprise I actually like it a lot, especially the ease of installing applications through the Windows 8 Store. However what I didn&#8217;t like was that most free apps feature ads now, it&#8217;s pretty much: &#8220;Buy the app or get annoyed by ads!&#8221;<br />
For this article I will be using the Windows8 version of the twitter-client named &#8220;<a href="http://www.metrotwit.com/" target="_blank">metrotwit</a>&#8221; &#8211; sorry to the folks at Pixel Tucker for using your app to illustrate this &#8216;issue&#8217;! But metrotwit is a great, beautiful and slick looking client and I can only recommend using it!<br />
[<strong>Edit:</strong> I do admit that my original intention was to see if I could remove ads, but this article is not supposed to just show how to remove ads, it&#8217;s more like a call for attention that the new system is not secure at all by illustrating the ease of modifying (almost) any app!]</p>
<p>So I did a little searching to see if I could locate the app and modify it, those were my steps how I removed the ads:</p>
<p><a href="http://indiegamr.com/removing-ads-from-windows8-apps/screenshot/" rel="attachment wp-att-528"><img class="aligncenter size-full wp-image-528" title="screenshot" src="http://indiegamr.com/wp-content/uploads/screenshot.jpg" alt="" width="1280" height="800" /></a><br />
<span id="more-523"></span></p>
<h2>Step 1: Searching the Registry</h2>
<hr />
<p><a href="http://indiegamr.com/removing-ads-from-windows8-apps/regedit/" rel="attachment wp-att-525"><img class="aligncenter size-full wp-image-525" title="regedit" src="http://indiegamr.com/wp-content/uploads/regedit.jpg" alt="" width="1140" height="532" /></a></p>
<p>Bingo! &#8211; There is the location of all Windows8 Apps!</p>
<p>&nbsp;</p>
<h2>Step 2: Taking ownership of the app-folder</h2>
<hr />
<p>Unfortunately I am not able to edit stuff in the app-folder right away, so I took ownership of the folder:</p>
<p><a href="http://indiegamr.com/removing-ads-from-windows8-apps/ownership/" rel="attachment wp-att-527"><img class="aligncenter size-full wp-image-527" title="ownership" src="http://indiegamr.com/wp-content/uploads/ownership.jpg" alt="" width="1073" height="527" /></a></p>
<p>&nbsp;</p>
<h2>Step 3: Locating the files to modify</h2>
<hr />
<p>Within the folder of the metrotwit app there were quite a few files and folders, one that caught my attention was a folder called &#8220;views&#8221;. Inside the views-folder were a bunch of XAML-files, including one called &#8220;MainPage.xaml&#8221;.</p>
<p>&nbsp;</p>
<h2>Step 4: Editing the file</h2>
<hr />
<p>I opened MainPage.xaml and search for the term &#8220;Upgrade to Pro&#8221;, this was the label right below the ad. After that I located the visibility-property for the ad-container I just changed the binding to the variable &#8220;VerifiedProUser&#8221; &#8211; which I was not! <img src="http://indiegamr.com/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" /> (see screenshot below) &#8211; the ads were gone! Other ways to removed the ads that have proven to work:</p>
<ul>
<li>Set the width&amp;height of the ad-container to 0px 0px</li>
<li>change the dom-location of the container so the element is blocked by other elements</li>
</ul>
<p><strong>But there are certain restrictions when editing those files, that I found out about:</strong></p>
<ul>
<li><del><strong>The filesize has to stay the same</strong>, since there is a checksum of each file listed in the &#8216;AppxBlockMap.xml&#8217; that is checked every time the application is launched. I was not able to regenerate the checksum, it uses the SHA256 algorithm but apparently with a salt to it, which was too much of a hassle for me to figure out<br />
</del><strong>UPDATE: </strong>I was messing around with some apps a little more today and just found out that you can remove just anything from the &#8216;AppxBlockMap.xml&#8217; or delete this xml-file entirely =&gt; If no &#8216;AppxBlockMap.xml&#8217; is present, no files will be checked for their checksum, which means that you can now freely add or remove code from any files without worrying about the filesize: <em>Well done Microsoft!</em></li>
<li>If the XAML-Object contains an &#8216;<strong>x:Name</strong>&#8216; it <strong>cannot be commented out</strong>, this will cause the app to throw an error and not launch</li>
</ul>
<p><a href="http://indiegamr.com/removing-ads-from-windows8-apps/code_01/" rel="attachment wp-att-529"><img title="code_01" src="http://indiegamr.com/wp-content/uploads/code_01.jpg" alt="" width="671" height="623" /></a></p>
<p>The final step was saving the file and starting the application, and there you go: The ads were not visible any more!</p>
<p>I have tested this with several apps and with every app it was a fairly easy goal to accomplish.<br />
What can developers do to prevent this? I&#8217;d say the question is: What should microsoft do to prevent this?<br />
However, as a developer I would consider adding certain methods that check the visibility and location of an ad every couple seconds &#8211; I have not yet looked into modifying app-logic but I&#8217;d imagine this is not as easy as modifying a simple XAML-view.<br />
Or developers can use C++ as this would require a disassambler to get to the source and even then it would be hard to modify stuff&#8230;or at least a lot harder than with XAML files.</p>
<p>Thoughts on this are welcome!</p>
<p><strong>Update #2</strong>: Obviously there is <a href="http://www.myce.com/news/tool-converts-windows-8-store-trial-apps-to-full-paid-version-for-free-64976/" target="_blank">a tool available</a> that let&#8217;s you upgrade trial-versions of app to full-versions for free with on click of a button. I have not tested that tool yet nor would I encourage anyone to use it. But there is no doubt that many users will do so as it gains popularity(can you blame them?). But Microsoft should act quickly.</p>
<p><strong>Update #3: </strong>As I got some feedback from people saying &#8220;it&#8217;s not nice to rip off developers [ect&#8230;]&#8221; &#8211; I do agree! But the point here goes way beyond that: If I am able to modify an app within 15 minutes &#8211; then a virus will be able to do the same. Imagine a virus adding some lines of code to the application logic and the next time I use the application all my data(that is accessible by the application) could be sent to an evil server &#8211; just to give one brief example.</p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/removing-ads-from-windows8-apps/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>iOS html5 performance issues #2: scrollpanes and hardware acceleration</title>
		<link>http://indiegamr.com/ios-html5-performance-issues-with-overflow-scrolling-touch-and-hardware-acceleration/</link>
		<comments>http://indiegamr.com/ios-html5-performance-issues-with-overflow-scrolling-touch-and-hardware-acceleration/#comments</comments>
		<pubDate>Tue, 13 Nov 2012 06:41:22 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=509</guid>
		<description><![CDATA[Don&#8217;t try to force hardware acceleration on elements that are placed on a touch-scroll-pane! &#8230;and here&#8217;s why: I personally love the  &#8216;-webkit-overflow-scrolling: touch&#8217;-feature as it allows you to implement a scroll pane for mobile devices with just writing two lines of &#8230; <a href="http://indiegamr.com/ios-html5-performance-issues-with-overflow-scrolling-touch-and-hardware-acceleration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>Don&#8217;t try to force hardware acceleration on elements that are placed on a touch-scroll-pane!</strong> &#8230;and here&#8217;s why:</p>
<p>I personally love the  &#8216;-webkit-overflow-scrolling: touch&#8217;-feature as it allows you to implement a scroll pane for mobile devices with just writing two lines of css and no need of hasseling around with JS to make some content scroll smooth ect., however this approach also comes with a drawback: hardware acceleration will cause performance-issues on iOS (maybe other mobile devices, though it was only tested on an iPad2 running iOS6)</p>
<p>In my last post I was writing about forcing html5 hardware acceleration on iOS6, turns out you do NOT want to do that on every element as this can also cause the performance to drop, pointed out by the following example:<br />
<span id="more-509"></span><br />
The scenario is the following: The base is a big scrollpane using &#8216;<span style="font-family: 'Courier 10 Pitch', Courier, monospace !important;">-webkit-overflow-scrolling: touch</span>&#8216; that contains many images that are scaled from 100px width to 50px width.<br />
When combining this with forced hardware acceleration it will cause a massive drop in fps while scrolling.</p>
<p>Try it yourself by pointing your mobile browser to the following urls:<br />
<strong>Images Example</strong> <a href="http://labs.indiegamr.com/touch_scroll_performance/plain_images_nonaccel.html" target="_blank">Version 1: http://goo.gl/XIn9e</a> &#8211; NOT hardware accelerated, very good framerate<br />
<strong>Images Example</strong> <a href="http://labs.indiegamr.com/touch_scroll_performance/plain_images_accel.html" target="_blank">Version 2: http://goo.gl/DKC1u  </a>- hardware accelerated, low framerate while scrolling, however seems not to affect the execution of JS as the displayed fps does not drop</p>
<p>The only difference between Version 1 and Version 2 is:</p><pre class="crayon-plain-tag">img {
 -webkit-transform: translateZ(0);
 -webkit-perspective: 1000;
 -webkit-backface-visibility: hidden;
}</pre><p>The examples with HTMLImages shows a very huge drop in performance, however this effect is not solely limited to images but also &lt;div&gt; and other elements, even though it takes a larger number of divs to bring down the performance this way, it is possible:</p>
<p><strong>Divs Example</strong> <a href="http://labs.indiegamr.com/touch_scroll_performance/divs_nonaccel.html">Version 1: http://goo.gl/1iF71</a> &#8211; NOT accelerated, fluid, high fps<br />
<strong>Divs Example</strong> <a href="http://labs.indiegamr.com/touch_scroll_performance/divs_accel.html">Version 2: http://goo.gl/qkdwm</a> &#8211; accelerated, less frames on scrolling, seems to affect the execution speed of JS code</p>
<p>So bottom line: Forced hardware acceleration and <span style="font-family: 'Courier 10 Pitch', Courier, monospace !important;">&#8216;-webkit-overflow-scrolling: touch;&#8217;</span> do not work together very well!</p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/ios-html5-performance-issues-with-overflow-scrolling-touch-and-hardware-acceleration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS6 html hardware acceleration changes and how to fix them</title>
		<link>http://indiegamr.com/ios6-html-hardware-acceleration-changes-and-how-to-fix-them/</link>
		<comments>http://indiegamr.com/ios6-html-hardware-acceleration-changes-and-how-to-fix-them/#comments</comments>
		<pubDate>Sun, 30 Sep 2012 13:42:05 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=485</guid>
		<description><![CDATA[As probably many developers have already experience this over the past weeks: I had a phonegap application for iOS that contained some visually animated components  (a coverflow or a carousel for example). But after updating to iOS6 this is all &#8230; <a href="http://indiegamr.com/ios6-html-hardware-acceleration-changes-and-how-to-fix-them/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As probably many developers have already experience this over the past weeks:<br />
I had a phonegap application for iOS that contained some visually animated components  (a coverflow or a carousel for example). But after updating to iOS6 this is all flickring now and it feels horrible because it&#8217;s just stumbling and faltering on the new version of the OS.<br />
There are several reasons for this and I cannot say which were already there in iOS5, however here are the two main reasons and instructions on how to fix that:<span id="more-485"></span></p>
<h2>1. Not all CSS Properties trigger hardware acceleration any more</h2>
<p>Previously there were quite a few properties that triggered a hardware acceleration, for example:</p>
<ul>
<li>-webik-transform: translate3d(x,y,z);</li>
<li>-webkit-transform: preserve-3d;</li>
<li>&#8230;</li>
</ul>
<p>As Apple states in its <a href="http://developer.apple.com/library/ios/#releasenotes/General/RN-iOSSDK-6_0/_index.html#//apple_ref/doc/uid/TP40012166-CH1-SW19" target="_blank">Developer Changelog for iOS6</a>: &#8216;<em>WebKit no longer always creates hardware-accelerated layers for elements with the <code>-webkit-transform: preserve-3d</code> option.[&#8230;]</em>&#8216; There is a need for new CSS properties to trigger the acceleration, unfortunately I&#8217;m not aware of any official document by Apple listing those properties.</p>
<p><strong>How to fix it:</strong><br />
Here are three properties that have been proven to work (at least in combination, I have not yet tested them solo, but they should):</p>
<ul>
<li>-webkit-transform: translateZ(0);</li>
<li>-webkit-perspective: 1000;</li>
<li>-webkit-backface-visibility: hidden;<a href="http://indiegamr.com/ios6-html-hardware-acceleration-changes-and-how-to-fix-them/ios6-performance-overlapping/" rel="attachment wp-att-489"><br />
</a></li>
</ul>
<p>As this is going to trigger hardware acceleration for the specified elements this might still not completely fix all the issues, therefore please continue reading Nr.2.</p>
<hr />
<h2>2. Overlapping with other Elements</h2>
<p>Since I cannot downgrade to iOS5 I cannot say for sure if this &#8220;issue&#8221; already persisted, however it heavily persists with iOS6:<br />
<a style="font-style: normal; line-height: 24px; text-decoration: underline;" href="http://indiegamr.com/ios6-html-hardware-acceleration-changes-and-how-to-fix-them/ios6-performance-overlapping/" rel="attachment wp-att-489"><br />
</a>If you have an element(Element A) that is hardware accelerated and animated, it will/might cause performance and visual issues when overlapping with other elements(Element B) that are not hardware accelerated, as Element A will trigger Element B to be re-rendered with every change of Element A(at the end of a CSS-transition or when updating CSS properties through JS), which will cause:</p>
<ul>
<li><strong>flickering of Element B, since it renders a lot slower</strong></li>
<li><strong>heavy slowdown of the animation, since it needs more CPU time to render leaving less time for JS execution</strong></li>
</ul>
<p>One thing I noticed: If Element A OVERlaps another element it is not slowing down the animation as heavy as if Element A was UNDERlapping another element. Also it does not really matter if the parent-container of Element A has &#8216;overflow: hidden;&#8217; or &#8216;overflow: visible;&#8217; &#8211; it still slows doen the execution if the overlapping occures outside the bounds of the parent container.</p>
<p><strong>How to fix it:<br />
</strong> a) This can be simply fixed by giving ALL overlapping elements the CSS properties that trigger hardware accerleration. (<strong>see 1.</strong>)<br />
(My first approach to fix this was by alternating the DOM-order to only have OVERlapping elements, however fix a) is way easier and works way better &#8211; for me.)</p>
<p>I have visualized this here:<a href="http://indiegamr.com/ios6-html-hardware-acceleration-changes-and-how-to-fix-them/ios6-performance-overlapping/" rel="attachment wp-att-489"><img class="aligncenter size-full wp-image-489" title="ios6-performance-overlapping" src="http://indiegamr.com/wp-content/uploads/ios6-performance-overlapping.png" alt="" width="768" height="400" /></a></p>
<p>&nbsp;</p>
<p>edit1: 16-10-2012</p>
<hr />
<h2>3. Avoid changes between &#8216;display: none;&#8217; and &#8216;display: something;&#8217;</h2>
<p>Changing the display-state on iOS is like adding or removing an element to and from the DOM and is therefor a very heady calculation depending on how many items you have in your DOM that can easyly cause the UI to freeze for a second or more.</p>
<p><strong>How to fix it:</strong><br />
Instead of using the display-property, use the tranform-property instead, if you want to hide an item you can use something like this: transform:</p><pre class="crayon-plain-tag">translate(100000px,100000px);</pre><p>and if you want to show the element, just set the values to 0:</p><pre class="crayon-plain-tag">translate(0px,0px);</pre><p>You have to set the &#8216;position: absolute;&#8217; though. This method needs a little bit more work than using &#8216;display&#8217;, however the performance of your webapp will thank you greatly for that.</p>
<p>&nbsp;</p>
<p>I hope this helps someone as I was struggeling with this issue for quite a while, thoughts or additions on this article are very welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/ios6-html-hardware-acceleration-changes-and-how-to-fix-them/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>EaselJS 0.5.0</title>
		<link>http://indiegamr.com/easeljs-0-5-0/</link>
		<comments>http://indiegamr.com/easeljs-0-5-0/#comments</comments>
		<pubDate>Fri, 31 Aug 2012 18:44:50 +0000</pubDate>
		<dc:creator><![CDATA[olsn]]></dc:creator>
				<category><![CDATA[EaselJS]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://indiegamr.com/?p=457</guid>
		<description><![CDATA[I know it&#8217;s been out for a week now, but I guess I can still mention it: EaselJS 0.5.0 is out now: http://www.createjs.com/#!/EaselJS Check Out the Changelog here: https://github.com/CreateJS/EaselJS/blob/master/VERSIONS.txt]]></description>
				<content:encoded><![CDATA[<p>I know it&#8217;s been out for a week now, but I guess I can still mention it:<br />
EaselJS 0.5.0 is out now:<br />
<a href="http://www.createjs.com/#!/EaselJS" target="_blank">http://www.createjs.com/#!/EaselJS</a><br />
Check Out the Changelog here:<br />
<a href="https://github.com/CreateJS/EaselJS/blob/master/VERSIONS.txt" target="_blank">https://github.com/CreateJS/EaselJS/blob/master/VERSIONS.txt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://indiegamr.com/easeljs-0-5-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
