<?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>The 3DGS Nerd &#187; Tutorials</title>
	<atom:link href="http://3dgsnerd.xware-cg.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://3dgsnerd.xware-cg.com</link>
	<description>A blog about 3DGS, Nerds and a lot of other stuff</description>
	<lastBuildDate>Mon, 07 Dec 2009 23:54:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Foolproof</title>
		<link>http://3dgsnerd.xware-cg.com/foolproof/</link>
		<comments>http://3dgsnerd.xware-cg.com/foolproof/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 20:11:09 +0000</pubDate>
		<dc:creator>Michael Schwarz</dc:creator>
				<category><![CDATA[Boredom]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[This Humanity has no Future]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[42]]></category>
		<category><![CDATA[foolproof]]></category>

		<guid isPermaLink="false">http://3dgsnerd.xware-cg.com/foolproof/</guid>
		<description><![CDATA[A nice line from the Hitchhikers Guide to the Galaxy which I just remembered:
&#34;A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools&#34;

Quite a good guideline if you are making a game/application foolproof.
]]></description>
			<content:encoded><![CDATA[<p>A nice line from the Hitchhikers Guide to the Galaxy which I just remembered:</p>
<blockquote><p><em>&quot;A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools&quot;</em></p>
</blockquote>
<p>Quite a good guideline if you are making a game/application foolproof.</p>
]]></content:encoded>
			<wfw:commentRss>http://3dgsnerd.xware-cg.com/foolproof/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modulo &#8211; The Mystery Operator</title>
		<link>http://3dgsnerd.xware-cg.com/modulo-the-mystery-operator/</link>
		<comments>http://3dgsnerd.xware-cg.com/modulo-the-mystery-operator/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 16:08:52 +0000</pubDate>
		<dc:creator>Michael Schwarz</dc:creator>
				<category><![CDATA[3DGS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[hint]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[modulo]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://3dgsnerd.xware-cg.com/modulo-the-mystery-operator/</guid>
		<description><![CDATA[Well, most people &#8211; mainly beginners &#8211; are very confused about what this “%” or “Modulo” operator does. Well simply put, it returns the “remainder” of a division. Let’s take a look at some easy-to-understand examples:
 
Let’s do something simple:
4 / 2 = 2 &#8211; Rest: 0
We all know how to do this, 2 fits [...]]]></description>
			<content:encoded><![CDATA[<p>Well, most people &#8211; mainly beginners &#8211; are very confused about what this “%” or “Modulo” operator does. Well simply put, it returns the “remainder” of a division. Let’s take a look at some easy-to-understand examples:</p>
<p> <span id="more-94"></span>
<p>Let’s do something simple:</p>
<p align="center"><strong>4 / 2 = 2 &#8211; Rest: 0</strong></p>
<p align="left">We all know how to do this, 2 fits two times into 4, nothing remains and thus rest is = 0.   <br />The modulo operation to get this “0” would be</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">var</span> rest = 4 % 2;</pre>
</p></div>
</div>
<p>Now let’s actually take it into account with something that gives us some “rest”:</p>
<p align="center"><strong>5 / 2 = 2.5; Rest: 1</strong></p>
<p align="center">Okay, stop now. That doesn’t make sense. Right?! 2.5 times 2 is 5, there is nothing left over!? Well no. If you make a modulo operation, it is as if you make the division with integer numbers. In this case this means:</p>
<p align="center"><strong>5 / 2 = 4; Rest 1</strong></p>
<p align="left">Because as an integer number, 2 only fits two times inside 5. And the remainder of the operation is 1, the number it takes to make the full 5.</p>
<p align="left">And again, in modulo this is:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">var</span> rest = 5 % 2; <span style="color: #008000">// = 1</span></pre>
</p></div>
</div>
<p>One more example before I go into “<em>real-life-application</em>” examples:</p>
<p><strong>8 / 3 = 2.666~; Rest: 2 &#8211; Or in Modulo result:<br />
    <br />8 / 3 = 2; Rest: 2</strong></p>
<p>Okay, let’s make this a real life example. For instance, a simple function that tell us if the a number is odd or even:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">function</span> IsEven(num)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    <span style="color: #0000ff">return</span> !(num % 2);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre>
</p></div>
</div>
<p>This is easy explained. The function calculates the modulo for the division “num/2” if the number is even, the result will be 0. As the function is called “IsEven” I invert the result (using !) so that instead of 0 it returns 1. If the function would be called “IsOdd” you can leave it without the !, like this:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">function</span> IsOdd(num)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    <span style="color: #0000ff">return</span> (num % 2);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre>
</p></div>
</div>
<p>We can even use it in a clever way to execute something every <strong>n</strong>’th frame:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">...</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">while</span>(1)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #0000ff">if</span>(total_frames % 5 == 0) <span style="color: #008000">// every 5 frames</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        temp += 1; <span style="color: #008000">// add 1 to temp</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    wait(1);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">}</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">...</pre>
</p></div>
</div>
<p>Modulo is a great way to do counters and do lots of tricky operations in just a matter of a single line. If you know how to use it, modulo is a mighty operator and can optimize your code <strong>BIG TIME</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://3dgsnerd.xware-cg.com/modulo-the-mystery-operator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Note to self:</title>
		<link>http://3dgsnerd.xware-cg.com/note-to-self/</link>
		<comments>http://3dgsnerd.xware-cg.com/note-to-self/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 19:06:07 +0000</pubDate>
		<dc:creator>Michael Schwarz</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Stupidity]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[2.7]]></category>
		<category><![CDATA[blank page]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://3dgsnerd.xware-cg.com/note-to-self/</guid>
		<description><![CDATA[Always make a database and full filetree backup when upgrading Wordpress.
What I wanna say with that is, I tried to updgrade the blog from 2.6.2 to 2.7 and it kinda messed everything. I had to deactivate all the plugins and themes before I got to see anything but a blank page.
I hope Google picks this [...]]]></description>
			<content:encoded><![CDATA[<p>Always make a database and full filetree backup when upgrading Wordpress.</p>
<p>What I wanna say with that is, I tried to updgrade the blog from 2.6.2 to 2.7 and it kinda messed everything. I had to deactivate all the plugins and themes before I got to see anything but a blank page.</p>
<p>I hope Google picks this up in case someone else saw all those other Google results and still is wondering why his blog doesn’t work: DISABLE THE WP-STICKY PLUGIN, it causes a conflict, because the new WP version already has a built-in sticky function.</p>
]]></content:encoded>
			<wfw:commentRss>http://3dgsnerd.xware-cg.com/note-to-self/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming Advices</title>
		<link>http://3dgsnerd.xware-cg.com/programming-advises/</link>
		<comments>http://3dgsnerd.xware-cg.com/programming-advises/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 17:41:38 +0000</pubDate>
		<dc:creator>Michael Schwarz</dc:creator>
				<category><![CDATA[3DGS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[advise]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scheme]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[SED]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[WED]]></category>

		<guid isPermaLink="false">http://3dgsnerd.xware-cg.com/programming-advises/</guid>
		<description><![CDATA[I think I can contribute some advise regarding on how to program comfortable, and thus increase workflow.

First of all, if you have a big widescreen monitor, use the space, don’t maximize windows’ but rather arrange them the way that you use 3/4 of the monitor for your most important program (e.g. WED) and the other [...]]]></description>
			<content:encoded><![CDATA[<p>I think I can contribute some advise regarding on how to program comfortable, and thus increase workflow.</p>
<p><span id="more-86"></span></p>
<p>First of all, if you have a big widescreen monitor, use the space, don’t maximize windows’ but rather arrange them the way that you use 3/4 of the monitor for your most important program (e.g. WED) and the other 1/4 for tools or some other secondary program you access often (e.g. SED). If you have two or more screens, it’s advisable to use the monitors one program for each one. For example like me:</p>
<p><a href="http://3dgsnerd.xware-cg.com/wp-content/uploads/ProgrammingAdvises_F17F/workspace.jpg"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="workspace" src="http://3dgsnerd.xware-cg.com/wp-content/uploads/ProgrammingAdvises_F17F/workspace_thumb.jpg" border="0" alt="workspace" width="532" height="190" /></a></p>
<p>I use my 17” Screen for SED, and additionally also move the sidebar from WED to the second screen, so I have the entire 21” Screen for WED, and WED only. Also I use a minimalistic Windows theme. If you don’t want to install new Windows themes, you can also just set the theme setting for “Active Window Bar” to a smaller value, so the title bars of your windows are smaller and occupy less space.</p>
<h5>WED</h5>
<p>I have adjusted the key mapping in WED, so I have to move the mouse less and have more time doing the actual work rather than running the mouse across screen all the time to select the appropriate tools.</p>
<p>Keeping in mind that I have a German keyboard (if you have an American/English keyboard, just imagine the Y and Z key swapped) this is how I mapped them:</p>
<ul>
<li>&gt; &#8211; Select mode</li>
<li>Y &#8211; Move mode</li>
<li>X &#8211; Rotate mode</li>
<li>C &#8211; Scale mode</li>
<li>A &#8211; Vertex mode</li>
<li>S &#8211; Edge mode</li>
<li>D &#8211; Face mode</li>
<li>[Tilde] &#8211; Show properties window</li>
<li>F8 / F9 &#8211; Build / Run (A4 Nostalgia!)</li>
</ul>
<p>Now you have a incredibly increased workflow in WED, once you get used to use these shortcuts, you can modify and move objects in a matter of split seconds instead of wasting precious time moving the mouse to your toolbar every time you need to change the mode.</p>
<p>SED</p>
<p>I use a different syntax highlighting as you can see from the screenshot above. I consider it more tranquilizing to the eyes than the bright default scheme, this way you don’t get the infamous “tired eyes” from programming hours and hours through the night. If you like the theme, you can download it at the end of this post.</p>
<p>If you are still using A6 and are bound to C-Script, or use C-Script for other reasons, then it is a good idea to give your variables useful names to remember what type of information they store as C-Script only has one variable definition.</p>
<p>For example:</p>
<div style="font-size: 8pt; margin: 20px 0px 10px; overflow: auto; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border: gray 1px solid; padding: 4px;">
<div style="font-size: 8pt; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;">
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;">var bIsUsed = <span style="color: #0000ff">false</span>; <span style="color: #008000">// b for Boolean</span></pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;">var iEnemyCount = 10; <span style="color: #008000">// i for Integer</span></pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;">var dDistanceFromPlayer = 2.3; <span style="color: #008000">// d for Double/Decimal</span></pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;">var hMusicFile; <span style="color: #008000">// h for Handle</span></pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;">var sTempString = str_create(<span style="color: #006080">"Hello World!"</span>); <span style="color: #008000">// s for String</span></pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;"><span style="color: #0000ff">string</span> sTestString = <span style="color: #006080">"Just a test"</span>; // Same here</pre>
<p> </p></div>
</div>
<p>Also remember, that you can use variables and even skills to save strings in them! That makes it easier to create string arrays (which are a bit tricky when using the “text” object, for example:</p>
<div style="font-size: 8pt; margin: 20px 0px 10px; overflow: auto; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border: gray 1px solid; padding: 4px;">
<div style="font-size: 8pt; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;">
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;"><span style="color: #008000">// Single String</span></pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;"><span style="color: #0000ff">var</span> sOneString;</pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;">sOneString = str_create(<span style="color: #006080">"This is the content"</span>);</pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;"> </pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;"><span style="color: #008000">// String array</span></pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;"><span style="color: #0000ff">var</span> sStringArray[5];</pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;">sStringArray[0] = str_create(<span style="color: #006080">"The"</span>);</pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;">sStringArray[1] = str_create(<span style="color: #006080">"cake"</span>);</pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;">sStringArray[2] = str_create(<span style="color: #006080">"is"</span>);</pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;">sStringArray[3] = str_create(<span style="color: #006080">"a"</span>);</pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;">sStringArray[4] = str_create(<span style="color: #006080">"lie"</span>);</pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;"> </pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;"><span style="color: #008000">// And in skills</span></pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;">my.skill1 = str_create(<span style="color: #006080">"Wohoo!"</span>);</pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;"> </pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;"><span style="color: #008000">// You can access them just as easy, no workarounds.</span></pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;">draw_text(sOneString, 200, 200, vector(255,255,255));</pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; border-style: none; padding: 0px;">draw_text(sStringArray[2], 200, 300, vector(255,255,255));</pre>
<pre style="font-size: 8pt; margin: 0em; overflow: visible; width: 100%; color: black; line-height: 12pt; font-family: consolas, 'Courier New', courier, monospace; background-color: white; border-style: none; padding: 0px;">draw_text(my.skill1, 200, 400, vector(255,255,255));</pre>
<p> </p></div>
</div>
<p>That’s enough for now! Practice with what you learned today, and then I’ll publish some new advise!</p>
<div id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:67474318-952b-44b1-a455-57250098382b" class="wlWriterEditableSmartContent" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<p>Download the SED Color Scheme <a href="http://3dgsnerd.xware-cg.com/wp-content/uploads/ProgrammingAdvises_F17F/MSScheme.sedscheme" target="_blank">Download</a></div>
]]></content:encoded>
			<wfw:commentRss>http://3dgsnerd.xware-cg.com/programming-advises/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
