<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Yuan Works Development Blog</title>
	
	<link>http://dev.yuanworks.com</link>
	<description>Video game development, tutorials, design, and news</description>
	<lastBuildDate>Wed, 10 Apr 2013 14:27:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/YuanWorks" /><feedburner:info uri="yuanworks" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>YuanWorks</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>2D Platformer: Jump-Through Platforms</title>
		<link>http://feedproxy.google.com/~r/YuanWorks/~3/mvm1v8y7Ns0/</link>
		<comments>http://dev.yuanworks.com/2013/04/10/2d-platformer-jump-through-platforms/#comments</comments>
		<pubDate>Wed, 10 Apr 2013 14:27:55 +0000</pubDate>
		<dc:creator>Yuan Works</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Little Ninja]]></category>
		<category><![CDATA[Platformer]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=418</guid>
		<description><![CDATA[Hey everyone :) more progress on our 2D Platform Engine! In our last post, Alejandro talked about Physics and Collision Detection between sprites and the terrain &#8212; namely, how the Ninja interacts with &#8230; <a class="readmore" href="http://dev.yuanworks.com/2013/04/10/2d-platformer-jump-through-platforms/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/jump_through_platforms.png"><img class="alignnone size-full wp-image-419" alt="2D Platformer Jump Through Platforms" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/jump_through_platforms.png" width="600" height="480" /></a></p>
<p>Hey everyone :) more progress on our 2D Platform Engine! In our last post, Alejandro <a title="Little Ninja: Physics and Collision Detection" href="http://dev.yuanworks.com/2013/03/19/little-ninja-physics-and-collision-detection/">talked about Physics and Collision Detection</a> between sprites and the terrain &#8212; namely, how the Ninja interacts with the map terrain.</p>
<p>Our next step was creating <strong>Jump Through Platforms </strong>&#8211; or JTPs, which are basically platforms where the sprite can jump through but will land, and by pressing  a combination of keys, which in our case is double-tap Down or [ ↓ ↓ ] (since we are using [ ↓ + Jump ] for ninja sliding), the sprite will fall through the platform. It&#8217;s easier to explain on video:</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='642' height='392' src='http://www.youtube.com/embed/7UdNwj9fs1I?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>Adding JTPs greatly increases the gameplay experience. So, how are exactly JTPs implemented in-game?</p>
<h3>Adding JTP&#8217;s to the Map Editor</h3>
<p>The first step is to be able to actually draw them in the Map Editor, else we won&#8217;t be able to test them ^^, as I mentioned some time ago when <a href="http://dev.yuanworks.com/2008/11/19/time-to-build-the-map-editor/">I started the Map Editor</a>, we have different angles, directions, and terrain types. These are the different types of angles and directions we have currently implemented:</p>
<p><img class="alignnone" alt="" src="http://www.wind-water.net/images/blog/littleninja/20081114_ninja_terrain_dirs.jpg" width="326" height="190" /></p>
<p>As for JTP&#8217;s, as you saw on the video, we have various inclinations too, so in this case, what we do is just change the &#8220;terrain type&#8221; bit. This is how it looks like now:</p><pre class="crayon-plain-tag">enum Mask_Terrain
{
	Empty = 0,
	Solid = 1,
	JumpThru = 2
};</pre><p>In our current Map Editor, JTP&#8217;s are just represented by gray tiles, so this is how part of our map looks like:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/04/map_editor2.png"><img class="alignnone size-full wp-image-427" alt="2D Map Editor" src="http://dev.yuanworks.com/wp-content/uploads/2013/04/map_editor2.png" width="917" height="617" /></a></p>
<p>On another note, the Map Editor has been improved considerably, it&#8217;s more efficient and some small but useful features have been added (like a thumbnail). Will talk about it on my next post :)</p>
<p>Back on track, as you can see, the actual JTP&#8217;s are one full tile in size. It does look kind of confusing when you see it on the editor, but do remember that actual graphics will go on top of what I call the map&#8217;s <em>mask</em> or terrain information. I did create a simple graphic for the platforms in-game.</p>
<p>So now that they&#8217;re added and saved on our new map, it&#8217;s time to implement them in game:</p>
<h3>Collision Detection for JTP&#8217;s</h3>
<p>Before getting into JTR&#8217;s, let&#8217;s take a rough look on how <strong>Solid</strong> tiles look like:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/04/jtr_solid.png"><img class="alignnone size-full wp-image-430" alt="jtr_solid" src="http://dev.yuanworks.com/wp-content/uploads/2013/04/jtr_solid.png" width="295" height="87" /></a></p>
<p>Collision-wise, the red lines indicate the <strong>collision planes</strong>, while the direction of the sprite when it collides into the tile surface is marked by red arrows. So, by adding both of these tiles together, this is what you get:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/04/jtr_solid21.png"><img alt="jtr_solid2" src="http://dev.yuanworks.com/wp-content/uploads/2013/04/jtr_solid21.png" width="210" height="89" /></a></p>
<p>So how to JTP&#8217;s look like? They are actually the same as their solid equivalent, with all the collision planes removed (grayed out) except for the top one:</p>
<p><img class="alignnone size-full wp-image-436" alt="Jump Through Platforms 2D Platformer" src="http://dev.yuanworks.com/wp-content/uploads/2013/04/jtr_jtr1.png" width="295" height="87" /></p>
<p>So again, adding the two tiles together would create two collision planes.</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/04/jtr_jtr21.png"><img class="alignnone size-full wp-image-437" alt="Jump Through Platforms 2D Platformer" src="http://dev.yuanworks.com/wp-content/uploads/2013/04/jtr_jtr21.png" width="210" height="89" /></a></p>
<p>So, what happens when a sprite jumps from below, on top of a JTP? At first it looks like it will trigger a ceiling collision and it may look like there should be a special case programmed for this, however, remember that collision <strong>only</strong> occurs from the direction the sprite is coming from (marked with the red arrows), so in this case only floor collisions are triggered. And voilá! There&#8217;s still one last issue regarding JTP&#8217;s:</p>
<h3>Falling off from platforms</h3>
<p>The final issue regarding platforms is if the sprite should be allowed to fall off or from platforms using a key combination. Usually, this is done by using the [ ↓ + Jump ] combination &#8212; however, as we want the Ninja to be able to slide while on a JTP, we have decided to use the [ ↓ ↓ ] combination, which is also pretty standard in 2D platformers:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/04/JTP_slide.gif"><img class="alignnone size-full wp-image-438" alt="Jump Through Platform: Slide" src="http://dev.yuanworks.com/wp-content/uploads/2013/04/JTP_slide.gif" width="228" height="144" /></a></p>
<p>&nbsp;</p>
<p>That pretty much wraps it up. If you noticed carefully on the video I posted above, Ninja-kun can now <strong>Slash, </strong>so our next step will be creating sprite-to-sprite collisions and hitboxes, or creating movable platforms. Which would you prefer to have implemented and which do you think poses more of a challenge?</p>
<p>Finally, again, don forget to follow us on <a href="http://www.facebook.com/YuanWorks">Facebook</a> and <a href="http://twitter.com/YuanWorks">Twitter</a>.</p>
<p>Happy gamedev and video gaming!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/YuanWorks?a=mvm1v8y7Ns0:4D8Wuwmcbpw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/YuanWorks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=mvm1v8y7Ns0:4D8Wuwmcbpw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=mvm1v8y7Ns0:4D8Wuwmcbpw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=mvm1v8y7Ns0:4D8Wuwmcbpw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=mvm1v8y7Ns0:4D8Wuwmcbpw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=mvm1v8y7Ns0:4D8Wuwmcbpw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=mvm1v8y7Ns0:4D8Wuwmcbpw:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/YuanWorks/~4/mvm1v8y7Ns0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2013/04/10/2d-platformer-jump-through-platforms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://dev.yuanworks.com/2013/04/10/2d-platformer-jump-through-platforms/</feedburner:origLink></item>
		<item>
		<title>Little Ninja: Physics and Collision Detection</title>
		<link>http://feedproxy.google.com/~r/YuanWorks/~3/5_E3gNHeSN4/</link>
		<comments>http://dev.yuanworks.com/2013/03/19/little-ninja-physics-and-collision-detection/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 21:42:50 +0000</pubDate>
		<dc:creator>Alejandro Di Mare</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Little Ninja]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=231</guid>
		<description><![CDATA[I&#8217;ve been meaning to write something explaining some of the physics and collision detection behind Little Ninja for awhile now, but I really wanted the engine to be at a point where &#8230; <a class="readmore" href="http://dev.yuanworks.com/2013/03/19/little-ninja-physics-and-collision-detection/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/phyninja.gif"><img class="alignnone size-medium wp-image-389" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/phyninja" /></a></p>
<p>I&#8217;ve been meaning to write something explaining some of the physics and collision detection behind Little Ninja for awhile now, but I really wanted the engine to be at a point where the movement of the ninja and his interactions with the terrain were pretty much finished. This way I can share not only the basics of writing a physics engine for a platformer, but also the many adjustments that have to be made to make it feel and look authentic. The last couple of days I&#8217;ve probably spent more time running and jumping around the terrain than actually working on the physics for the game (the fact that Yuan Hao has greatly improved the map editor making it very easy for us to create new maps has a lot to do with this). This makes me feel confident enough in the current state of the game&#8217;s engine to share it with the interwebz.</p>
<h3>Little Ninja&#8217;s Universe</h3>
<p>I&#8217;ll use the word sprite to talk about the characters in the game sometimes (including the Little Ninja). Sprites are pre-rendered 2d images that are integrated into a larger scene used in videogames mainly to display characters on screen.<br />
The game is tile based, each tile consists of a square of 16&#215;16 pixels (pixels are the smallest controllable element of a picture represented on the screen). We&#8217;re using pixels as the unit of length, as I will be for the rest of this post.<br />
Little Ninja runs at 60 fps (frames per second), which means that the screen is refreshed 60 times every second. Frames are used as the unit of time.<br />
A horizontal speed of 7 (pixels per frame) means that on every frame, the ninja moves 7 pixels to the right, if it were -7 he&#8217;d be moving the same distance to the left. Similarly, a vertical speed of 5 means the ninja is falling at 5 pixels per frame, and -5 means he&#8217;s moving up 5 pixels on each frame.</p>
<h3>Lateral Motion</h3>
<p>This is the first thing that needs to be taken care of, but also the easiest. Assuming infinite acceleration (meaning the character will transition from an idle position to full speed as soon as its detected that the button to walk or run is being pressed), this can be done by changing the position of the character in the map based on its lateral speed. This process is called integration:</p><pre class="crayon-plain-tag">void Physics::IntegrateSprite(Sprite * sprite)
{
    sprite-&gt;x += sprite-&gt;speed.x;
}</pre><p>This function is executed for every sprite on every frame, so all that needs to be done for a sprite to move horizontally is set its speed value.</p>
<h3>Vertical Motion</h3>
<p>Integrating a sprite vertically is slightly trickier, since (unless it&#8217;s a flying character) gravity should always affect its vertical motion. Given our units, gravity should be expressed in p/f² (pixels per frame squared). Now, I hate squared units, they make everything seem much more complicated than what it really is. A gravity on Earth of 9.8m/s² just means that each second, a free falling object&#8217;s speed increases by 9.8m/s; the speed increases 9.8 meters per second every second (hence 9.8m/s²). Simulating gravity just means increasing the sprite&#8217;s speed by a constant number on every frame before it&#8217;s integrated. For a character to jump all you need to do is set a value for its <em>y</em> speed and let the integrate function take care of the rest:</p><pre class="crayon-plain-tag">void Physics::IntegrateSprite(Sprite * sprite)
{
    sprite-&gt;x += sprite-&gt;speed.x;

    sprite-&gt;speed.y += sprite-&gt;gravity;
    sprite-&gt;y += sprite-&gt;speed.y;
}</pre><p>Notice that instead of having a global value for gravity (which would be more realistic), I&#8217;m using an attribute of the sprite. What this does is allow us to create characters that fall at different rates (or not at all); take Street Fighter&#8217;s Dhalsim for example, all it takes for his jumps to feel so floaty is a smaller value for his gravity.</p>
<p>One adjustment you might have to make is setting a terminal velocity. If the character is jumping off a platform that&#8217;s too high, the speed quickly becomes too great for the player to handle, so it&#8217;s important to set a limit to the <em>y</em> speed:</p><pre class="crayon-plain-tag">void Physics::IntegrateSprite(Sprite * sprite)
{
    sprite-&gt;x += sprite-&gt;speed.x;

    sprite-&gt;speed.y += sprite-&gt;gravity;
    if (sprite-&gt;speed.y &gt; sprite-&gt;terminal_velocity)
        sprite-&gt;speed.y = sprite-&gt;terminal_velocity;
    sprite-&gt;y += sprite-&gt;speed.y;
}</pre><p>You can apply this to lateral movement as well if you want to have your character accelerate, these are the things that make each game or even character within a game feel unique. Mario for instance takes quite awhile before reaching max speed when walking while Mega Man changes from idle to max speed instantly.</p>
<h3>Collisions</h3>
<p>One thing you might notice in the code of the integrate function is that it just moves the sprite based on its <em>x</em> and <em>y</em> speed with no regard to the its surroundings. If there&#8217;s a wall in front of the sprite there&#8217;s nothing that&#8217;ll stop it from going right through it. Collision detection and response deals with this issue. This article deals only with collisions between sprites and the terrain since collisions between sprites are being handled quite differently and will be described in a later post. For the sake of simplicity, I&#8217;ll talk about the ninja as if he were a single pixel.</p>
<p>To maintain the illusion of a solid world, two things need to be done when a sprite is integrated:<br />
1. Detect collisions<br />
2. Handle collisions</p>
<h3>Detecting collisions: The Broad Phase</h3>
<p>Collision detection can be further divided into two stages: <em>the broad phase</em> and <em>the narrow phase</em>.<br />
During the broad phase the map where the sprite moves must be analyzed and the tiles where it could have collided due to the movement during the frame must be determined. Take the following instance of a sprite moving from point A to point B within a map:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/broad_phase_1.png"><img class="size-full wp-image-278 aligncenter" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/broad_phase_1.png" width="237" height="296" /></a></p>
<p>A safe way to determine the tiles that need to be checked during the narrow phase is to enclose the sprite&#8217;s range of motion within a box, using the position of the pixel prior to and after integration as vertices:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/broad_phase_2.png"><img class="size-full wp-image-282 aligncenter" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/broad_phase_2.png" width="237" height="296" /></a></p>
<p>The tiles the box intersects with (highlighted in yellow) are selected for analysis during the narrow phase:<br />
<a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/broad_phase_3.png"><img class="size-full wp-image-285 aligncenter" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/broad_phase_3.png" width="237" height="296" /></a></p>
<h3>The Narrow phase</h3>
<p>This takes place within a tile, where it is determined if and how a collision between the character and a particular line within the tile took place. I&#8217;m gonna use a tile with a 45° slope to exemplify how this is done in Little Ninja, since collisions against slopes are usually the hardest to deal with in platformers. The tile consists of 3 lines, all of which will be defined internally by a normalized <a href="http://en.wikipedia.org/wiki/Euclidean_vector" target="blank">vector</a> <em>n</em> (an arrow of length 1 that starts at the origin and points perpendicularly at the line) and a distance <em>d</em>, which is the distance from the origin to the line following the direction of <em>n. </em> The normal of the sloped line in the tile would look like this:<a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/Tile.png"><img class="size-full wp-image-294 aligncenter" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/Tile.png" width="197" height="190" /></a></p>
<p>Now take these two cases: in the first one (A) the sprite lies above the line, in the second one it has phased through it (B). The positional vectors of the sprites are drawn pointing towards them (the components of which are just the sprite&#8217;s coordinates).</p>
<p style="text-align: left;"><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/2_cases.png"><img class="aligncenter" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/2_cases" /></a></p>
<p>Now, I&#8217;ll add the normals back, and <a href="http://en.wikipedia.org/wiki/Vector_projection" target="_blank">project</a> the positional vectors of each sprite on the normal of the tile, in both cases <em>d&#8217;</em> will represent the magnitude of the projected vector:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/2_cases_2.png"><img class="size-medium wp-image-309 aligncenter" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/2_cases_2.png" /></a><br />
Notice that in A, <em>d&#8217;</em> will be larger than the previously defined <em>d</em> (distance from the origin to the line), while in B, <em>d&#8217;</em> will be smaller. Since <em>n</em> is a unit vector, <em>d&#8217;</em> corresponds to the <a href="http://en.wikipedia.org/wiki/Dot_product" target="_blank">dot product</a> of the positional vector of the sprite with the normal of the line. Now for some more pseudocode:</p><pre class="crayon-plain-tag">void Physics::narrowPhase(Sprite * sprite, Tile * tile)
{
    for( each line in the tile )
    {
        // distance from the origin to the tip of the projected vector
        // dot product of the sprite's position with the line's normal
        distance = sprite-&gt;x * line-&gt;n.x + sprite-&gt;y * line-&gt;n.y

        // collision detected
        if ( distance &lt;= line-&gt;distance )
        {
            // reposition the sprite to fix the collision
        }
    }
}</pre><p></p>
<h3>Collision Response</h3>
<p>When it&#8217;s been determined that a sprite has penetrated a solid surface, it must be repositioned outside of the line&#8217;s bounds. The shortest distance between the sprite and the tile&#8217;s line where the collision took place will be in the direction of the line&#8217;s normal. The distance the sprite must travel in that direction to reach the outside of the line is the difference between <em>d</em> and <em>d&#8217;</em>, I&#8217;ll call that distance <em>r</em>:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/coll_response.png"><img class="size-full wp-image-325 aligncenter" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/coll_response.png" width="229" height="211" /></a></p>
<p>Since <em>n</em> is a unit vector, the components of a vector in the same direction with a size of <em>r</em> can be obtained simply by multiplying the compoenents of <em>n</em> by <em>r</em>:</p><pre class="crayon-plain-tag">void Physics::narrowPhase(Sprite * sprite, Tile * tile)
{
    for( each line in the tile )
    {
        // distance from the origin to the tip of the projected vector
        // dot product of the sprite's position with the line's normal
        distance = sprite-&gt;x * line-&gt;n.x + sprite-&gt;y * line-&gt;n.y

        // collision detected
        if ( distance &lt;= line-&gt;distance )
        {
            // distance the sprite must be adjusted in the direction of the normal
            response_distance = line-&gt;distance - distance;

            // the sprite is repositioned outside the line
            sprite-&gt;x += response_distance * line-&gt;n.x;
            sprite-&gt;y += response_distance * line-&gt;n.y;
        }
    }
}</pre><p></p>
<h3>Walking Uphill</h3>
<p>The great thing about using this method to resolve collisions is that it solves the problem of a character walking up a slope very elegantly, take for instance the following 2 sprites walking into a ramp and how the collisions are resolved.</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/the_good.png"><img class="size-full wp-image-338 aligncenter" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/the_good.png" width="229" height="211" /></a></p>
<p>As you can see, after the collision is resolved in both cases, the lateral distance traveled by each sprite is reduced depending on the slope of the hill and the lateral speed of the sprite. This means that characters in the game will not be able to run up ramps as fast as they can run on flat ground, but the rate at which they run will still be related to their speed. This creates a very nice effect that feels very natural when playing, here&#8217;s how it looks like in Little Ninja:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/slopes.gif"><img class="size-full wp-image-341 aligncenter" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/slopes.gif" width="283" height="160" /></a></p>
<h3>Drawbacks of the method</h3>
<p>There&#8217;s a lot of things that we&#8217;re used to in video games that aren&#8217;t based on real physics but do make the games more enjoyable. A lot are obvious (like being able to change a character&#8217;s trajectory mid-jump), but some are a bit harder to notice and fix. Take the following collision and response:</p>
<p style="text-align: center;"><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/the_bad_1.png"><img alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/the_bad_1.png" width="244" height="176" /></a></p>
<p>The response makes perfect sense, if a sprite just completed a running jump and lands on the ground it&#8217;s important to maintain the lateral movement to keep the flow of the game steady. Let&#8217;s now take a look at exactly the same diagram rotated 45 degrees:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/the_bad_2.png"><img class="size-full wp-image-347 aligncenter" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/the_bad_2.png" width="200" height="203" /></a><br />
If a character standing on a slope jumps straight up, when he falls back down the response will push the sprite down the slope a few pixels. This makes as much sense as the previous case from a physics point of view, however we&#8217;re not used to this behavior in video games. Any gamer who barely makes a jump into a sloped surface only to be pushed back by the physics engine to his death will probably smash his controller against the screen. It is clear that this case must be handled differently: the <em>x</em> position must be maintained and all adjustments must be made solely in the <em>y</em> axis.</p>
<p>To do this it&#8217;s necessary to figure out the <em>y</em> component of the vector I&#8217;ve highlighted in blue in the following image:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/the_bad_3.png"><img class="alignnone size-medium wp-image-355 aligncenter" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/the_bad_3.png" width="200" height="203" /></a></p>
<p>Notice that if the vector <em>a</em> is projected on the normal of the line, the magnitude of the resulting vector will be <em>r</em> (a value we have already calculated). So the vector <em>a</em> satisfies the following equation:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/097381b864c16d8bb7abdac401fe20b5.png"><img class="alignnone size-full wp-image-358" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/097381b864c16d8bb7abdac401fe20b5.png" /></a></p>
<p>We also know that the <em>x</em> component of the vector <em>a</em> is 0 (since it points straight upwards), if we solve for the <em>y</em> component of <em>a</em> we get:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/b8ea5e36a278095fa578345c4f32a108.png"><img class="alignnone size-medium wp-image-363" alt="" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/b8ea5e36a278095fa578345c4f32a108.png" width="222" height="97" /></a><br />
Which is quite simple and fast to compute!</p><pre class="crayon-plain-tag">void Physics::narrowPhase(Sprite * sprite, Tile * tile)
{
    for( each line in the tile )
    {
        // distance from the origin to the tip of the projected vector
        // dot product of the sprite's position with the line's normal
        distance = sprite-&gt;x * line-&gt;n.x + sprite-&gt;y * line-&gt;n.y

        // collision detected
        if ( distance &lt;= line-&gt;distance )
        {
            // distance the sprite must be adjusted in the direction of the normal
            response_distance = line-&gt;distance - distance;

            // the sprite's x position after the collision is resolved is calculated
            newX = sprite-&gt;x + response_distance * line-&gt;n.x;

            // check if the lateral motion is undesirable
            if ( x was moved in the opposite direction of the sprite's speed)
            {
                // x is unchanged, only y is altered
                sprite-&gt;y += response_distance / line-&gt;n.y;
            }
            else
            {
                // collision is dealt with normally
                sprite-&gt;x = newX;
                sprite-&gt;y += response_distance * line-&gt;n.y;
            }
        }
    }
}</pre><p></p>
<h3>Is that all there is to it?</h3>
<p>Nope. I didn&#8217;t want this post to grow too long so I didn&#8217;t mention a bunch of things that you&#8217;ll probably need to take care of if you&#8217;re working on a game (collision boxes, internal edge collisions, elastic collisions, etc). The best sources I&#8217;ve found so far are <a href="http://www.wildbunny.co.uk/blog/">Paul Birth&#8217;s blog</a> and Christer Ericson&#8217;s book <a href="http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323">Real-Time Collision Detection</a> if you&#8217;re really interested in the subject.</p>
<p>We&#8217;ll keep the blog updated whenever we run into anything interesting during the development process. If you have any questions, comments, or ideas you want to share please post them in our comments section! Don&#8217;t forget to follow us on <a href="http://www.twitter.com/YuanWorks">Twitter</a> and <a href="http://www.facebook.com/YuanWorks">Facebook</a>!</p>
<p>Thanks!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/YuanWorks?a=5_E3gNHeSN4:JBOnn_fSePg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/YuanWorks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=5_E3gNHeSN4:JBOnn_fSePg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=5_E3gNHeSN4:JBOnn_fSePg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=5_E3gNHeSN4:JBOnn_fSePg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=5_E3gNHeSN4:JBOnn_fSePg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=5_E3gNHeSN4:JBOnn_fSePg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=5_E3gNHeSN4:JBOnn_fSePg:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/YuanWorks/~4/5_E3gNHeSN4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2013/03/19/little-ninja-physics-and-collision-detection/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://dev.yuanworks.com/2013/03/19/little-ninja-physics-and-collision-detection/</feedburner:origLink></item>
		<item>
		<title>Little Ninja Dev: Smart Camera movement</title>
		<link>http://feedproxy.google.com/~r/YuanWorks/~3/cCyGeAES_n4/</link>
		<comments>http://dev.yuanworks.com/2013/03/09/little-ninja-dev-smart-camera-movement/#comments</comments>
		<pubDate>Sat, 09 Mar 2013 07:45:26 +0000</pubDate>
		<dc:creator>Yuan-Hao</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Little Ninja]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=197</guid>
		<description><![CDATA[&#8220;Unofficial&#8221; artwork by Yuan-Hao A lot of devving has been done in these weeks &#8212; essentially, most collisions have been resolved by Alejandro, and we now have generic sprites (which can be &#8230; <a class="readmore" href="http://dev.yuanworks.com/2013/03/09/little-ninja-dev-smart-camera-movement/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/ryuuhisketch.jpg"><img class="size-full wp-image-198 aligncenter" alt="Little Ninja sketch" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/ryuuhisketch.jpg" width="600" height="467" /></a></p>
<p><em>&#8220;Unofficial&#8221; artwork by Yuan-Hao</em></p>
<p>A lot of <em>devving</em> has been done in these weeks &#8212; essentially, most collisions have been resolved by Alejandro, and we now have generic sprites (which can be bosses, bullets, and the Ninja himself) that interact with a <em>Physics</em> class, which makes programming for us much easier.</p>
<p>(Oh and, my above sketch has nothing to do with the post, but I thought it would add a nice touch :) it&#8217;s unofficial artwork though &#8212; if you can call it like that, since I am not the <em>official</em> Yuan Works artist. I did work as a pixel artist many moons ago and designed most of the W&amp;W manual though!)</p>
<h3>Types of Cameras</h3>
<p>On to the Game Camera, I wanted to <em>emulate</em> what I have seen in most classic 2D platformers before thinking about our own game camera, so I nailed four types of cameras for now:</p><pre class="crayon-plain-tag">enum CameraType
{
	Locked,    // Fixed (x, y) coordinate -- does not follow target
	Centered,  // Target is always centered
	Forward,   // Camera "looks forward" depending on the target's direction
	Smart      // has its own life!
};</pre><p>First three types are pretty straightforward. Last case &#8212; the <strong>Smart Cam </strong>is the one I wanna talk about, but let&#8217;s see how the <b>Centered Cam</b> looks first:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/CameraCentered2.gif"><img class="size-full wp-image-207 aligncenter" alt="Little Ninja Centered Camera" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/CameraCentered2.gif" width="320" height="240" /></a></p>
<p>Camera will try to keep the target centered. Only thing you have to be careful is if the sprite is at &#8221;edge&#8221; or boundary of the stage, in which case the camera shouldn&#8217;t move. Something like this will do (click to see the code):</p><pre class="crayon-plain-tag">case CAM_Centered:

    // Our camera's upper left-most (x,y) will be:
    camera.x = sprite-&gt;x - camera.width / 2;
    camera.y = sprite-&gt;y - camera.height / 2;

    // Check if camera(x,y) is inside of the Stage boundary.
    if (camera.x &lt; 0)
        camera.x = 0;

    if (camera.x &gt; Stage.width - camera.width)
        camera.x = Stage.width - camera.width;

    if (camera.y &lt; 0)
        camera.y = 0;

    if (camera.y &gt; Stage.height - camera.height)
        camera.y = Stage.height - camera.height;</pre><p>If you&#8217;re doing a basic platformer, I recommend implementing this camera first, as this may be enough for what you want to do or test. <a href="http://youtu.be/BInKmcDUHA8?t=22m35s">Metroid Zero Mission</a> on GBA almost exclusively uses this camera (except for secrets and some other minor details). You may notice that when the player is at the boundary, the camera won&#8217;t keep him centered, it will adjust to the left-most upper pixel of the Stage.</p>
<p>Some stuff may arise with this type of camera:</p>
<ol>
<li>Even if you move a little, the screen will scroll (scrolling doesn&#8217;t look so good in small screens sometimes)</li>
<li>When the target sprite is running too fast, it&#8217;s hard to keep track of what&#8217;s coming</li>
<li>It&#8217;s hard to hide secret areas on the map (think of DKC or any Metroidvania)</li>
</ol>
<p>#1 and #3 are harder to solve, so let&#8217;s solve #2 first&#8230;</p>
<h3>Forward Camera: Look ahead!</h3>
<p>As  most enemies will come facing you, rather than from behind (well, it&#8217;s a Ninja, so who knows!), this camera will always show a bigger area in the direction which the player is facing. Here&#8217;s how it looks:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/03/Camera-Fwd.gif"><img class="size-full wp-image-209 aligncenter" alt="Forward Camera Little Ninja" src="http://dev.yuanworks.com/wp-content/uploads/2013/03/Camera-Fwd.gif" width="320" height="240" /></a></p>
<p>&nbsp;</p>
<p>In this case, the camera will follow the direction the Ninja is facing, and will show 96 pixels forward, so 60% of the screen will be in front. However, note that this introduces another variable, you will need to have a scrolling speed, because if the screen scrolls too fast, you&#8217;ll get dizzy pretty quickly &lt;^^&lt; , so you&#8217;ll need to keep a <em>scrollingDestination(x,y)</em> and a <em>scrollingCurrent(x,y)</em> coordinates. This is how the scrolling code looks:</p><pre class="crayon-plain-tag">//
// Scroll the screen if dest and current are different:
if (scrollDest.x != scrollCurrent.x)
{
	if (abs(scrollCurrent.x - scrollDest.x) &gt; scrollSpeedX)
		scrollCurrent.x += M_sign(scrollDest.x - scrollCurrent.x) * scrollSpeed.x;
	else
		scrollCurrent.x =.x;
}

if (scrollDest.y != scrollCurrent.y)
{
    if (abs(scrollCurrent.y - scrollDest.y) &gt; scrollSpeedY)
        scrollCurrent.y += M_sign(scrollDest.y - scrollCurrent.y) * scrollSpeed.y;
    else
        scrollingCurrent.y = scrollingDest.y;
}</pre><p>This solves issue #2, however, if you quickly turn left and right, the screen will scroll like crazy, something that, again, can be undesired for smaller handheld screens.</p>
<h3>Smart Camera</h3>
<p>The final solution is to implement a <em>Smart Camera</em>, the name&#8217;s a little pretentious ;) but in reality this camera just tries to mimic the natural flow of someone following us with a real camera. This video by Shaun Inman explains how<a href="http://www.youtube.com/watch?v=TCIMPYM0AQg"> Mario&#8217;s camera works</a> and you&#8217;ll see it&#8217;s pretty ingenious &#8212; it is nicely implemented by said author in <a href="http://www.youtube.com/watch?v=nryuCql2k9A">this video</a>. So here&#8217;s a video of how Little Ninja&#8217;s Smart Camera looks:</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='642' height='392' src='http://www.youtube.com/embed/uAdvFVmW-rE?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>On to explaining what this camera features: Whenever the sprite moves inside of the blue box, scrolling won&#8217;t occur. So if you turn a lot to the left and to the right, the screen won&#8217;t scroll too much, and the screen has sort of an <em>acceleration </em>parameter where if you don&#8217;t move, the camera doesn&#8217;t move too much either. This idea was inspired by <a href="http://kpulv.com/92/Dev_Log__Some_More_Camera_Stuff/">Kyle Pulver&#8217;s Camera</a>. Do check it out &#8212; you&#8217;ll see why it&#8217;s so important to have a <em>smooth and natural</em>-<em>feeling</em> camera.</p>
<p>You&#8217;ll also notice that Ninja is almost centered, but when you start running, the camera will accelerate again and <strong>look forward</strong>, allowing you to see more terrain for incoming exploding flying birds or projectiles, and as soon as you slow down, the screen scrolls back to you.</p>
<p>As for top-down scrolling, this is much trickier and I didn&#8217;t do too much tweaking, but basically, scrolling is fast if you are falling down, but if you jump to a top platform, scrolling will occur slowly &#8212; this allows us to feel a little hang when the player jumps to a very high platform. However, if you start running, the camera quickly gets back to you and starts scrolling much faster.</p>
<h3>Yay! So is this the ultimate platformer camera?</h3>
<p>Nope, it&#8217;s not in its final version! And actually, this camera may not be suitable for all situations, bosses will definitely need their own defined camera, auto-scrolling and scripted cameras will also play a big part, but this last camera has allowed us to have a better feeling of a high speed platformer.</p>
<p>The final issue, #3, as Kyle called them &#8220;Camera blockers&#8221; (secret rooms) can be partially solved with a smart camera, but will definitely need scripting wired to the map editor.</p>
<p>If you notice in this video there are new actions (double jumping and sliding while running), and most collisions have been fixed &#8212; Ninja can now run downhill, which is a great improvement as Alejandro did not have to force the code and managed most of it with collision detection formulas, instead of having to hard-wire individual cases. He&#8217;ll be talking about that that as soon as collisions are perfected.</p>
<p>So far, we&#8217;re liking the fast-paced action and the camera is helping a lot. What&#8217;s your take on it? Do you prefer exploration or fast-paced action? Let us know in our comments, and if you wanna get in touch with us, don&#8217;t forget to follow us on <a href="http://www.twitter.com/YuanWorks">Twitter</a> and <a href="http://www.facebook.com/YuanWorks">Facebook</a>!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/YuanWorks?a=cCyGeAES_n4:kfVnpnFXrVs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/YuanWorks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=cCyGeAES_n4:kfVnpnFXrVs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=cCyGeAES_n4:kfVnpnFXrVs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=cCyGeAES_n4:kfVnpnFXrVs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=cCyGeAES_n4:kfVnpnFXrVs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=cCyGeAES_n4:kfVnpnFXrVs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=cCyGeAES_n4:kfVnpnFXrVs:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/YuanWorks/~4/cCyGeAES_n4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2013/03/09/little-ninja-dev-smart-camera-movement/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://dev.yuanworks.com/2013/03/09/little-ninja-dev-smart-camera-movement/</feedburner:origLink></item>
		<item>
		<title>Little Ninja: Retaking the Game Engine</title>
		<link>http://feedproxy.google.com/~r/YuanWorks/~3/HCpmjPoc3mM/</link>
		<comments>http://dev.yuanworks.com/2013/02/26/little-ninja-retaking-the-game-engine/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 09:49:34 +0000</pubDate>
		<dc:creator>Yuan Works</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Little Ninja]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=167</guid>
		<description><![CDATA[Hi everyone, welcome back to the Yuan Works DEV blog! ^^ We are slowly bringing Little Ninja back on his feet, as well as our GameDev blog, with information of what&#8217;s happening &#8230; <a class="readmore" href="http://dev.yuanworks.com/2013/02/26/little-ninja-retaking-the-game-engine/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/02/ninja_wip_gameengine.jpg"><img class="size-full wp-image-172 aligncenter" alt="Little Ninja Work in Progress" src="http://dev.yuanworks.com/wp-content/uploads/2013/02/ninja_wip_gameengine.jpg" width="620" height="460" /></a></p>
<p>Hi everyone, welcome back to the Yuan Works DEV blog! ^^</p>
<p>We are slowly bringing Little Ninja back on his feet, as well as our GameDev blog, with information of what&#8217;s happening behind the scenes.</p>
<p>Regarding some questions you may have or that we usually get asked a lot (IE: &#8220;<em>Will this game run on my favorite console&#8221;</em>, or, <em>&#8220;Is Little Ninja your next big project?&#8221;</em>), we&#8217;ll be addressing them at the end of this post. For now, on to the Engine!</p>
<h3>Game Engine update, and a new member in our team!</h3>
<p>One of the most important aspect of a good <em>platformer</em> is how smooth it is played, as you may remember in <a href="http://dev.yuanworks.com/category/little-ninja/">previous posts</a>, mechanics like running, sliding, double jumping, and wall hanging were pretty much functional. However, physics and collisions were temporarily implemented just for the Ninja itself, so adding a new enemy or player would mean having to program each of them separately.</p>
<p>The solution was to start working on a solid Physics and Collisions Engine, which programmer <strong>Alejandro Di Mare</strong>, is currently working on. He&#8217;s working on game mechanics and general development too, but as for now this is one of our priorities, while I (<strong>Yuan-Hao</strong>) will be working on tools and editors, as well as porting old tools from Wind and Water to Little Ninja.</p>
<p>Anyway, we&#8217;ll be posting with more details on that later :) Here&#8217;s a short video of Little Ninja&#8217;s new collisions as well as the Map Editor. Jumping physics have been improved too:</p>
<p><a href="http://www.youtube.com/watch?v=q6znMEUo1Fg"><span style="color: #333333;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='642' height='392' src='http://www.youtube.com/embed/q6znMEUo1Fg?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></span></a></p>
<p>Old collisions have been removed for now, but the new ones will work with all sprites, so as soon as it&#8217;s done, adding enemies and real gameplay will be quite easy!</p>
<h3>What about the graphics?</h3>
<p>Speaking of enemies, <strong>Yuan-Hsi </strong>decided that a Ninja without a Nemesis is not a real ninja! So here&#8217;s some WIP of a new sprite:</p>
<p><a href="http://dev.yuanworks.com/wp-content/uploads/2013/02/ninja_wip.jpg"><img class="size-full wp-image-173 aligncenter" alt="Little Ninja Sprites" src="http://dev.yuanworks.com/wp-content/uploads/2013/02/ninja_wip.jpg" width="174" height="184" /></a></p>
<p>Graphics are not as important for now, as the three of us are more focused on engine and gameplay mechanics, but it&#8217;s always a treat to get a hang of the look and feel :)</p>
<h3>Future of Little Ninja</h3>
<p>For some time now, we&#8217;ve received some questions regarding Little Ninja, as well as <strong>a lot </strong><strong>of support from fans. </strong>Thanks! It&#8217;s actually your support that got us back into working on Little Ninja, and what will shape its future!</p>
<p><strong>Will Little Ninja run for  <em>[ insert your favorite console here ] </em>?</strong></p>
<p>Little Ninja <em>technically</em> run on whatever Wind and Water worked for, as we are using the same architecture. So that means: Windows, Linux, Dreamcast, and Linux-based portable devices like Pandora and the GCW. Technically&#8230;!</p>
<p><strong>Yay! So will it be released for my <em>[beloved console] </em>!</strong></p>
<p>That&#8217;s a whole different story! =D Each different release needs a lot of work, testing, and porting. For example, W&amp;W&#8217;s Dreamcast manual was 50 pages long, and designing the whole packaging took a long time! The game was also translated 100% to Japanese.</p>
<div class="wp-caption aligncenter" style="width: 560px"><img alt="" src="http://www.wind-water.net/images/dreamcast/packaging/full_package2_550px.jpg" width="550" height="413" /><p class="wp-caption-text">Wind and Water&#8217;s packaging for Dreamcast</p></div>
<p>We&#8217;re not even sure if it&#8217;s going to be our big project or if it&#8217;s going to get released &#8212; we&#8217;re not thinking about that yet, it&#8217;s too early for that!</p>
<p><strong>So why don&#8217;t you guys Kickstart or open preorders or do some funding? What about newer systems?</strong></p>
<p>When W&amp;W was released, things were different! Android was not so popular, Steam was not as big as it is now, and Kickstarter probably didn&#8217;t exist.</p>
<p>We&#8217;re aware of all the options, but to tell the truth, we enjoy the process of making games &#8212; we love making them, even though there are hardships to endure.</p>
<p>Little Ninja is on a very early stage of development, and we wanna show you guys more of Little Ninja, and think less about how we&#8217;re gonna make it happen.</p>
<p>Let&#8217;s worry about making a fun game, all we ask from you guys is your support and feedback! This will all shape up the future of Little Ninja &#8211; <a href="#respond">let us know what you think</a>, share it, follow <strong><a href="http://www.facebook.com/YuanWorks">Yuan Works</a></strong> on Facebook, we&#8217;re retaking our <a href="http://twitter.com/YuanWorks/">Twitter</a> account, and if you blog about us, don&#8217;t forget to let us know! (English, Español, 中文, 日本語, Italiano, <em>un peu de français, </em>or any other language we don&#8217;t speak is fine!)</p>
<p>Updates will be coming, and thanks for reading!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/YuanWorks?a=HCpmjPoc3mM:2DzB_Ycy-HE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/YuanWorks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=HCpmjPoc3mM:2DzB_Ycy-HE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=HCpmjPoc3mM:2DzB_Ycy-HE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=HCpmjPoc3mM:2DzB_Ycy-HE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=HCpmjPoc3mM:2DzB_Ycy-HE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=HCpmjPoc3mM:2DzB_Ycy-HE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=HCpmjPoc3mM:2DzB_Ycy-HE:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/YuanWorks/~4/HCpmjPoc3mM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2013/02/26/little-ninja-retaking-the-game-engine/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://dev.yuanworks.com/2013/02/26/little-ninja-retaking-the-game-engine/</feedburner:origLink></item>
		<item>
		<title>Wind and Water: Raffle and Online Beta Testing!</title>
		<link>http://feedproxy.google.com/~r/YuanWorks/~3/j61bOpVFmAM/</link>
		<comments>http://dev.yuanworks.com/2011/02/19/wind-and-water-raffle-and-online-beta-testing/#comments</comments>
		<pubDate>Sun, 20 Feb 2011 05:19:58 +0000</pubDate>
		<dc:creator>Yuan Works</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=162</guid>
		<description><![CDATA[Hi everyone, We&#8217;d like to tell you that we&#8217;ll be holding the raffle for the 5 Full Set Avatars today Sunday. We have great news too, Online tests are going very smooth &#8230; <a class="readmore" href="http://dev.yuanworks.com/2011/02/19/wind-and-water-raffle-and-online-beta-testing/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Hi everyone,</p>
<p>We&#8217;d like to tell you that we&#8217;ll be holding the raffle for the 5 Full Set Avatars today Sunday.</p>
<p>We have great news too, Online tests are going very smooth on Windows, Linux, and even Pandora! Here&#8217;s a video courtesy of PokeParadox (thanks!)</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='642' height='392' src='http://www.youtube.com/embed/GjcJF_sK7hY?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>And! We&#8217;ll be doing some online beta testing tomorrow! Join us so we can test-load the server, on our online chat:</p>
<p><a href="irc://irc.freenode.net#windandwater">irc://irc.freenode.net#windandwater</a></p>
<p>Or, if you don&#8217;t have IRC (like me!) click here:</p>
<p><a href="http://www.wind-water.net/chat">http://www.wind-water.net/chat</a></p>
<p>The raffle and online testing will begin today Sunday Feb 20th. <strong>We&#8217;ll be on the channel from 11PM GMT to 5PM GMT,</strong> we&#8217;ll hold the raffle first and then get ready for some online beta testing!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/YuanWorks?a=j61bOpVFmAM:kff6_Awjcos:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/YuanWorks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=j61bOpVFmAM:kff6_Awjcos:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=j61bOpVFmAM:kff6_Awjcos:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=j61bOpVFmAM:kff6_Awjcos:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=j61bOpVFmAM:kff6_Awjcos:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=j61bOpVFmAM:kff6_Awjcos:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=j61bOpVFmAM:kff6_Awjcos:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/YuanWorks/~4/j61bOpVFmAM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2011/02/19/wind-and-water-raffle-and-online-beta-testing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://dev.yuanworks.com/2011/02/19/wind-and-water-raffle-and-online-beta-testing/</feedburner:origLink></item>
		<item>
		<title>Wind and Water: Mouse support release and Custom Avatar Demo</title>
		<link>http://feedproxy.google.com/~r/YuanWorks/~3/7TCBa454Y4w/</link>
		<comments>http://dev.yuanworks.com/2011/02/12/wind-and-water-mouse-support-release-and-custom-avatar-demo/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 23:21:55 +0000</pubDate>
		<dc:creator>Yuan Works</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=156</guid>
		<description><![CDATA[Hi guys and gals, Just wanted to tell you that Wind and Water now has in-game Mouse Support as of version 1.05, download from our main website! The video also shows how &#8230; <a class="readmore" href="http://dev.yuanworks.com/2011/02/12/wind-and-water-mouse-support-release-and-custom-avatar-demo/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Hi guys and gals,</p>
<p>Just wanted to tell you that Wind and Water now has in-game Mouse Support as of version 1.05, download from our <a href="http://www.wind-water.net/#download">main website</a>!</p>
<p>The video also shows how Full Set Avatars work (in case you don&#8217;t know, for $10 or $15 you can be a part of our game and play with your own W&amp;W-styled avatar based on yourself!)</p>
<p>Here&#8217;s the video:</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='642' height='392' src='http://www.youtube.com/embed/UlUWuWur-zg?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>If you want to appear on the game, for a limited time you <a href="http://www.wind-water.net/#avatar">can grab your own avatar and support us</a>! We&#8217;re also raffling <a href="http://forum.wind-water.net/viewforum.php?f=4">5 Custom Avatars</a> at our Forums, participating is easy but you have little time left!</p>
<p>We&#8217;re also working on a <a href="http://forum.wind-water.net/viewtopic.php?f=4&amp;t=61">Linux</a> version which is available for beta test on the forums (the game works 100%) will soon be released.</p>
<p>Wind and Water has been <a href="http://www.tigsource.com/2011/02/08/wind-and-water-puzzle-battles/">reviewed at TIG Source</a> and was tagged by indie developer <a href="http://www.derekyu.com/">Derek Yu</a> as<strong> &#8220;Highly Recommended&#8221;! </strong> (Thanks Derek!) This means more players will be able to enjoy W&amp;W, which is now free, and hopefully we&#8217;ll have the new online scoreboards and online beta testing running soon!</p>
<p>What do you think about mouse support?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/YuanWorks?a=7TCBa454Y4w:LaYp-1bMiDI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/YuanWorks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=7TCBa454Y4w:LaYp-1bMiDI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=7TCBa454Y4w:LaYp-1bMiDI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=7TCBa454Y4w:LaYp-1bMiDI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=7TCBa454Y4w:LaYp-1bMiDI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=7TCBa454Y4w:LaYp-1bMiDI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=7TCBa454Y4w:LaYp-1bMiDI:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/YuanWorks/~4/7TCBa454Y4w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2011/02/12/wind-and-water-mouse-support-release-and-custom-avatar-demo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://dev.yuanworks.com/2011/02/12/wind-and-water-mouse-support-release-and-custom-avatar-demo/</feedburner:origLink></item>
		<item>
		<title>Wind and Water: Mouse support!</title>
		<link>http://feedproxy.google.com/~r/YuanWorks/~3/tDpk8su3jFQ/</link>
		<comments>http://dev.yuanworks.com/2011/02/05/wind-and-water-mouse-support/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 05:46:13 +0000</pubDate>
		<dc:creator>Yuan Works</dc:creator>
				<category><![CDATA[W&W]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=150</guid>
		<description><![CDATA[Alright, first things first, here&#8217;s a short video showing mouse support! Yuan will be explaining how to clear Stage E05 (which is pretty far ahead on the game in case you hate &#8230; <a class="readmore" href="http://dev.yuanworks.com/2011/02/05/wind-and-water-mouse-support/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Alright, first things first, here&#8217;s a short video showing <strong>mouse support!</strong></p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='642' height='392' src='http://www.youtube.com/embed/_oQ9y9SDWKk?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>Yuan will be explaining how to clear Stage E05 (which is pretty far ahead on the game in case you hate spoilers!) as well as explaining about the mouse. Basically you use the left and right clicks to rotate the pieces, which we thought wouldn&#8217;t work so good but it&#8217;s actually  quite nice :)</p>
<p>Comment to let us know what you think about it (and let us know if you&#8217;d like to beta-test the mouse version too, we&#8217;ll be uploading a private W&amp;W beta around here!)</p>
<h2>Wind and Water around the web!</h2>
<p>Since our release of W&amp;W less than a week ago, the game has been mentioned on tons of sites around the web!</p>
<p>The game was quickly catched by the <a href="http://www.gp32x.com/board/index.php?/topic/58466-wind-and-water-puzzle-battles-free/page__p__936671&amp;#entry936671">original GP2X users</a>, the  <a href="http://gp32spain.com/foros/showthread.php?t=80606">GP2X Spanish community</a>, Open Pandora, as well as many many Dreamcast sites, <a href="http://forums-dreamagain.vibvib.fr/viewtopic.php?f=21&amp;t=2179">DreamAgain</a> (in French &#8212; thanks Edd!), was also reviewed as one of the <a href="http://www.segabits.com/?p=7549">best 5 DC indie games</a> (thanks Barry and <a href="http://www.segabits.com/?p=7380">cube_b3</a> from Senile Team!), the <a href="http://the-dreamcast-junkyard.blogspot.com/">Dreamcast Junkyard</a>, and by KingBuzzo from the DC Scene too!</p>
<p>We&#8217;ve also hit sites like <a href="http://www.indiegames.com/blog/2011/02/freeware_game_pick_wind_and_wa.html">indiegames.com</a>, <a href="http://www.retrocollect.com/News/wind-and-water-puzzle-battles-released-for-free-on-pc.html">retrocollect.com</a> (thanks Cauterize!), <a href="http://www.rockpapershotgun.com/2011/02/01/blocks-and-experience-points-wind-and-water/">RPS</a>, the <a href="http://forums.tigsource.com/index.php?topic=17536.15">TIG source forums</a>, sites in languages that we understand &#8212; Spanish, Portuguese, French, and <a href="http://www.idealsoftblog.it/2011/01/wind-and-water-puzzle-battles-adesso-e.html">Italian</a> too, some that we don&#8217;t have a clue about like <a href="http://www.dobreprogramy.pl/Wind-and-Water-Puzzle-Battles-1.04,Gra,Windows,22960.html">Polish</a>!</p>
<p>We&#8217;ve even read about someone who is actually in <a href="http://forums-dreamagain.vibvib.fr/viewtopic.php?p=35673#p35673">The Final Stage</a> (in French), so we&#8217;re expecting people to see the final ending this weekend and keep enjoying the game :)</p>
<p>Here&#8217;s a fan made video edit with custom BGM from the first W&amp;W mini-game, <strong>Sunset Driver</strong>:</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='642' height='392' src='http://www.youtube.com/embed/dkSvgnyVf-w?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>We&#8217;re very grateful with everyone sharing the news about W&amp;W, and with our<strong> first 2,000 downloads</strong> and lots of feedback, we&#8217;re closer to making W&amp;W Online Battles a reality!</p>
<p>If you know of websites, own a blog, participate in forums, or know friends, via Facebook or anything that might be interested, please let them know about the game! And don&#8217;t forget to participate on the <a href="http://forum.wind-water.net/">Forums</a> too and win a chance to have a free <a href="http://forum.wind-water.net/viewtopic.php?f=4&amp;t=60">Full Set Custom Avatar</a>!</p>
<p>We&#8217;ll bring you more of Yuan Works in the next few weeks, so keep tuned! :D</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/YuanWorks?a=tDpk8su3jFQ:CX_1_y-d8us:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/YuanWorks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=tDpk8su3jFQ:CX_1_y-d8us:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=tDpk8su3jFQ:CX_1_y-d8us:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=tDpk8su3jFQ:CX_1_y-d8us:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=tDpk8su3jFQ:CX_1_y-d8us:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=tDpk8su3jFQ:CX_1_y-d8us:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=tDpk8su3jFQ:CX_1_y-d8us:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/YuanWorks/~4/tDpk8su3jFQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2011/02/05/wind-and-water-mouse-support/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://dev.yuanworks.com/2011/02/05/wind-and-water-mouse-support/</feedburner:origLink></item>
		<item>
		<title>Wind and Water: Puzzle Battles FREE for PC, WIZ, GP2X!</title>
		<link>http://feedproxy.google.com/~r/YuanWorks/~3/lLRdZmqt6Qo/</link>
		<comments>http://dev.yuanworks.com/2011/01/31/wind-and-water-puzzle-battles-free-for-pc-wiz-and-gp2x/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 00:14:56 +0000</pubDate>
		<dc:creator>Yuan Works</dc:creator>
				<category><![CDATA[W&W]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=142</guid>
		<description><![CDATA[We&#8217;d like to announce that Wind and Water: Puzzle Battles, our commercial release for SEGA Dreamcast, GP2X, and WIZ is now FREE and available for PC too! Here&#8217;s the trailer: Visit Wind &#8230; <a class="readmore" href="http://dev.yuanworks.com/2011/01/31/wind-and-water-puzzle-battles-free-for-pc-wiz-and-gp2x/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>We&#8217;d like to announce that Wind and Water: Puzzle Battles, our commercial release for SEGA Dreamcast, GP2X, and WIZ is now FREE and available for PC too!</p>
<p>Here&#8217;s the trailer:</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='642' height='392' src='http://www.youtube.com/embed/JeSoz3UYdKM?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>Visit <a href="http://www.wind-water.net">Wind and Water Puzzle Battles</a> to download the game and for more info!</p>
<p>And if you&#8217;d like to support us, you can get a Custom Avatar based on you:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.wind-water.net/images/pc/custom_sprites.jpg" alt="" width="540" height="128" /></p>
<p>Sprites appear in-game:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.wind-water.net/images/pc/sprites_ingame.png" alt="" width="510" height="126" /></p>
<p><a href="http://www.wind-water.net/#avatar">Click here</a> for more information on how to get a sprite and support us!</p>
<p>Please let others know about W&amp;W (in forums, in your own website, in game news sites), download the game, comment about it and, if you can, support us! We really need others knowing about the game which will mean that we can keep working on the Online/Net play version of W&amp;W (which we&#8217;re hoping to release if W&amp;W gets popular enough) as well as our other projects such as <a href="http://dev.yuanworks.com/category/little-ninja/">Little Ninja</a>.</p>
<p>Also, we&#8217;ll be giving out 5 Full Set sprites for FREE for W&amp;W players, <a href="http://forum.wind-water.net/viewtopic.php?f=4&amp;t=60">click here</a> for more information on how to win one!</p>
<p>Happy gaming!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/YuanWorks?a=lLRdZmqt6Qo:GLfLDczsuTU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/YuanWorks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=lLRdZmqt6Qo:GLfLDczsuTU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=lLRdZmqt6Qo:GLfLDczsuTU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=lLRdZmqt6Qo:GLfLDczsuTU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=lLRdZmqt6Qo:GLfLDczsuTU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=lLRdZmqt6Qo:GLfLDczsuTU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=lLRdZmqt6Qo:GLfLDczsuTU:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/YuanWorks/~4/lLRdZmqt6Qo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2011/01/31/wind-and-water-puzzle-battles-free-for-pc-wiz-and-gp2x/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://dev.yuanworks.com/2011/01/31/wind-and-water-puzzle-battles-free-for-pc-wiz-and-gp2x/</feedburner:origLink></item>
		<item>
		<title>More on the 2D/3D Project</title>
		<link>http://feedproxy.google.com/~r/YuanWorks/~3/Z3fXTGeITlY/</link>
		<comments>http://dev.yuanworks.com/2010/02/28/more-on-the-2d3d-project/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 05:50:45 +0000</pubDate>
		<dc:creator>Yuan-Hsi</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Sprite]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=136</guid>
		<description><![CDATA[Trying to make 3D look unmistakably 2D brought some problems on 3D graphics software. Since properties such as the ones I’m looking for are seldom (if at all) used, even if they &#8230; <a class="readmore" href="http://dev.yuanworks.com/2010/02/28/more-on-the-2d3d-project/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<div>
<p>Trying to make 3D look unmistakably  2D brought some problems on 3D graphics software. Since properties such  as the ones I’m looking for are seldom (if at all) used, even if they  are very basic, it was rather tricky.</p>
<p>First of all, it was a pain removing  all the light on the characters and the scene. Rendering software uses  so ugly default lights which were hard to remove. Since the first part  won’t be shaded whatsoever, this was necessary to make 3D indistinguishable  from a sprite based game.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.wind-water.net/images/blog/20100228_pic1.jpg" alt="" width="610" height="497" /></p>
<p>Also rather quirky to set up was a  completely orthographic camera (pseudo perspective used in blueprints  and the like, which has no depth). I had to highjack one of the available  ones that are supposed to be for scene control only. Needless to say,  this is the closest to true 2D. Now I’m only missing a pixel perfect  way to render things, and I will TRULY have 2D in a 3D environment.</p>
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='642' height='392' src='http://www.youtube.com/embed/QJfcNfgwFy8?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></div>
<p>What I’m particularly proud of are  the lightning-fast rendering times. Usually, one single frame can take  anywhere between 5 to 20 minutes, or even more, depending on the software  settings and the complexity the computer has to calculate. At 1024 resolution,  production quality (read that as ultra souped-up), any one frame from  my scene renders in 2 to 3 SECONDS!!!!! YES, SECONDS. Other lighting  tests like final gather work nice and fast, but I can have a similar  effect with far less resources.</p>
<p><img src="http://www.wind-water.net/images/blog/20100228_pic2.jpg" alt="" width="599" height="400" /></p>
<p><img src="http://www.wind-water.net/images/blog/20100228_pic3.jpg" alt="" width="640" height="480" /></p>
<p>I also started to work on the animation.  The 2D character already has a lot of animation done, including a super  fluid walk cycle at 30fps, which I almost NEVER use, except for action  based animations.  Well, come to think of it, many Wind and Water animations  were 30fps, so I take that back. Look at all those frames for just a  walk cycle! The 3D character has to be “rigged” which basically  means equipped with a virtual skeleton that allows it to move. It sounds  like a pain, and yes, it actually is.</p>
<p><img src="http://www.wind-water.net/images/blog/20100228_pic4.jpg" alt="" width="424" height="195" /></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/YuanWorks?a=Z3fXTGeITlY:IdRn2r2m5nw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/YuanWorks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=Z3fXTGeITlY:IdRn2r2m5nw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=Z3fXTGeITlY:IdRn2r2m5nw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=Z3fXTGeITlY:IdRn2r2m5nw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=Z3fXTGeITlY:IdRn2r2m5nw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=Z3fXTGeITlY:IdRn2r2m5nw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=Z3fXTGeITlY:IdRn2r2m5nw:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/YuanWorks/~4/Z3fXTGeITlY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2010/02/28/more-on-the-2d3d-project/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://dev.yuanworks.com/2010/02/28/more-on-the-2d3d-project/</feedburner:origLink></item>
		<item>
		<title>The 2D Triumphant Video</title>
		<link>http://feedproxy.google.com/~r/YuanWorks/~3/A7HGdQmkLfY/</link>
		<comments>http://dev.yuanworks.com/2010/01/31/the-2d-triumphant-video/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 05:06:29 +0000</pubDate>
		<dc:creator>Yuan-Hsi</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Sprite]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=131</guid>
		<description><![CDATA[I’m working on a 2D/3D project exploring the features of both worlds, and I’ll make a RRSF (really, really short film) with gamey music and visuals!! There are only two characters, one &#8230; <a class="readmore" href="http://dev.yuanworks.com/2010/01/31/the-2d-triumphant-video/">Continue Reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>I’m working on a 2D/3D project exploring the features of both worlds, and I’ll make a RRSF (really, really short film) with gamey music and visuals!!</p>
<p>There are only two characters, one is 2D pixel art (of course), and the other one is in THREE (yes, three) dimensions!</p>
<p>The character design for the pixel character (code name “Square”) is my traditional work, so nothing too deviated from the norm:</p>
<p style="text-align: center;"><span style="font-family: Calibri; font-size: small;"><img class="aligncenter" src="http://www.wind-water.net/images/blog/20100131_video1.jpg" alt="" width="480" height="240" /></span></p>
<p>However, for the second, less traditional character, I used a more traditional approach, sketching various poses and trying different designs (a step now unnecessary to me for pixel art).</p>
<p><img class="aligncenter" src="http://www.wind-water.net/images/blog/20100131_video2.jpg" alt="" width="640" height="511" /></p>
<p>Also, I had fun using color pencils and watercolor, media I seldom have a chance to use now =3</p>
<p><img class="aligncenter" src="http://www.wind-water.net/images/blog/20100131_video3.jpg" alt="" width="447" height="346" /></p>
<p>Then came the fun part… translating  the character to 3D… It was kinda hard to keep all the weird “anime”  angles visible on the model, which will be kinda low poly for that nostalgic  PS1 look we all love…</p>
<p><img class="aligncenter" src="http://www.wind-water.net/images/blog/20100131_video4.jpg" alt="" width="640" height="336" /></p>
<p>Lastly here’s a turn table on the  preliminary model for the 3D character, code name Polly. Polygon, Polly.  Get it? Yeah, I’ll shut it now:</p>
<p style="text-align: center;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='642' height='392' src='http://www.youtube.com/embed/CjPZY2qRaiY?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/YuanWorks?a=A7HGdQmkLfY:5YKhPV2h1Vo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/YuanWorks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=A7HGdQmkLfY:5YKhPV2h1Vo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=A7HGdQmkLfY:5YKhPV2h1Vo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=A7HGdQmkLfY:5YKhPV2h1Vo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=A7HGdQmkLfY:5YKhPV2h1Vo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/YuanWorks?a=A7HGdQmkLfY:5YKhPV2h1Vo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/YuanWorks?i=A7HGdQmkLfY:5YKhPV2h1Vo:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/YuanWorks/~4/A7HGdQmkLfY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2010/01/31/the-2d-triumphant-video/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://dev.yuanworks.com/2010/01/31/the-2d-triumphant-video/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.068 seconds. --><!-- Cached page generated by WP-Super-Cache on 2013-05-16 12:47:39 -->
