<?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>SrichNET &#187; Programming</title>
	<atom:link href="http://blog.srichnet.info/archives/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.srichnet.info</link>
	<description>My Interests and Hobbies</description>
	<lastBuildDate>Thu, 25 Nov 2010 04:46:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Leadwerks &#8211; A Great Indie Engine</title>
		<link>http://blog.srichnet.info/archives/105</link>
		<comments>http://blog.srichnet.info/archives/105#comments</comments>
		<pubDate>Sun, 08 Nov 2009 05:00:51 +0000</pubDate>
		<dc:creator>S.Richmond</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Hobbies]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.srichnet.info/?p=105</guid>
		<description><![CDATA[Last year I decided I&#8217;d bite the bullet and learn C++ with the end-goal of being able to finally design and build my own applications and games. So I went and got the fantastic C++ video tutorial library from 3D Buzz, which I strongly recommend any new C++ video game developer go through &#8211; They [...]]]></description>
			<content:encoded><![CDATA[<p>Last year I decided I&#8217;d bite the bullet and learn C++ with the end-goal of being able to finally design and build my own applications and games. So I went and got the fantastic C++ video tutorial library from <a href="http://3dbuzz.com" target="_blank">3D Buzz</a>, which I strongly recommend any new C++ video game developer go through &#8211; They take you right form start to finish. All the way from an ASCII rogue-like game to a sprite-based game. Furthermore, its all designed in pretty OO.</p>
<p>As I began the 6th and last series of the 3D Buzz tutorials &#8211; Creating a 3D OpenGL engine &#8211; I decided I&#8217;d like to focus less on the core mathematics of displaying pixels and more on the creation and design of actual games. I&#8217;m not a very good mathematician after-all, and getting into that kind of stuff requires low-level efficient code. Code I really don&#8217;t have the skill to write just yet.</p>
<p>So I started looking around for graphics engine libraries that&#8217;ll allow me to focus on the game itself. There are a startlingly huge number of graphics engines out there, both free and not, and while I went through quite a damn few I want to talk about just one.</p>
<p><span id="more-105"></span></p>
<h2><img class="alignnone" title="Leadwerks Logo" src="http://1.bp.blogspot.com/_qGOtgeHf7S0/STO0p8ko_uI/AAAAAAAAAEA/nWCGxTN78Bc/S220/LE_red.png" alt="" width="88" height="88" />Leadwerks</h2>
<p><a href="http://www.leadwerks.com" target="_blank">http://www.leadwerks.com</a></p>
<p>I&#8217;ve been using the Leadwerks engine for about 6 months now and I&#8217;m loving it. Why?</p>
<ol>
<li><strong>The Engine</strong> &#8211; Built from the ground up to be a user-friendly and complete package. Modelled after the Crytek Crysis engine, it has all the features one could possibly need for both a wide-open game (Like Crysis) or an in-doors game, complete with a real-time sandbox editor. I think what I love most is that it is a very OO-centric engine. The code is just so clean and easy to understand &#8211; The huge plus for someone starting out like me.</li>
<li><strong>Documentation </strong>- The documentation is all built up on a very-well organised and clean wiki, which you can freely <a href="http://www.leadwerks.com/wiki" target="_blank">browse for yourself</a>. Josh, the creator, has made video tutorials for almost all aspects of the engine. This means you can pretty much just jump in, follow the tutorials, and you WILL have a running game in under a day.</li>
<li><strong>Community </strong>- The Leadwerks forums,<a href="http://forum.leadwerks.com" target="_blank"> also freely available</a>, is a small but very helpful community. Josh, the creator, is often on there as well. You&#8217;ll find that any questions will be answered in under a day.</li>
<li><strong>Cost </strong>- One of the more problematic issues about Leadwerks. The cost is $100US upfront. Meaning you need to dish out early to really start. On the other hand, once you pay the initial fee you&#8217;re done. You get the engine for life, including any updates, and you can do whatever you want with your application. Which makes this engine one of the cheapest going around.</li>
</ol>
<p>All in all, Leadwerks seems to be the perfect engine for someone who has a basic understanding of OO C++ and would like to dive into game development. Although the initial $100US fee can be a bit daunting for some, I highly recommend it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.srichnet.info/archives/105/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VBScript &#8211; Map Printers Based On IP / VLAN ID</title>
		<link>http://blog.srichnet.info/archives/73</link>
		<comments>http://blog.srichnet.info/archives/73#comments</comments>
		<pubDate>Thu, 13 Aug 2009 08:24:07 +0000</pubDate>
		<dc:creator>S.Richmond</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.srichnet.info/?p=73</guid>
		<description><![CDATA[Little script I made. Pretty self explanatory. Works real well. ' **************************************************** ' PRINTER MAPPER v0.9 ' **************************************************** ' This script will map a network printer at user ' logon based on what floor the computer is currently ' on. This is done by viewing the VLAN ID found in ' the IP address field. [...]]]></description>
			<content:encoded><![CDATA[<p>Little script I made. Pretty self explanatory. Works real well.</p>
<p><span id="more-73"></span></p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #008000;">' ****************************************************
</span><span style="color: #008000;">'                 PRINTER MAPPER v0.9
</span><span style="color: #008000;">' ****************************************************
</span><span style="color: #008000;">' This script will map a network printer at user
</span><span style="color: #008000;">' logon based on what floor the computer is currently
</span><span style="color: #008000;">' on. This is done by viewing the VLAN ID found in
</span><span style="color: #008000;">' the IP address field.
</span><span style="color: #008000;">'
</span><span style="color: #008000;">' Scott T Richmond,
</span><span style="color: #008000;">'  IBM Australia.
</span><span style="color: #008000;">'  August 2009.
</span><span style="color: #008000;">'
</span><span style="color: #008000;">' TODO:
</span><span style="color: #008000;">'  - Turn off all reporting.
</span><span style="color: #008000;">'  - Error checking.
</span><span style="color: #008000;">'
</span><span style="color: #008000;">' Notes:
</span><span style="color: #008000;">'  - Setting default printer is simple, but no way
</span><span style="color: #008000;">'    to determine which one to set automatically so
</span><span style="color: #008000;">'    not used.
</span><span style="color: #008000;">'    objNetwork.SetDefaultPrinter &quot;\\PRINTER_NAME&quot;
</span><span style="color: #008000;">' ****************************************************
</span>
<span style="color: #008000;">' ****************************************************
</span><span style="color: #008000;">'                    Compile Options
</span><span style="color: #008000;">' ****************************************************
</span><span style="color: #008000;">' Force variables to be explicitly defined or die:
</span><span style="color: #000080;">Option</span> <span style="color: #000080;">Explicit</span>
<span style="color: #008000;">' Continue script dispite any errors:
</span><span style="color: #000080;">On</span> <span style="color: #000080;">Error</span> <span style="color: #000080;">Resume</span> <span style="color: #000080;">Next</span>
&nbsp;
<span style="color: #008000;">' ****************************************************
</span><span style="color: #008000;">'                   Define Variables
</span><span style="color: #008000;">' ****************************************************
</span><span style="color: #000080;">dim</span> VLAN19
<span style="color: #000080;">dim</span> VLAN22
<span style="color: #000080;">dim</span> VLAN23
<span style="color: #000080;">dim</span> VLAN24
<span style="color: #000080;">dim</span> VLAN25
<span style="color: #000080;">dim</span> VLAN26
<span style="color: #000080;">dim</span> VLAN27
<span style="color: #000080;">dim</span> WIFI(2)
<span style="color: #000080;">dim</span> IPArray(3)
<span style="color: #000080;">dim</span> objWMIService
<span style="color: #000080;">dim</span> objNetwork
<span style="color: #000080;">dim</span> IPConfigSet
<span style="color: #000080;">dim</span> IPConfig
<span style="color: #000080;">dim</span> splitIP
<span style="color: #000080;">dim</span> octet
&nbsp;
<span style="color: #008000;">' ****************************************************
</span><span style="color: #008000;">'                    Set Variables
</span><span style="color: #008000;">' ****************************************************
</span>VLAN19 = <span style="color: #800000;">&quot;139&quot;</span>
VLAN22 = <span style="color: #800000;">&quot;145&quot;</span>
VLAN23 = <span style="color: #800000;">&quot;147&quot;</span>
VLAN24 = <span style="color: #800000;">&quot;149&quot;</span>
VLAN25 = <span style="color: #800000;">&quot;151&quot;</span>
VLAN26 = <span style="color: #800000;">&quot;153&quot;</span>
VLAN27 = <span style="color: #800000;">&quot;155&quot;</span>
WIFI(0) = <span style="color: #800000;">&quot;162&quot;</span>
WIFI(1) = <span style="color: #800000;">&quot;184&quot;</span>
WIFI(2) = <span style="color: #800000;">&quot;185&quot;</span>
<span style="color: #000080;">Set</span> objNetwork = CreateObject(<span style="color: #800000;">&quot;WScript.Network&quot;</span>)
<span style="color: #000080;">Set</span> objWMIService = GetObject(<span style="color: #800000;">&quot;winmgmts:\\&quot;</span> &amp;amp; <span style="color: #800000;">&quot;.&quot;</span> &amp;amp; <span style="color: #800000;">&quot;\root\cimv2&quot;</span>)
<span style="color: #000080;">Set</span> IPConfigSet = objWMIService.ExecQuery (<span style="color: #800000;">&quot;Select IPAddress from Win32_NetworkAdapterConfiguration &quot;</span>)
&nbsp;
<span style="color: #008000;">' ****************************************************
</span><span style="color: #008000;">'              Find and Parse Primary IP
</span><span style="color: #008000;">' ****************************************************
</span><span style="color: #008000;">' Primary IP is found by iterating through all interfaces
</span><span style="color: #008000;">' and finding the best match for the LAN network IP.
</span><span style="color: #008000;">' The code below discards ones that are:
</span><span style="color: #008000;">'  - NULL.
</span><span style="color: #008000;">'  - Anything other than a first IP octet of 10.
</span><span style="color: #008000;">'  - Or corresponds to the WiFi VLAN IDs.
</span><span style="color: #000080;">For</span> <span style="color: #000080;">Each</span> IPConfig <span style="color: #000080;">in</span> IPConfigSet
    <span style="color: #000080;">If</span> <span style="color: #000080;">Not</span> IsNull(IPConfig.IPAddress) <span style="color: #000080;">Then</span>
       splitIP = Split(IPConfig.IPAddress(0), <span style="color: #800000;">&quot;.&quot;</span>, -1, 1)
       <span style="color: #000080;">If</span> splitIP(0) = <span style="color: #800000;">&quot;10&quot;</span> <span style="color: #000080;">Then</span>
          <span style="color: #000080;">If</span> splitIP(2) = WIFI(0) <span style="color: #000080;">or</span> _
             splitIP(2) = WIFI(1) <span style="color: #000080;">or</span> _
             splitIP(2) = WIFI(2) <span style="color: #000080;">Then</span>
             WScript.Echo <span style="color: #800000;">&quot;Wi-fi connection found. Looking for LAN IP...&quot;</span>
          <span style="color: #000080;">Else</span>
             <span style="color: #000080;">For</span> octet=0 <span style="color: #000080;">to</span> 3
                 IPArray(octet) = splitIP(octet)
             <span style="color: #000080;">Next</span>
          <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
       <span style="color: #000080;">End</span> <span style="color: #000080;">if</span>
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
<span style="color: #000080;">Next</span>
&nbsp;
<span style="color: #008000;">' ****************************************************
</span><span style="color: #008000;">'              Perform Work Based On VLAN
</span><span style="color: #008000;">' ****************************************************
</span><span style="color: #008000;">' Looks at third octet of the IP and determines what VLAN
</span><span style="color: #008000;">' ID the IP address belongs to, then applies correct
</span><span style="color: #008000;">' printer configuration.
</span><span style="color: #000080;">If</span> IPArray(0) &amp;lt;&amp;gt; <span style="color: #800000;">&quot;10&quot;</span> <span style="color: #000080;">Then</span>
  WScript.Echo <span style="color: #800000;">&quot;Invalid IP. Not in the 10/8 network range.&quot;</span>
  <span style="color: #000080;">ElseIF</span> IPArray(2) = VLAN19 <span style="color: #000080;">Then</span>
     WScript.Echo <span style="color: #800000;">&quot;IP is in VLAN 19. Mapping L19 printers...&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L19UtilRmE-XerCol1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L19UtilRmE-XerBW1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L19UtilRmW-XerCol1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L19UtilRmW-HPPlot1&quot;</span>
  <span style="color: #000080;">ElseIF</span> IPArray(2) = VLAN22 <span style="color: #000080;">Then</span>
     WScript.Echo <span style="color: #800000;">&quot;IP is in VLAN 22. Mapping L22 printers...&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L22UtilRm-XerCol1&quot;</span>
  <span style="color: #000080;">ElseIF</span> IPArray(2) = VLAN23 <span style="color: #000080;">Then</span>
     WScript.Echo <span style="color: #800000;">&quot;IP is in VLAN 23. Mapping L23 printers...&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L23NthWest-XerBW1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L23UtilRmE-XerCol1&quot;</span>
  <span style="color: #000080;">ElseIF</span> IPArray(2) = VLAN24 <span style="color: #000080;">Then</span>
     WScript.Echo <span style="color: #800000;">&quot;IP is in VLAN 24. Mapping L24 printers...&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L24UtilRmW-XerCol1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L24UtilRmE-XerCol1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L24UtilRmW-HPPlot2&quot;</span>
  <span style="color: #000080;">ElseIF</span> IPArray(2) = VLAN25 <span style="color: #000080;">Then</span>
     WScript.Echo <span style="color: #800000;">&quot;IP is in VLAN 25. Mapping L25 printers...&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L25UtilRmE-XerCol1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L25UtilRmE-XerBW1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L25UtilRmW-XerCol1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L25UtilRmW-XerBW1&quot;</span>
  <span style="color: #000080;">ElseIF</span> IPArray(2) = VLAN26 <span style="color: #000080;">Then</span>
     WScript.Echo <span style="color: #800000;">&quot;IP is in VLAN 26. Mapping L26 printers...&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L26UtilRmE-XerCol1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L26UtilRmW-XerCol1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L26NthEast-XerCol1&quot;</span>
     <span style="color: #008000;">' Printer below is a secure printer and should not be automatically installed.
</span>     <span style="color: #008000;">'objNetwork.AddWindowsPrinterConnection &quot;\\PRINTSVR\L26Cent-XerCol-1&quot;
</span>  <span style="color: #000080;">ElseIF</span> IPArray(2) = VLAN27 <span style="color: #000080;">Then</span>
     WScript.Echo <span style="color: #800000;">&quot;IP is in VLAN 27. Mapping L27 printers...&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L27West-XerCol1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L27UtilRm2E-XerCol1&quot;</span>
     objNetwork.AddWindowsPrinterConnection <span style="color: #800000;">&quot;\\PRINTSVR\L27UtilRm1E-XerCol1&quot;</span>
  <span style="color: #000080;">Else</span>
     WScript.Echo <span style="color: #800000;">&quot;Unknown VLAN.&quot;</span>
<span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
&nbsp;
WScript.Quit
' <span style="color: #000080;">End</span> of VBScript</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.srichnet.info/archives/73/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

