<?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>Super Snow Fight &#187; Unity</title>
	<atom:link href="http://supersnowfight.com/blog/tag/unity/feed/" rel="self" type="application/rss+xml" />
	<link>http://supersnowfight.com/blog</link>
	<description>Development of a video game.</description>
	<lastBuildDate>Tue, 24 Nov 2015 11:27:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1</generator>
	<item>
		<title>Super Snow Fight in Winter Wonderland</title>
		<link>http://supersnowfight.com/blog/super-snow-fight-in-winter-wonderland/</link>
		<comments>http://supersnowfight.com/blog/super-snow-fight-in-winter-wonderland/#comments</comments>
		<pubDate>Mon, 26 Jan 2015 12:05:02 +0000</pubDate>
		<dc:creator><![CDATA[Patrick]]></dc:creator>
				<category><![CDATA[Super Snow Fight Development]]></category>
		<category><![CDATA[Assets]]></category>
		<category><![CDATA[Super Snow Fight]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://supersnowfight.azurewebsites.net/?p=341</guid>
		<description><![CDATA[Some people are really good at everything. They can code, they can design, make textures, models, sounds and music, just everything you need for a game. Well, not me. I think I can write some code. Maybe I am also able to put some images together in Gimp and change the color. But that&#8217;s it. &#8230; <a href="http://supersnowfight.com/blog/super-snow-fight-in-winter-wonderland/" class="more-link">Continue reading <span class="screen-reader-text">Super Snow Fight in Winter Wonderland</span></a>]]></description>
				<content:encoded><![CDATA[<p>Some people are really good at everything. They can code, they can design, make textures, models, sounds and music, just everything you need for a game. Well, not me. I think I can write some code. Maybe I am also able to put some images together in Gimp and change the color. But that&#8217;s it. So what do you do, when you have an idea for a game, but you don&#8217;t have the people to make the game pretty? You browse the Unity AssetStore like you browse Steam or Amazon for your next games! It&#8217;s amazing what people sell in the AssetStore. In particular because the assets are not too expensive for and indie game developer and they will give your development process a real push. Just imagine how long it would take to make all the models and sprites by yourself or how much money you would need to pay designers for this stuff. Of course, sometimes you need custom assets you won&#8217;t find in the stores. But even in this case there are uploaders who will make assets for you on request for a little fee. If you need assets for your prototype or you see a style that just fits into your game, I recommend the Unity AssetStore or any asset store you can find on the web. It will make you happy. <img src="http://supersnowfight.com/blog/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /></p>
<p>Thanks a lot to  the <a href="http://blitz3dfr.com/hedgehog/" target="_blank" title="Hedgehog Team">Hedgehog Team</a> who made the <a title="Toon Level Kit" href="https://www.assetstore.unity3d.com/en/#!/content/4679" target="_blank">Toon Level Kit</a> possible. Super Snow Fight looks amazing thanks to your assets! <img src="http://supersnowfight.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<p><center><br />
<iframe width="560" height="315" src="https://www.youtube.com/embed/dLi8B3GR2AI?list=PLF1jhYUTnHo6Yr-YybxmRfn_W_XgWDlHi" frameborder="0" allowfullscreen></iframe><br />
</center></p>
]]></content:encoded>
			<wfw:commentRss>http://supersnowfight.com/blog/super-snow-fight-in-winter-wonderland/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rise and shine, little Toon Characters!</title>
		<link>http://supersnowfight.com/blog/rise-and-shine-little-toon-characters/</link>
		<comments>http://supersnowfight.com/blog/rise-and-shine-little-toon-characters/#comments</comments>
		<pubDate>Mon, 26 Jan 2015 11:56:09 +0000</pubDate>
		<dc:creator><![CDATA[Patrick]]></dc:creator>
				<category><![CDATA[Super Snow Fight Development]]></category>
		<category><![CDATA[Assets]]></category>
		<category><![CDATA[Super Snow Fight]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://supersnowfight.azurewebsites.net/?p=291</guid>
		<description><![CDATA[I bought some assets from the Unity Asset Store! These little guys to be more clear: Toon Character Pack I love them! Thanks to Unluck Software for making these! Apart from that I added some standard assets from Unity to the scene. Check out the two youtube clips.]]></description>
				<content:encoded><![CDATA[<p>I bought some assets from the Unity Asset Store!<br />
These little guys to be more clear: <a href="https://www.assetstore.unity3d.com/en/#!/content/6698" title="Toon Character Pack" target="_blank">Toon Character Pack</a></p>
<p>I love them! Thanks to <a href="http://www.chemicalbliss.com/" title="Unluck Software" target="_blank">Unluck Software</a> for making these!</p>
<p>Apart from that I added some standard assets from Unity to the scene.<br />
Check out the two youtube clips.<br />
<center><br />
<iframe width="560" height="315" src="//www.youtube.com/embed/-9pDqrGF4iA?list=PLF1jhYUTnHo6Yr-YybxmRfn_W_XgWDlHi" frameborder="0" allowfullscreen style="border: 1px solid #2e3641;"></iframe></p>
<p><iframe width="560" height="315" src="//www.youtube.com/embed/Dmuze1kyido?list=PLF1jhYUTnHo6Yr-YybxmRfn_W_XgWDlHi" frameborder="0" allowfullscreen style="border: 1px solid #2e3641;"></iframe><br />
</center></p>
]]></content:encoded>
			<wfw:commentRss>http://supersnowfight.com/blog/rise-and-shine-little-toon-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enemy spotted!</title>
		<link>http://supersnowfight.com/blog/enemy-spotted/</link>
		<comments>http://supersnowfight.com/blog/enemy-spotted/#comments</comments>
		<pubDate>Mon, 26 Jan 2015 10:06:40 +0000</pubDate>
		<dc:creator><![CDATA[Patrick]]></dc:creator>
				<category><![CDATA[Super Snow Fight Development]]></category>
		<category><![CDATA[Super Snow Fight]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://supersnowfight.azurewebsites.net/?p=241</guid>
		<description><![CDATA[Moving the character and throwing some snowballs works so far. But since Super Snow Fight is about snowball fights, we need someone we can fight with. Throwing snowballs in your own face is not that much fun in the long run, I guess. That&#8217;s why you can see two cubes with cylinders now in the &#8230; <a href="http://supersnowfight.com/blog/enemy-spotted/" class="more-link">Continue reading <span class="screen-reader-text">Enemy spotted!</span></a>]]></description>
				<content:encoded><![CDATA[<p>Moving the character and throwing some snowballs works so far. But since Super Snow Fight is about snowball <strong>fights</strong>, we need someone we can fight with. Throwing snowballs in your own face is not that much fun in the long run, I guess.</p>
<p><center><br />
<iframe width="560" height="315" src="https://www.youtube.com/embed/dcGONGjL1Lw?list=PLF1jhYUTnHo6Yr-YybxmRfn_W_XgWDlHi" frameborder="0" allowfullscreen></iframe><br />
</center></p>
<p>That&#8217;s why you can see two cubes with cylinders now in the YouTube clip. The green one is the player character, the red one is the greatly feared enemy. It won&#8217;t be a real fight if your enemy ist just standing there doing nothing. So we need a little artificial intelligence. The AI to this date is quite simple. My goal was to keep the enemy moving and throwing snowballs at you, but not in a predictable pattern. This means we need some random juice.</p>
<p></p><pre class="crayon-plain-tag">private void ChangeMoveDirection()
    {
        rndH = Random.Range(-1.0F, 1.0F);
        rndV = Random.Range(-1.0F, 1.0F);
    }</pre><p> </p>
<p>With this method the enemy character will move in any random direction. What&#8217;s left is the time the character should change its direction. Counting the time in the Update()-method and calling ChangeMoveDirection() if a certain time is reached will do the deal.</p>
<p>Now what about throwing snowballs? In Super Snow Fight you are able to charge your shot or throw. Holding the left mouse button will increase the power behind your snowball, which then will make more damage. Well, your opponents do not really hold the mouse button. Instead I gave them a random power and a random time they wait until they throw their snowballs. In some situations it&#8217;s not really fair, e.g. if an opponent spawns right next to you and shoots you down with full power. But in my opinion the game is still easy enough to be fun and getting bashed all of a sudden may create some laughter.</p>
<p>Last but not least, enemies focus on the closest player. You can try this out when you play the game and walk up to a guy fighting against another AI character. If your distance is the smallest, he will turn around and tries to beat you up!</p>
<p></p><pre class="crayon-plain-tag">private GameObject GetClosestPlayer()
    {
        Vector3 myPos = transform.position;
        GameObject closestCharacter = null;
        float closestDistance = float.MaxValue;

        foreach (GameObject go in GameManager.Instance.characterGameObjects)
        {
            Vector3 pos = go.transform.position;
            float distance = Vector3.Distance(myPos, pos);
            if (distance < closestDistance && distance > 0 && go.GetComponent<BaseCharacter>().IsDead == false)
            {
                closestDistance = distance;
                closestCharacter = go;
            }
        }
        
        return closestCharacter;
    }

private void LookAtPlayer(GameObject player)
    {
        Vector3 targetPoint = player.transform.position;
        Quaternion targetRotation = Quaternion.LookRotation(targetPoint - transform.position);
        transform.rotation = targetRotation;
    }

public override void FixedUpdate()
    {
        LookAtPlayer(GetClosestPlayer());
    }</pre><p> </p>
<p>And that&#8217;s the code. GetClosestPlayer() determines &#8211; you guessed it &#8211; the closest character. LookAtPlayer() then uses this character to rotate the model. Calling LookAtPlayer() in FixedUpdate() will keep your opponent up-to-date.</p>
]]></content:encoded>
			<wfw:commentRss>http://supersnowfight.com/blog/enemy-spotted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In the beginning there were blocks, cylinders and spheres</title>
		<link>http://supersnowfight.com/blog/in-the-beginning-there-were-blocks-cylinders-and-spheres/</link>
		<comments>http://supersnowfight.com/blog/in-the-beginning-there-were-blocks-cylinders-and-spheres/#comments</comments>
		<pubDate>Sat, 24 Jan 2015 16:27:17 +0000</pubDate>
		<dc:creator><![CDATA[Patrick]]></dc:creator>
				<category><![CDATA[Super Snow Fight Development]]></category>
		<category><![CDATA[Super Snow Fight]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://supersnowfight.azurewebsites.net/?p=161</guid>
		<description><![CDATA[When you come up with an idea for a game, you almost certainly want to play it right now. But, of course, you have to make it first. What a shame. Well, no, it&#8217;s not a shame, it is great! Because that&#8217;s the part that is so much fun of making games, right? Right! Nontheless, &#8230; <a href="http://supersnowfight.com/blog/in-the-beginning-there-were-blocks-cylinders-and-spheres/" class="more-link">Continue reading <span class="screen-reader-text">In the beginning there were blocks, cylinders and spheres</span></a>]]></description>
				<content:encoded><![CDATA[<p>When you come up with an idea for a game, you almost certainly want to play it right now. But, of course, you have to make it first. What a shame. Well, no, it&#8217;s not a shame, it is great! Because that&#8217;s the part that is so much fun of making games, right? Right! Nontheless, you want to play your game fast. But without any models, sounds, sprites or any asset at all you might build your prototype with so called primitives. These things are simple three dimensional objects like cubes and spheres. They can have textures attached, but don&#8217;t have to. Instead of using primitives, you could hire a designer to make models and stuff for you, of course, but without any gameplay, you won&#8217;t know if your idea is even fun. So, if you don&#8217;t want to spend your well earned money for a boring game, try the primitives.</p>
<p>Super Snow Fight is all about snowball fights. This is the main idea about this game. So I wanted to build an application with Unity3D where you can move an object which can throw an object. That&#8217;s it. The first thing I realized was that I have to know where the front of my object is. So my snowball-throwing-object consists of a scaled cube with a cylinder as nose (the front) and a simple sphere for the snowball. And, of course, I need a plane for the terrain.</p>
<p>The code I wrote made it possible to move my object &#8211; which is the player character &#8211; and throw a snowball. Hope you get the idea in this little YouTube clip.</p>
<p><iframe width="560" height="315" src="https://www.youtube.com/embed/FfvOO6sh40E?list=PLF1jhYUTnHo6Yr-YybxmRfn_W_XgWDlHi" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://supersnowfight.com/blog/in-the-beginning-there-were-blocks-cylinders-and-spheres/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
