<?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>Wiering Software .eu &#187; haXe</title>
	<atom:link href="http://www.wieringsoftware.eu/category/haxe/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wieringsoftware.eu</link>
	<description>Mike Wiering's Game Development Blog</description>
	<lastBuildDate>Sat, 03 Sep 2011 00:11:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Molehill 2D Tilemap Demo</title>
		<link>http://www.wieringsoftware.eu/2011/07/molehill-tilemap-demo/</link>
		<comments>http://www.wieringsoftware.eu/2011/07/molehill-tilemap-demo/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 20:27:28 +0000</pubDate>
		<dc:creator>Mike Wiering</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[haXe]]></category>
		<category><![CDATA[Molehill]]></category>

		<guid isPermaLink="false">http://www.wieringsoftware.eu/?p=74</guid>
		<description><![CDATA[Adobe just released a beta version of Flash Player 11! This version includes hardware acceleration for 3D graphics with support for shaders. Of course, 3D technology can also be very useful for 2D games. Here is a haXe demo of parallax scrolling layers made using Molehill. Haxe now includes an easy way to write shaders [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe just released a <a href="http://labs.adobe.com/downloads/flashplayer11.html" target="_blank">beta version of Flash Player 11</a>! This version includes hardware acceleration for 3D graphics with support for shaders. Of course, 3D technology can also be very useful for 2D games. </p>
<p>Here is a haXe demo of parallax scrolling layers made using Molehill. Haxe now includes an easy way to write shaders using <a href="http://haxe.org/manual/hxsl" target="_blank">hxsl</a> (haXe Shader Language).</p>
<p><a href="http://www.wieringsoftware.eu/wp-content/demo1.jpg"><img src="http://www.wieringsoftware.eu/wp-content/demo1-300x169.jpg" alt="" title="demo1" width="300" height="169" class="aligncenter size-medium wp-image-75" /></a></p>
<p>The graphics were &#8220;evolved&#8221; using the <a href="http://www.wieringsoftware.nl/flash/evolver/" target="_blank">Random Art Evolver</a>. The map is generated from Perlin noise.</p>
<p><a href="http://www.wieringsoftware.eu/wp-content/demo2.jpg"><img src="http://www.wieringsoftware.eu/wp-content/demo2-300x168.jpg" alt="" title="demo2" width="300" height="168" class="aligncenter size-medium wp-image-76" /></a></p>
<p>Try the demo here (requires Flash Player 11 beta!):</p>
<ul>
<li><a href="http://www.wieringsoftware.nl/flash/molehill-tilemap-demo/" target="_blank">Molehill Tilemap Demo</a> (press <b>F11</b> for full screen, <b>arrow keys</b> to move and <b>Space</b> to change background color)
<p><em>There is no preloader so be patient, it may take 5-10 seconds to generate the textures and build the maps!</em>
	</li>
<li><a href="http://www.wieringsoftware.nl/flash/molehill-tilemap-demo/TilemapDemo.zip">TilemapDemo.zip</a> (haXe source code)
	</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.wieringsoftware.eu/2011/07/molehill-tilemap-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started writing games in haXe</title>
		<link>http://www.wieringsoftware.eu/2008/08/getting-started-writing-games-in-haxe/</link>
		<comments>http://www.wieringsoftware.eu/2008/08/getting-started-writing-games-in-haxe/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 14:58:03 +0000</pubDate>
		<dc:creator>Mike Wiering</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[haXe]]></category>
		<category><![CDATA[Ludum Dare]]></category>
		<category><![CDATA[Tile Studio]]></category>

		<guid isPermaLink="false">http://www.wieringsoftware.eu/2008/08/getting-started-writing-games-in-haxe/</guid>
		<description><![CDATA[This weekend (August 9-10, 2008) there is another Ludum Dare competition and I&#8217;m planning to participate. These are fun contests where you create a game in 48 hours based on a given theme. These games must be made from scratch, however some libraries are allowed and you&#8217;re allowed to use your own custom library if [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend (August 9-10, 2008) there is another <a href="http://www.ludumdare.com/compo/">Ludum Dare</a> competition and I&#8217;m planning to participate. These are fun contests where you create a game in 48 hours based on a given theme. These games must be made from scratch, however some libraries are allowed and you&#8217;re allowed to use your own custom library if it doesn&#8217;t contain game logic code and if you release it before the competition starts.</p>
<p>[kml_flashembed movie="http://www.wieringsoftware.eu/wp-content/scroll.swf" width="320" height="240"/]</p>
<p>I&#8217;m releasing some base code here for <a href="http://haxe.org/">haXe</a> which I&#8217;m planning to use during the competition. This might also be useful for anyone who wants to start creating Flash games in haXe. Basically, the code is pretty much the same as the <a href="http://tilestudio.sourceforge.net/flash/Demo.html">scroll demo</a> I made earlier, but now ported to AS3 (for Flash player 9), which is a lot faster. The main thing the code does is make it easy to use graphics and maps created in <a href="http://tilestudio.sourceforge.net/">Tile Studio</a> together with haXe.</p>
<p><em>(click and use arrow keys)</em></p>
<p>This is a little demo, included in the package to show how to use the library. There is a <strong>readme.txt</strong> file which has step-by-step instructions on how to install everything (haXe, swfmill, Tile Studio, FlashDevelop) and get it working.</p>
<ul>
<li>Download <a href="http://www.wieringsoftware.nl/ld/HaxeBaseCode-1.7.zip">HaxeBaseCode-1.7.zip</a> (154 kb)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.wieringsoftware.eu/2008/08/getting-started-writing-games-in-haxe/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using haXe for Platform Games</title>
		<link>http://www.wieringsoftware.eu/2007/01/platform-games-in-flash/</link>
		<comments>http://www.wieringsoftware.eu/2007/01/platform-games-in-flash/#comments</comments>
		<pubDate>Tue, 30 Jan 2007 00:46:29 +0000</pubDate>
		<dc:creator>Mike Wiering</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[haXe]]></category>

		<guid isPermaLink="false">http://www.wieringsoftware.eu/2007/01/platform-games-in-flash/</guid>
		<description><![CDATA[In the past weeks I&#8217;ve been experimenting a lot with haXe, a new programming language that can compile to Flash SWF files. Last summer, I already played around with haXe for a while and made a little flash scroll demo. Recently, I&#8217;ve been trying out different methods of drawing tiles, in order to find the [...]]]></description>
			<content:encoded><![CDATA[<p>In the past weeks I&#8217;ve been experimenting a lot with <a href="http://www.haxe.org/" target="_blank">haXe</a>, a new programming language that can compile to Flash SWF files. Last summer, I already played around with haXe for a while and made a little <a href="http://tilestudio.sourceforge.net/flash/Demo.html" target="_blank">flash scroll demo</a>. Recently, I&#8217;ve been trying out different methods of drawing tiles, in order to find the fastest method.</p>
<p>At first, the difference in speed appeared to be huge, but those were rather the result of other optimizations I did in the meantime. All these methods work at roughly the same speed if you&#8217;re using large tiles. But when you have small tiles (which I normally use for games) and you have hundreds of them on screen all the time, handling all those tiles seems to become far slower than rendering them.</p>
<p>Here are three methods I tried:</p>
<ol>
<li>The first is the method used in the scroll demo. Every tile is represented by a separate <strong>MovieClip</strong>, the total number of MovieClips stays constant, when a tile goes off-screen, its MovieClip is reused for the tile that appears on the other side. Using this method makes it very easy to add animated tiles, since they are handled by flash.</li>
<li>The second method is the same method as above, but with only one MovieClip with a <strong>BitmapData</strong> attached to it (as the screen surface) and just &#8220;blitting&#8221; all the tiles to it using <strong>copyPixels</strong>. Here you need to implement tile animations yourself.</li>
<li>For the third method (demonstrated below), each layer has its own BitmapData object as a surface (size of the screen + 2 tiles), which scrolls along with the layer. That way, you only need to redraw the tiles that actually change (at the edges and animating tiles). When you start to scroll, you&#8217;ll run out of space on the surface, but it wraps around to the other side. So normally, the screen will be divided in to sections horizontally and vertically. To get all those back together, there are 4 MovieClips per layer and the BitmapData is attached to all 4 of them. By placing them next to each other, you get the entire screen in the middle. The Mario example only scrolls horizontally, so it only uses 2 of those surfaces (per layer).</li>
</ol>
<p><center><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://www.wieringsoftware.eu/wp-content/mario001.swf" width="320" height="182" id="Mario"><param name="movie" value="http://www.walkernews.net/piano.swf" /><embed src="http://www.wieringsoftware.eu/wp-content/mario001.swf" width="320" height="182" name="Mario" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object><br />
</center><br /><center><em>(click to play)</em></center></p>
<p>This little demo is based on my <a href="http://www.wieringsoftware.nl/mario/" target="_blank">Mario clone for DOS</a>, there are no enemies and the only thing you can do is collect coins. If you are using FireFox, click on the game first. Use the arrow keys to walk and space to jump. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wieringsoftware.eu/2007/01/platform-games-in-flash/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

