<?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>LyCheSis:showCase</title>
	<atom:link href="http://lychesis.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://lychesis.net</link>
	<description>The art of LyCheSis</description>
	<lastBuildDate>Sun, 18 Mar 2012 16:30:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>iTween</title>
		<link>http://lychesis.net/2012/03/itween/</link>
		<comments>http://lychesis.net/2012/03/itween/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 16:27:42 +0000</pubDate>
		<dc:creator>LyCheSis</dc:creator>
				<category><![CDATA[Game development]]></category>
		<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://lychesis.net/?p=270</guid>
		<description><![CDATA[iTween must be one of the single most usefull scripts that are available. There is just one thing that makes working with it slightly obscure, because of the way extended options have to be added via the hash table by using the iTween.Hash() function. iTween.MoveTo(exhibitObject, iTween.Hash( "position", presenterTransform.position, "time", reloadDelay, "islocal", false, "easetype", iTween.EaseType.easeOutQuad ));]]></description>
			<content:encoded><![CDATA[<p>iTween must be one of the single most usefull scripts that are available. There is just one thing that makes working with it slightly obscure, because of the way extended options have to be added via the hash table by using the iTween.Hash() function.</p>
<pre>
iTween.MoveTo(exhibitObject, iTween.Hash(
    "position", presenterTransform.position,
    "time", reloadDelay,
    "islocal", false,
    "easetype", iTween.EaseType.easeOutQuad
));
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lychesis.net/2012/03/itween/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Realtime Cubemap for Reflections</title>
		<link>http://lychesis.net/2012/02/realtime-cubemap-for-reflections/</link>
		<comments>http://lychesis.net/2012/02/realtime-cubemap-for-reflections/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 22:28:56 +0000</pubDate>
		<dc:creator>LyCheSis</dc:creator>
				<category><![CDATA[Game development]]></category>
		<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://lychesis.net/?p=254</guid>
		<description><![CDATA[A nice script for creating a real time cubemap from an object position for use with a reflection shader to create realtime reflections in Unity. Converted from the JavaScript example. Note: This script requires the Unity Pro license. using UnityEngine; using System.Collections; public class RealtimeCubemap : MonoBehaviour {     public int cubemapSize = 128;    [...]]]></description>
			<content:encoded><![CDATA[<p>A nice script for creating a real time cubemap from an object position for use with a reflection shader to create realtime reflections in Unity. Converted from the JavaScript example. Note: This script requires the Unity Pro license.</p>
<pre>using UnityEngine;
using System.Collections;

public class RealtimeCubemap : MonoBehaviour {

    public int cubemapSize = 128;
    public bool oneFacePerFrame = false;
    private Camera cam;
    private RenderTexture rtex;
    private GameObject go;

    [ExecuteInEditMode]
    void Start() {
        // render all six faces at startup
        UpdateCubemap(63);
    }

    void LateUpdate() {
        if (oneFacePerFrame) {
            int faceToRender = Time.frameCount % 6;
            int faceMask = 1 &lt;&lt; faceToRender;
            UpdateCubemap(faceMask);
        } else {
            UpdateCubemap(63); // all six faces
        }
    }

    void UpdateCubemap(int faceMask) {
        if (!cam) {
            go = new GameObject("CubemapCamera");
            go.AddComponent(typeof(Camera));
            go.hideFlags = HideFlags.HideAndDontSave;
            go.transform.position = transform.position;
            go.transform.rotation = Quaternion.identity;
            cam = go.camera;
            cam.farClipPlane = 100; // don't render very far into cubemap
            cam.enabled = false;
        }

        if (!rtex) {    
            rtex = new RenderTexture(cubemapSize, cubemapSize, 16);
            rtex.isCubemap = true;
            rtex.hideFlags = HideFlags.HideAndDontSave;
            renderer.sharedMaterial.SetTexture ("_Cube", rtex);
        }

        cam.transform.position = transform.position;
        cam.RenderToCubemap(rtex, faceMask);
    }

    void OnDisable() {
        DestroyImmediate (cam);
        DestroyImmediate (rtex);
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://lychesis.net/2012/02/realtime-cubemap-for-reflections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>String formatting</title>
		<link>http://lychesis.net/2012/02/string-formatting/</link>
		<comments>http://lychesis.net/2012/02/string-formatting/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 21:41:02 +0000</pubDate>
		<dc:creator>LyCheSis</dc:creator>
				<category><![CDATA[Game development]]></category>
		<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://lychesis.net/?p=247</guid>
		<description><![CDATA[Something small but usefull is the String.Format function, with which you can format your numerical outputs: using System; using System.Collections; ... // formatted float with three zero padded digits // in front of the "." and three digits after it. debugText += String.Format("H{0:000.000}\n", heading); // formatted int with formats for positive;negative;zero values debugText += String.Format("S{0:+000;-000; [...]]]></description>
			<content:encoded><![CDATA[<p>Something small but usefull is the String.Format function, with which you can format your numerical outputs:</p>
<pre>using System;
using System.Collections;

...

// formatted float with three zero padded digits
// in front of the "." and three digits after it.
debugText += String.Format("H{0:000.000}\n", heading);

// formatted int with formats for positive;negative;zero values
debugText += String.Format("S{0:+000;-000; 000}\n", speed);</pre>
]]></content:encoded>
			<wfw:commentRss>http://lychesis.net/2012/02/string-formatting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculate intersection between to lines</title>
		<link>http://lychesis.net/2012/01/calculate-intersection-between-to-lines/</link>
		<comments>http://lychesis.net/2012/01/calculate-intersection-between-to-lines/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 19:26:55 +0000</pubDate>
		<dc:creator>LyCheSis</dc:creator>
				<category><![CDATA[Game development]]></category>
		<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://lychesis.net/?p=234</guid>
		<description><![CDATA[Here&#8217;s something that will calculate where two lines will intersect. If they don&#8217;t intersect then the two resulting vectors will mark the points where both lines are closest together. /* setup vectors */ Vector3 l1begin = playerCurrentPosition; Vector3 l1end = playerTargetPosition - l1begin; Vector3 l2begin = enemyCurrentPosition; Vector3 l2end = enemyTargetPosition - l2begin; /* calculate [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s something that will calculate where two lines will intersect. If they don&#8217;t intersect then the two resulting vectors will mark the points where both lines are closest together.</p>
<pre>/* setup vectors */
 Vector3 l1begin = playerCurrentPosition;
 Vector3 l1end = playerTargetPosition - l1begin;
 Vector3 l2begin = enemyCurrentPosition;
 Vector3 l2end = enemyTargetPosition - l2begin;</pre>
<pre>/* calculate vectors */
 Vector3 n = Vector3.Cross(l1end, l2end);
 Vector3 u = Vector3.Cross(n, l1begin - l2begin) / Vector3.Dot(n, n);
 Vector3 intersection1 = l1begin - l1end * Vector3.Dot(l2end, u);
 Vector3 intersection2 = l2begin - l2end * Vector3.Dot(l1end, u);</pre>
<pre>/* draw vectors */
 Debug.DrawRay(l1begin, l1end, Color.cyan);
 Debug.DrawRay(l2begin, l2end, Color.magenta);
 Debug.DrawLine(intersection1, intersection2, Color.white);</pre>
]]></content:encoded>
			<wfw:commentRss>http://lychesis.net/2012/01/calculate-intersection-between-to-lines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculate angle from current heading to target object</title>
		<link>http://lychesis.net/2011/10/calculate-angle-from-current-heading-to-target-object/</link>
		<comments>http://lychesis.net/2011/10/calculate-angle-from-current-heading-to-target-object/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 20:58:21 +0000</pubDate>
		<dc:creator>LyCheSis</dc:creator>
				<category><![CDATA[Game development]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Unity3D]]></category>

		<guid isPermaLink="false">http://lychesis.net/?p=214</guid>
		<description><![CDATA[If you want to have an object turn automatically towards a target then you have to find out in which direction to turn. The usual angle function just returns the smallest angle between the current heading and the heading towards the target but not which way around. Vector3 lTarget = transform.InverseTransformPoint(target.position); targetDistance = lTarget.magnitude; targetAngle [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to have an object turn automatically towards a target then you have to find out in which direction to turn. The usual angle function just returns the smallest angle between the current heading and the heading towards the target but not which way around.</p>
<p><code>Vector3 lTarget = transform.InverseTransformPoint(target.position);<br />
targetDistance = lTarget.magnitude;<br />
targetAngle = Mathf.Atan2(lTarget.x, lTarget.z) * Mathf.Rad2Deg;<br />
</code></p>
<ul>
<li>This calculates the position in relation to the current objects local coordinate system.</li>
<li>It then calculates the distance (because you&#8217;ll need it anyway).</li>
<li>Finally it calculates the angle in radians and then converts it to degrees, just for good measure.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://lychesis.net/2011/10/calculate-angle-from-current-heading-to-target-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Vector3 from Quaternion / Rotate Vector3</title>
		<link>http://lychesis.net/2011/09/get-vector3-from-quaternion/</link>
		<comments>http://lychesis.net/2011/09/get-vector3-from-quaternion/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 08:39:58 +0000</pubDate>
		<dc:creator>LyCheSis</dc:creator>
				<category><![CDATA[Game development]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Unity3D]]></category>

		<guid isPermaLink="false">http://lychesis.net/?p=201</guid>
		<description><![CDATA[To get the vector from a quaternion rotation you simply multiply the quaternion by the forward vector. Debug.DrawRay(transform.position, transform.rotation * Vector3.forward, Color.red); This also effectively rotates the forward-vector with the rotation of the transform, positioning it relative to the rotation of the actual object.]]></description>
			<content:encoded><![CDATA[<p>To get the vector from a quaternion rotation you simply multiply the quaternion by the forward vector.</p>
<p><code>Debug.DrawRay(transform.position, transform.rotation * Vector3.forward, Color.red);</code></p>
<p>This also effectively rotates the forward-vector with the rotation of the transform, positioning it relative to the rotation of the actual object.</p>
]]></content:encoded>
			<wfw:commentRss>http://lychesis.net/2011/09/get-vector3-from-quaternion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New category &#8220;HowTo&#8221;</title>
		<link>http://lychesis.net/2011/09/new-category-howto/</link>
		<comments>http://lychesis.net/2011/09/new-category-howto/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 08:38:39 +0000</pubDate>
		<dc:creator>LyCheSis</dc:creator>
				<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://lychesis.net/?p=198</guid>
		<description><![CDATA[I&#8217;m getting a bit fed up having to look up everything with google when programming. Therefore I&#8217;ll add everything I need and find here (even if it isn&#8217;t all that extrodinary).]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m getting a bit fed up having to look up everything with google when programming. Therefore I&#8217;ll add everything I need and find here (even if it isn&#8217;t all that extrodinary).</p>
]]></content:encoded>
			<wfw:commentRss>http://lychesis.net/2011/09/new-category-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unity Stunt Car Racer v03</title>
		<link>http://lychesis.net/2011/08/unity-stunt-car-racer-v03/</link>
		<comments>http://lychesis.net/2011/08/unity-stunt-car-racer-v03/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 16:07:42 +0000</pubDate>
		<dc:creator>LyCheSis</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Game development]]></category>

		<guid isPermaLink="false">http://lychesis.net/?p=191</guid>
		<description><![CDATA[Added a whole new track with better curves and everything. I tried to build the track from separate segments which I wanted to combine in Unity but it was quite tricky building all parts in Lightwave and then getting them to fit in Unity. Therefore I prebuilt the track and imported it as one model [...]]]></description>
			<content:encoded><![CDATA[<p>Added a whole new track with better curves and everything.</p>
<p>I tried to build the track from separate segments which I wanted to combine in Unity but it was quite tricky building all parts in Lightwave and then getting them to fit in Unity. Therefore I prebuilt the track and imported it as one model in Unity. This should also be better for lightmapping, surfacing, etc. but I&#8217;m still quite far away from that.</p>

<a href="http://lychesis.net/wp-content/gallery/development/stuntcarracer_v03.png" title=""  >
	<img class="ngg-singlepic colorbox-191" src="http://lychesis.net/wp-content/gallery/cache/53__320x240_stuntcarracer_v03.png" alt="stuntcarracer_v03" title="stuntcarracer_v03" />
</a>

<p>I also added lap-tracking and repositioning of the player (if you get stuck). The turbo will also not be unlimited anymore, which is now indicated by a couple of dials on the right side of the display.</p>
<p><a title="SCR003" href="http://game.lychesis.net/SCR003.html">SCR003</a></p>
<p>Controls are as follows:<br />
Cursor keys: Steering, throttle and brakes<br />
Ctrl.: Turbo<br />
Space: Reposition vehicle</p>
<p>You&#8217;ll need the turbo to get over the last jump and it will also help greatly managing the first climb.</p>
]]></content:encoded>
			<wfw:commentRss>http://lychesis.net/2011/08/unity-stunt-car-racer-v03/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unity Stunt Car Racer v02</title>
		<link>http://lychesis.net/2011/06/unity-stunt-car-racer-v02/</link>
		<comments>http://lychesis.net/2011/06/unity-stunt-car-racer-v02/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 20:52:20 +0000</pubDate>
		<dc:creator>LyCheSis</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Game development]]></category>

		<guid isPermaLink="false">http://lychesis.net/?p=187</guid>
		<description><![CDATA[Did a quick 3d off-road car in Lightwave for this project and integrated it into the scene. Also added a boost via the fire button (ctrl.) and a camera control script. It also should be much more difficult to tip the car over, but the car will not slide yet. SCR002]]></description>
			<content:encoded><![CDATA[<p>Did a quick 3d off-road car in Lightwave for this project and integrated it into the scene.</p>
<p>Also added a boost via the fire button (ctrl.) and a camera control script. It also should be much more difficult to tip the car over, but the car will not slide yet.</p>

<a href="http://lychesis.net/wp-content/gallery/development/stuntcarracer_v02.png" title=""  >
	<img class="ngg-singlepic colorbox-187" src="http://lychesis.net/wp-content/gallery/cache/52__320x240_stuntcarracer_v02.png" alt="stuntcarracer_v02" title="stuntcarracer_v02" />
</a>

<p><a title="SCR002" href="http://game.lychesis.net/SCR002.html">SCR002</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lychesis.net/2011/06/unity-stunt-car-racer-v02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unity Stunt Car Racer</title>
		<link>http://lychesis.net/2011/06/unity-stunt-car-racer/</link>
		<comments>http://lychesis.net/2011/06/unity-stunt-car-racer/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 19:41:05 +0000</pubDate>
		<dc:creator>LyCheSis</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Game development]]></category>

		<guid isPermaLink="false">http://lychesis.net/?p=177</guid>
		<description><![CDATA[Had a scan through another bunch of old Amiga games and stumbled across Geoff Crammonds excellent Stunt Car Racer. Knowing that Unity had some sort of vehicle physics (albeit not very good ones) I wanted to have a go at this myself. Here&#8217;s what I have come up until now. SCR v01]]></description>
			<content:encoded><![CDATA[<p>Had a scan through another bunch of old Amiga games and stumbled across Geoff Crammonds excellent Stunt Car Racer. Knowing that Unity had some sort of vehicle physics (albeit not very good ones) I wanted to have a go at this myself.</p>
<p>Here&#8217;s what I have come up until now.</p>

<a href="http://lychesis.net/wp-content/gallery/development/stuntcarracer_v01.png" title=""  >
	<img class="ngg-singlepic colorbox-177" src="http://lychesis.net/wp-content/gallery/cache/51__320x240_stuntcarracer_v01.png" alt="stuntcarracer_v01" title="stuntcarracer_v01" />
</a>

<p><a title="SCR v01" href="http://game.lychesis.net/SCR001.html">SCR v01</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lychesis.net/2011/06/unity-stunt-car-racer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

