<?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>Yuan Works Development Blog &#187; Game Design</title>
	<atom:link href="http://dev.yuanworks.com/category/game-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.yuanworks.com</link>
	<description>Video game development, tutorials, design, and news</description>
	<lastBuildDate>Mon, 01 Mar 2010 05:55:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>More on the 2D/3D Project</title>
		<link>http://dev.yuanworks.com/2010/02/28/more-on-the-2d3d-project/</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  are very basic, it was rather tricky.
First of all, it was a pain removing  all the light on the [...]]]></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><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/QJfcNfgwFy8&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/QJfcNfgwFy8&#038;fs=1" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></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>
]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2010/02/28/more-on-the-2d3d-project/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>The 2D Triumphant Video</title>
		<link>http://dev.yuanworks.com/2010/01/31/the-2d-triumphant-video/</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 is 2D pixel art (of course), and the other one is in THREE (yes, three) dimensions!
The character design for the pixel character (code name [...]]]></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;"><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/CjPZY2qRaiY&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/CjPZY2qRaiY&#038;fs=1" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2010/01/31/the-2d-triumphant-video/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Little Ninja Platform Engine: Running and sliding</title>
		<link>http://dev.yuanworks.com/2009/01/06/little-ninja-platform-engine-running-and-sliding/</link>
		<comments>http://dev.yuanworks.com/2009/01/06/little-ninja-platform-engine-running-and-sliding/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 02:42:49 +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=60</guid>
		<description><![CDATA[Hellollo! Happy New Year everyone!
If you remember in our previous posts, I first defined the different actions states that the Ninja would have. First Little Ninja , and later he . So, what&#8217;s left?
Running
Running is crucial in most fast-pased action games, and fairly easy to program. Basically, when the users taps the same direction twice [...]]]></description>
			<content:encoded><![CDATA[<p>Hellollo! Happy New Year everyone!</p>
<p>If you remember in our previous posts, I first defined the different actions states that the Ninja would have. First Little Ninja <a href="http://dev.yuanworks.com/2008/11/30/into-the-platform-game-engine/">walked and jumped</a>, and later he <a href="http://dev.yuanworks.com/2008/12/11/into-the-platform-game-engine-part-2/">double-jumped, hanged on walls, and walked on cliffs</a>. So, what&#8217;s left?</p>
<h2>Running</h2>
<p>Running is crucial in most fast-pased action games, and fairly easy to program. Basically, when the users taps the same direction twice and holds the button, the character will go from <strong>WALK -&gt; RUN</strong>, which is essentially the same as walking except it&#8217;s a different animation, and the <em>moves faster</em> (x * 2, or twice is fast in our case):</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.wind-water.net/images/blog/littleninja/20090106_run.gif" alt="Little Ninja running" width="320" height="240" /></p>
<p>If you watch carefully, jumping while running allows the Ninja to jump farther (again, twice as far as opposed to the normal jump), and if you hold the same direction he will keep on running after jumping. Another detail is that, if the Ninja runs for a little while and stops, instead of going from <strong>RUN -&gt; WALK</strong>, his transition will be<strong> RUN -&gt; BREAK -&gt; WALK</strong>. Did you notice it? This small details polish the platform engine and will allow the Ninja to move swifter and smoother. He&#8217;s a stealth Ninja after all!</p>
<h2>Ducking and sliding</h2>
<p>Before thinking about sliding (dashing), for the last 30 years, most 2D platform games slide by holding the <strong>JUMP </strong>key while you&#8217;re holding <strong>DOWN</strong> — or ducking. Ducking was one of the states that I should have programmed firsthand, but since it had no particular use until now, I decided not to do it. You reap what you sow they say!</p>
<p>Anyway, life lesson aside, ducking is fairly simple: the character will start the <strong>DUCK </strong>animation and reach the <strong>DUCK </strong>state while you&#8217;re holding the <strong>DOWN </strong>key, but if you release it will start to un-<strong>DUCK </strong><em>(aka: stand up) </em>and reach the <strong>IDLE</strong> animation.</p>
<p>Anyway, while Ninja·kun is ducking, pressing the <strong>JUMP</strong> key will allow him to <strong>SLIDE,</strong> useful for sneaking in small places, squishing wild frogs, etc. Take a look:</p>
<p><img class="aligncenter" src="http://www.wind-water.net/images/blog/littleninja/20090106_dash.gif" alt="" width="320" height="240" /></p>
<p>As you can see, Yuan decided that a simple Megaman 3 sliding &#8220;animation&#8221; was not enough, and decided to create a very funny animation that I thought would never work. Worked like a charm to my surprise. Anyway, eventually the Ninja will be able to slide while running and do some other fancy moves, but for now, enjoy the new video with all the new Ninja features:</p>
<p><object type="application/x-shockwave-flash" width="320" height="258">
<param name="movie" value="http://www.wind-water.net/images/blog/littleninja/20090106_run_slide.swf" />
<embed type="application/x-shockwave-flash" width="320" height="258" src="http://www.wind-water.net/images/blog/littleninja/20090106_run_slide.swf" >
</object>
</p>
<p>That&#8217;s it for today, hope you enjoy it and don&#8217;t forget to <a href="http://feeds.feedburner.com/YuanWorks">subscribe</a> to our content and follow our progress closely!</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2009/01/06/little-ninja-platform-engine-running-and-sliding/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Into the Platform Game Engine (Part 2)</title>
		<link>http://dev.yuanworks.com/2008/12/11/into-the-platform-game-engine-part-2/</link>
		<comments>http://dev.yuanworks.com/2008/12/11/into-the-platform-game-engine-part-2/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 06:42:47 +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=47</guid>
		<description><![CDATA[Hi everyone!
Last time we saw , and I promised to make him walk in slopes and hang in walls (after all, we&#8217;re talking about Little Ninja™ here). Well then it&#8217;s time to learn about Little Ninja&#8217;s new moves!
Walking on slopes (terrain angles)
The first thing I&#8217;ll solve today is having the Ninja walk on different . [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone!</p>
<p>Last time we saw <a href="http://dev.yuanworks.com/2008/11/30/into-the-platform-game-engine/">Little Ninja running and jumping</a>, and I promised to make him walk in slopes and hang in walls (after all, we&#8217;re talking about <em>Little Ninja™</em> here). Well then it&#8217;s time to learn about Little Ninja&#8217;s new moves!</p>
<h2>Walking on slopes (terrain angles)</h2>
<p>The first thing I&#8217;ll solve today is having the Ninja walk on different <a href="http://dev.yuanworks.com/2008/11/19/time-to-build-the-map-editor/">terrain angles</a>. As of now, there are three terrain types if you remember, but Mr. Ninja can only walk on two of them as for now:</p>
<p><img class="aligncenter" title="Platform game different terrain angles" src="http://www.wind-water.net/images/blog/littleninja/20081210_terrain_angles.jpg" alt="" width="468" height="148" /></p>
<p>When the Ninja walks on flat terrain, his <em>X position</em> changes (left and right). Well, what happens when he walks on slopes? His <em>Y position</em> changes, too (up and down)! In the 45° slope, for every X+1 pixel he moves Y+1 pixels, while on the ~26° slope, for every X+1 pixel, he moves Y+½, (but remember that pixels can&#8217;t be divided).</p>
<p>An important aspect is knowing when his Y position changes. For this, we have to use the sprite&#8217;s <strong>CENTER </strong>position. Whenever the Ninja jumps on a slope his Y position must be calculated too based on his X.</p>
<p><img class="aligncenter" title="Sprite center position" src="http://www.wind-water.net/images/blog/littleninja/20081210_sprite_center.jpg" alt="" width="192" height="158" /></p>
<h2>New Ninja States: Wall Hang and Double Jump (somersault flip)</h2>
<p>A Ninja that can&#8217;t hang on walls or randomly somersault in the air defying all physics laws is definitely not a skilled one!</p>
<p><img class="aligncenter" title="Little Ninja hanging on walls" src="http://www.wind-water.net/images/blog/littleninja/20081210_ninja_hang.jpg" alt="" width="422" height="178" /></p>
<p>Anyway, wall hanging was pretty simple to do: Basically, when the Ninja hits a wall and you hold the direction on the d-pad (right in that case), he&#8217;ll hang on the wall and slide.</p>
<p>As for the double-jump, after performing a normal jump, jumping again while hanging in mid-air makes Little Ninja perform what is normally called a &#8220;double jump&#8221;, allowing him to move a little higher and a little further too!</p>
<p><img class="aligncenter" title="Little Ninja double jump" src="http://www.wind-water.net/images/blog/littleninja/20081210_double_jump.jpg" alt="" width="254" height="272" /></p>
<p>Well, besides these two new states and slopes, I also added background scrolling, which I&#8217;ll try to explain more detailed later on. And as always, here&#8217;s a video (well GIF actually) of Little Ninja in action!</p>
<p><img class="aligncenter" title="Little Ninja platform wall hang and double jump" src="http://www.wind-water.net/images/blog/littleninja/20081210_doublejump_wallhang.gif" alt="" width="320" height="240" /></p>
<p>It&#8217;s starting to feel very versatile with the new moves and I&#8217;m sure that as soon as he runs and slides things are going to get even more exciting. Stay tuned for more Ninja action!</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2008/12/11/into-the-platform-game-engine-part-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Into the Platform Game Engine</title>
		<link>http://dev.yuanworks.com/2008/11/30/into-the-platform-game-engine/</link>
		<comments>http://dev.yuanworks.com/2008/11/30/into-the-platform-game-engine/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 02:09: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=37</guid>
		<description><![CDATA[Hi everyone,
Today&#8217;s post talks will be about how to design the most basic parts of a platform game engine. On our last post, I finished a simple Map Editor, now it&#8217;s time to put Ninja Stick Figure into action!
Defining the Ninja Action States
Most of you are probably thinking about defining the most basic and generic [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone,</p>
<p>Today&#8217;s post talks will be about how to design the most basic parts of a platform game engine. On our last post, I finished a simple <a title="Building a Map Editor" href="http://dev.yuanworks.com/2008/11/19/time-to-build-the-map-editor/">Map Editor</a>, now it&#8217;s time to put Ninja Stick Figure into action!</p>
<h2>Defining the Ninja Action States</h2>
<p>Most of you are probably thinking about defining the most basic and generic objects (EG: the main character, enemies, bullets, items, etc.), but since this game is <em>supposed </em>to be simple, we&#8217;ll jump right into the main character, Ryuuhi, since I&#8217;m more interested in developing the platform engine. For a more complex and bigger project, this definitely wouldn&#8217;t be the best approach.</p>
<p>Anyway, the first thing I have to think about are the different states that our Ninja has:</p>
<p><img class="aligncenter" title="Ninja Action States" src="http://www.wind-water.net/images/blog/littleninja/20081130_ninja_states.jpg" alt="" width="291" height="49" /></p>
<p>Every state is self-explanatory so there&#8217;s not much to explain. Defining how states work is easy, <strong>IDLE</strong> happens when you don&#8217;t press any button, <strong>WALK </strong>when you press Left/Right, <strong>JUMP</strong> when you press the &#8220;Jump&#8221; button, and so on. For now, I won&#8217;t be using the <strong>ATTACK </strong>state since I&#8217;m only interested in how Little Ninja interacts with the terrain, not with other objects. Anyway, it&#8217;s important to associate an animation with each state, as well as a transition between states: for example, the character may go from <strong>IDLE </strong>to <strong>WALK</strong>, but can&#8217;t go directly from <strong>JUMP </strong>to <strong>WALK</strong>. Anyway, this can be done with a simple Enum:</p>
<blockquote>
<pre>enum NinjaAction
{
    NJA_Idle = 0,
    NJA_Walk = 1,
    NJA_Turn = 2,
    NJA_JumpStart = 3,
    NJA_JumpHang = 4,
    NJA_JumpEnd = 5,
}</pre>
</blockquote>
<p>Enums are very simple but work well on cases like this. This way, if I need to define another state or need to change its number for any reason, the rest of the code stays clean. For example, the <strong>IDLE </strong>animation would be <strong>ninjaAnimation[NJA_Idle]</strong>, which is easier to understand compared to <strong>ninjaAnimation[0]</strong>. As for  Jumping, three different states were defined: the part where Ryuuhi ascends (Start), the part where Ryuuhi doesn&#8217;t move and descends (Hang), and the part where he falls (End). In good theory, all states should have a generic outcome when you enter and exit a state, but as I said before, I&#8217;m more focused on game mechanics right now.</p>
<p>Note that Ryuuhi is facing to his <strong>LEFT</strong> on all the images. This means that, besides states, it is important to define the state&#8217;s direction too.</p>
<p><span id="more-37"></span></p>
<h2>Action #1: Walking</h2>
<p>Walking is fairly easy on flat terrains, since it only changes the sprite&#8217;s X coordinate while you hold Left or Right. Just as a note, when you press the opposite direction, the Ninja goes from <strong>Walking -&gt; Turn -&gt; Walking</strong> (opposite direction). It&#8217;s important now to define how he collides against walls, so we need to understand what a collision box is:</p>
<p><img class="aligncenter" title="Sprite frame and collision box" src="http://www.wind-water.net/images/blog/littleninja/20081130_sprite_frame.jpg" alt="" width="336" height="140" /></p>
<p>The <span style="color: #008000;"><strong>Sprite Frame</strong></span> is the actual image that I am drawing on screen, while the<strong> <span style="color: #0000ff;">Collision Box</span></strong> defines how the ninja interacts with the terrain. In this case, it&#8217;s important to understand how the two different boxes differ. It would look really bad if I used the sprite frame as a collision box since Little Ninja would &#8220;bump&#8221; against walls from a faraway distance, which is not what we want:</p>
<p style="text-align: center;"><img class="aligncenter" title="Sprite collision detection against walls" src="http://www.wind-water.net/images/blog/littleninja/20081130_sprite_collision.jpg" alt="" width="286" height="110" /></p>
<p>Now that&#8217;s more like it, right? Basically what we need to do is find out what tile is next to the Ninja, depending on the direction he&#8217;s facing. If said tile is a Solid wall, then it means that he cannot walk. If not, then he can walk through (if you want me to explain a little further let me know).</p>
<p>Anytime you press the Left or Right directions, he changes his state from <strong>IDLE </strong>to <strong>TURN/WALK.</strong> We then ask if he is able to walk in said direction, and if so, his X-coordinate changes.</p>
<h2>Action #2: Jumping</h2>
<p>Jumping is a trickier than walking, since jumping (in reality) is not a linear function because of physics (read: gravity). The jump starts fast, and slow downs towards it peak until is starts to fall:</p>
<p><img class="aligncenter" title="Sprite jump physics" src="http://www.wind-water.net/images/blog/littleninja/20081130_sprite_jump.jpg" alt="" width="182" height="264" /></p>
<p>Applying a real physics formula is possible, but most platform games just use a small number of linear formulas (and so does Little Ninja) since the result is more predictable and it actually looks better. Games usually have an extended hang-time, the &#8220;floating&#8221; feeling and, as you can guess, this the case of Little Ninja too.</p>
<p>Anyway, I recorded a GIF of the actual game running:</p>
<p><img class="aligncenter" title="Little Ninja platform jump and run" src="http://www.wind-water.net/images/blog/littleninja/20081130_run_jump.gif" alt="" width="320" height="240" /></p>
<p>(For those using Internet Explorer, the GIF probably runs a little slow, please use Firefox if possible!)</p>
<p>Anyway, the animation above pretty much wraps up everything I explained and more: I didn&#8217;t get to explain collisions against the floor and falling.</p>
<p>Little Ninja is finally moving and that&#8217;s it for today, next time we&#8217;ll probably see him hanging on the wall and walking on slopes. Hope you enjoy the article!</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2008/11/30/into-the-platform-game-engine/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Pretty settings and animation: let’s go!</title>
		<link>http://dev.yuanworks.com/2008/11/25/pretty-settings-and-animation-let%e2%80%99s-go/</link>
		<comments>http://dev.yuanworks.com/2008/11/25/pretty-settings-and-animation-let%e2%80%99s-go/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 16:29:25 +0000</pubDate>
		<dc:creator>Yuan-Hsi</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Little Ninja]]></category>
		<category><![CDATA[Sprite]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=32</guid>
		<description><![CDATA[Okay, this time I have drawn some more natural looking terrain to make the game easy on the eyes. This is how Little Ninja will (hopefully) look like in action!

The game will sport a very japonesque look, featuring a lot of rocks, rivers, waterfalls, exotic trees, and cerulean skies. (Which pretty much renders our “keep [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, this time I have drawn some more natural looking terrain to make the game easy on the eyes. This is how <a href="http://dev.yuanworks.com/2008/11/12/starting-a-new-project-codename-little-ninja/">Little Ninja</a> will (hopefully) look like in action!</p>
<p style="text-align: center;"><img class="alignnone" title="Little Ninja sprite art in action!" src="http://www.wind-water.net/images/blog/littleninja/20081125_screenshot_tv.jpg" alt="" width="260" height="148" /></p>
<p style="text-align: left;">The game will sport a very japonesque look, featuring a lot of rocks, rivers, waterfalls, exotic trees, and cerulean skies. (Which pretty much renders our “keep it simple” useless…)</p>
<p>As for Ryuuhi, I still haven’t fully decided on the final look he will have, but he now has several animations, all running at full 30 fps. I swore I would never animate anything at that rate again after Wind and Water. But oh, well.</p>
<p style="text-align: center;"><img class="aligncenter" title="Ryuuhi Little Ninja sprite frames" src="http://www.wind-water.net/images/blog/littleninja/20081125_ryuuhi_frames.jpg" alt="" width="400" height="80" /></p>
<p style="text-align: center;">
<p>I also made this new tileset so that the engine Hao is making will look prettier, but he hasn’t even used my old new tileset!! Anyway, here it is.</p>
<p style="text-align: center;"><img class="aligncenter" title="Platform Tileset" src="http://www.wind-water.net/images/blog/littleninja/20081125_new_tileset.jpg" alt="" width="240" height="140" /></p>
<p style="text-align: center;">
<p style="text-align: left;">Well, that’s it for today. Tomorrow I’ll keep experimenting with the animation. This project is advancing much faster that I expected, and I had a lot of fun playing with Hao’s preliminary engine!!</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2008/11/25/pretty-settings-and-animation-let%e2%80%99s-go/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Time to build the Map Editor!</title>
		<link>http://dev.yuanworks.com/2008/11/19/time-to-build-the-map-editor/</link>
		<comments>http://dev.yuanworks.com/2008/11/19/time-to-build-the-map-editor/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 19:40:10 +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=16</guid>
		<description><![CDATA[Hi again!
If you remember last time, we were in the process of  defining what was important for Little Ninja&#8217;s new Map Editor. If you haven&#8217;t read the last article, it&#8217;s a good idea to take a look at it since I&#8217;ll be taking off right where I left it  
Map Terrain Design (Part 2)
Last [...]]]></description>
			<content:encoded><![CDATA[<p>Hi again!</p>
<p>If you remember last time, we were in the process of  defining <a href="http://dev.yuanworks.com/2008/11/12/starting-a-new-project-codename-little-ninja/">what was important for Little Ninja&#8217;s new Map Editor</a>. If you haven&#8217;t read the <a href="http://dev.yuanworks.com/2008/11/12/starting-a-new-project-codename-little-ninja/">last article</a>, it&#8217;s a good idea to take a look at it since I&#8217;ll be taking off right where I left it <img src='http://dev.yuanworks.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Map Terrain Design (Part 2)</h2>
<p>Last time we were overviewing the different <strong>terrain angles.</strong> After taking a look at my favorite platform-adventure games, I decided to keep three types of angles, remember?</p>
<p style="text-align: center"><img src="http://www.wind-water.net/images/blog/littleninja/20081114_ninja_terrain_angles.jpg" alt="Angles for map editor terrain" width="198" height="110" /></p>
<p>One may think that most platform games have a wider array of possible angles. However, in fact, I came to realize that a great number of games only use the 45° and ~26° inclination — Cave Story or Metroid, for example.</p>
<p>Now that I have chosen the three types of angles, it&#8217;s time to choose the different <strong>terrain directions.</strong> Fortunately, this is a very easy choice as tiles can only be transformed (rotated or flipped) into four different configurations, creating the following set of tiles:</p>
<p style="text-align: center"><img src="http://www.wind-water.net/images/blog/littleninja/20081114_ninja_terrain_dirs.jpg" alt="Map Editor tile transformation" width="326" height="190" /></p>
<p>Now that we have terrain type, angle, direction, we&#8217;re all set to start making our <em>Map Editor™ </em>! Before starting, let&#8217;s do a test-run on our current terrain:</p>
<p style="text-align: center"><img src="http://www.wind-water.net/images/blog/littleninja/20081114_ninja_terrain_test.jpg" alt="Mockup tile map" width="307" height="137" /></p>
<p>As you can see, the combination of tiles allows a quite versatile design, while keeping it &#8220;simple&#8221;. While our Ninja trap does not look too smooth, remember that this is our <strong>mask!</strong> Further addition of foreground tiles will do the trick, believe me (I can&#8217;t wait for Yuan to give me some tiles). Actually, <a href="http://dev.yuanworks.com/2008/11/16/little-ninja-new-sprites-and-tiles/">Yuan has already started drawing the prototype sprite art for Little Ninja</a>.</p>
<p><span id="more-16"></span></p>
<h2>Map Terrain Structure Overview</h2>
<p>So, let&#8217;s review what we have until now: each tile contains information about <strong>direction,</strong> <strong>angle,</strong> and <strong>type</strong> of terrain. From a technical side, I decided to use:</p>
<blockquote><p>2 bits for direction (2 ^ 2 = 4 combinations)<br />
5 bits for angle (2 ^ 5 = 32)<br />
5 bits for terrain type (2 ^ 5 = 32)</p></blockquote>
<p>That gives us a total of 12 bits. In order to fill <strong>2 bytes</strong> (that is, 16 bits), we have 4 bits left: we&#8217;ll use them for special cases. So, what&#8217;s a special case? I don&#8217;t know, and that&#8217;s exactly why I&#8217;m saving those 4bits.</p>
<p>For now, the only important types of terrains are <strong>empty </strong>and <strong>solid </strong>tiles (character collides against them), with all the variation of angles and directions. This is my <em>tile palette </em>for now:</p>
<p style="text-align: center"><img src="http://www.wind-water.net/images/blog/littleninja/20081114_ninja_terrain_tiles.jpg" alt="Map editor tile palette" width="302" height="102" /></p>
<p>Our transparent color is always <strong><span style="color: #ff00ff;">magenta </span></strong>(aka: ugly pink), but from now on I&#8217;m probably not gonna use it because, as the name implies, it <strong>IS </strong>ugly. Anyway, our Map Editor&#8217;s interface is quite simple: a simple editor where you choose the width and height of the map, select a tile from our tile palette, and draw tiles on the actual map! <img src='http://dev.yuanworks.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Anyway, the editor is finished (for now) and here&#8217;s a video:</p>
<p><object type="application/x-shockwave-flash" width="479" height="331">
<param name="movie" value="http://www.wind-water.net/images/blog/littleninja/20081114_map_editor.swf" />
<embed type="application/x-shockwave-flash" width="479" height="331" src="http://www.wind-water.net/images/blog/littleninja/20081114_map_editor.swf" >
</object>
</p>
<p>Oh, I also added a grid as well as a <em>foreground grid</em>. Nothing complex but certainly useful. The Save and Open functions are crucial since we need to load the map on the actual game code. It&#8217;s just a simple file with information about each tile, as well as the width and height of the map. I&#8217;ll be using my test.map for the next part.</p>
<p style="text-align: center;"><img class="aligncenter" title="Test Map &amp;amp; Little Ninja" src="http://www.wind-water.net/images/blog/littleninja/20081114_ninja_test_map.jpg" alt="Little Ninja Test Map" width="320" height="224" /></p>
<p>Anyway, that&#8217;s it for today. Next time I&#8217;ll be loading the actual map on the game, and start adding the most basic player controls (walk and run). The current map editor clearly needs a lot more work, but that will come later <img src='http://dev.yuanworks.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>What do you think about it? Please let me know if the post was too long or simple, etc., or if I should describe the programing-related issues more clearly. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2008/11/19/time-to-build-the-map-editor/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Little Ninja new Sprites and Tiles!</title>
		<link>http://dev.yuanworks.com/2008/11/16/little-ninja-new-sprites-and-tiles/</link>
		<comments>http://dev.yuanworks.com/2008/11/16/little-ninja-new-sprites-and-tiles/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 18:35:23 +0000</pubDate>
		<dc:creator>Yuan-Hsi</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Little Ninja]]></category>
		<category><![CDATA[Sprite]]></category>

		<guid isPermaLink="false">http://dev.yuanworks.com/?p=21</guid>
		<description><![CDATA[Well, after the Dreamcast release of Wind and Water: Puzzle Battles we had a short two week vacation which was mostly spent playing games.
Back on the drawing board, we decided to make a &#8220;small&#8221; game project which we could handle leisurely. So we chose to expand one of our previous projects, namely &#8220;Little Ninja&#8221; or [...]]]></description>
			<content:encoded><![CDATA[<p>Well, after the Dreamcast release of Wind and Water: Puzzle Battles we had a short two week vacation which was mostly spent playing games.</p>
<p>Back on the drawing board, we decided to make a &#8220;small&#8221; game project which we could handle leisurely. So we chose to expand one of our previous projects, namely &#8220;Little Ninja&#8221; or &#8220;Shounin Ryuuhi&#8221;, a Ninja platformer.</p>
<p>First of all, I took the original main character and did an overhaul so that he would still be small (which is the idea), but versatile to animate. This is the result:</p>
<p style="text-align: center;"><img class="aligncenter" title="Little Ninja sprite art evolution" src="http://www.wind-water.net/images/blog/littleninja/20081115_ryuuhi.jpg" alt="" width="396" height="86" /></p>
<p>I haven&#8217;t decided on the final look yet, but this is probably what I will stick to.</p>
<p style="text-align: center;"><img class="aligncenter" title="Ryuuhi final sprite" src="http://www.wind-water.net/images/blog/littleninja/20081115_ryuuhi_finalish.jpg" alt="" width="84" height="68" /></p>
<p>Also, we decided to make a new &#8220;terrain interactive&#8221; engine, and we chose the following angles for tiles:</p>
<p style="text-align: center;"><img class="aligncenter" title="Better looking map terrain tiles" src="http://www.wind-water.net/images/blog/littleninja/20081115_better_looking_tiles.jpg" alt="" width="294" height="78" /></p>
<p>This is because a 45 degree angle is a perfect one-pixel diagonal line, and the other ones are perfect two-pixel diagonal lines. Any other irregular lines will need too much work to look elegant. This is a preliminary tileset to make the map editor a little easier on the eyes.Instead of just &#8220;pasting&#8221; the character on top of any terrain, we will make him really interact with it. So the little Ninja stands and acts differently depending on the inclination of the plane:</p>
<p style="text-align: center;"><img class="aligncenter" title="Little Ninja terrain interaction sprites" src="http://www.wind-water.net/images/blog/littleninja/20081115_terrain_interaction.jpg" alt="" width="222" height="140" /></p>
<p>Finally, I made this &#8220;Stick Ninja&#8221; to test the animation flow and interaction. His name is Chopsticks the Ninja™. Having so much terrain interaction means a LOT of animation on my part. So there goes our &#8220;simple&#8221; game project&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2008/11/16/little-ninja-new-sprites-and-tiles/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Starting a New Project! (codename: Little Ninja)</title>
		<link>http://dev.yuanworks.com/2008/11/12/starting-a-new-project-codename-little-ninja/</link>
		<comments>http://dev.yuanworks.com/2008/11/12/starting-a-new-project-codename-little-ninja/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 21:54:54 +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/2008/11/12/starting-a-new-project-codename-little-ninja/</guid>
		<description><![CDATA[Hi everyone!
As you probably noticed, Wind and Water: Puzzle Battles for Dreamcast was released early this month, so we decided to start a new simple platform-adventure game, codename: Little Ninja!
Since Wind and Water was a very extensive and ambitious project, we want to keep this one simple. We&#8217;re mostly focusing on engine development, programming, scripting, [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone!</p>
<p>As you probably noticed, <a href="http://www.wind-water.net">Wind and Water: Puzzle Battles for Dreamcast</a> was released early this month, so we decided to start a new simple platform-adventure game, <strong>codename: Little Ninja!</strong></p>
<p>Since Wind and Water was a very extensive and ambitious project, we want to keep this one simple. We&#8217;re mostly focusing on engine development, programming, scripting, as well as graphical issues that need to be resolved. Little Ninja may become the stage for our new big platform/adventure project, but for now, we&#8217;ll try to keep it simple, and we <em>really </em>hope this time we don&#8217;t <a href="http://users.wind-water.net/stats_top.php" title="Wind and Water GP2X Top Ranks and Scores">mess</a> it up <img src='http://dev.yuanworks.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  We&#8217;ll be documenting the whole development process, both from my side (programming), as well as the artistical and musical part — Yuan&#8217;s part.</p>
<h2>What is Little Ninja anyway?</h2>
<p>少忍龍飛 (Shounin Ryuuhi — Young Ninja <em>Ryuuhi</em>) is an old Yuan Works project:</p>
<p style="text-align: center"><img src="http://www.wind-water.net/images/blog/littleninja/20081112_ninja_oldscreen.jpg" alt="Yuan Works project codename: Little Ninja" width="320" height="160" /></p>
<p>That&#8217;s an old screenshot taken from the <a href="http://www.yuanworks.com" title="Yuan Works">Yuan Works</a> website. We&#8217;ll be remaking it from scratch, but the basic idea still applies.</p>
<h2>Map Editor and Tile Design</h2>
<p>Before starting to program directly on the game, there are several tools that need to be done beforehand. Fortunately, all animation and image editors used for our past project were dramatically improved while we were working on Wind and Water, however, one of the tools that is not too flexible is W&amp;W&#8217;s map editor:</p>
<p style="text-align: center"><img src="http://www.wind-water.net/images/screenshots/story1.jpg" alt="Wind and Water: Puzzle Battles world map" width="320" height="240" /></p>
<p>Wind and Water does feature a map (usually compared to Super Mario Bros 3), but we need something more complex this time. It&#8217;s time to design a map editor then!</p>
<p><span id="more-15"></span>First of all, most, if not all, maps contain two important parts:</p>
<p><font color="#003366"><strong>Tile graphics </strong></font>contain what you actually see on the screen (the visual part). More like a geographical map. This includes background, foreground, animated tiles, etc.</p>
<p><strong><font color="#003366">Tile information</font></strong> contains how the characters interact with their surroundings: where they walk, items they grab, etc. Like the political divisions.</p>
<p style="text-align: center"><img src="http://www.wind-water.net/images/blog/littleninja/20081112_ninja_mapmask.jpg" alt="Designing a video game map: tile graphics and information" width="356" height="84" /></p>
<p align="center"><em>Tile graphics vs. Tile Information</em></p>
<p>For now, the visual part is not important, after all, that is Yuan&#8217;s work. We&#8217;re here for the Tile information, what I like to call the map&#8217;s <strong>mask</strong> (Note that I am using the term <em>mask </em>in an incorrect way, but that&#8217;s the way I like it. In a metaphorical way, the idea of the mask still applies&#8230; at least for me!)</p>
<p>Anyway, in the above example, the <font color="#ff0000"><strong>red</strong></font> part represents the main character&#8217;s sprite location, the <font color="#008000"><strong>green </strong></font>part represents a collectible item, while the <font color="#ff6600"><strong>orange </strong></font>one represents an interaction (in this case, a sign). On a final version of the map editor, these are important bits of information, however the part that I&#8217;m most interested in right now is the <font color="#0000ff"><strong>blue </strong></font>one — the map&#8217;s <strong>terrain </strong>information.</p>
<h2>Map Terrain Design</h2>
<p>For now, let&#8217;s focus on letting the character walk, jump, fall, and so on, since starting from anywhere else would be pointless (there&#8217;s no use on letting the character slash enemies without knowing where to walk). For Little Ninja, we&#8217;ll be using tiles of 16&#215;16 pixels, so my first constant inside the project is</p>
<blockquote>
<pre>MapTileSize = 16</pre>
</blockquote>
<p>Instead of using the number &#8220;16&#8243;, I&#8217;ll use the constant MapTileSize. This way, if we&#8217;re creating another project or we decide to change our maps to say, 8&#215;8 tiles, we just need to change the constant. Basic stuff, but incredibly useful.</p>
<p>As for the terrain information let&#8217;s have a look a the <strong>terrain types</strong> I thought of so far:</p>
<p style="text-align: center"><img src="http://www.wind-water.net/images/blog/littleninja/20081112_ninja_mapterrain.jpg" alt="Map terrain information" width="198" height="44" /></p>
<p>From left to right: <strong>empty </strong>(character can walk or jump through), <strong>solid</strong>, <strong>platform </strong>(same as solid but the character can walk through), <strong>water</strong>, and <strong>spikes </strong>(instant K.O. — like Megaman). I&#8217;m not 100% sure if spikes should be an actual terrain type or not.</p>
<p>Now that we have terrain types, we need to be able to create hills and slopes, or we will be rewinding videogames back to the Mario 1 era (not sure if it&#8217;s good or bad though):</p>
<p style="text-align: center"><img src="http://www.wind-water.net/images/blog/littleninja/20081112_ninja_mapangles.jpg" alt="Map Editor terrain angles" width="448" height="480" /></p>
<p>Here are some slopes I thought of. From now on these are the <strong>terrain angles</strong>. I&#8217;m guessing it&#8217;s not too important to have that many different angles, so I&#8217;ll only be using 45°, ~26°, and ~63°. I&#8217;ll leave it open just in case I need more.</p>
<p>Anyway, that&#8217;s it for now. On my next post I&#8217;ll begin with the map editor and hopefully take a video of how map editing should be done. Don&#8217;t forget to subscribe to our RSS feed or email, and stay tuned for Yuan&#8217;s post on the art side!</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.yuanworks.com/2008/11/12/starting-a-new-project-codename-little-ninja/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
