<?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>Thronic.com &#187; Devlog</title>
	<atom:link href="http://thronic.com/category/development/devlog/feed/" rel="self" type="application/rss+xml" />
	<link>http://thronic.com</link>
	<description>Personal Computing and Development by Dag J. Nedrelid</description>
	<lastBuildDate>Wed, 28 Apr 2010 12:21:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google-like search suggestion tool</title>
		<link>http://thronic.com/2010/development/devlog/google-like-search-suggestion-tool/</link>
		<comments>http://thronic.com/2010/development/devlog/google-like-search-suggestion-tool/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 11:53:57 +0000</pubDate>
		<dc:creator>Dag Jonny Nedrelid</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Devlog]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://thronic.com/?p=202</guid>
		<description><![CDATA[A search tool that resembles the way google shows suggestions when typing keywords. Basically a simple javascript application that I wrote from scratch to see if I could create something similar.

&#160;
ReviewSpindle
A gateway between articles and affiliate links.
Key features:
* It dynamically updates the suggestion list with bold character recognition.
* The suggestion list can be navigated using [...]]]></description>
			<content:encoded><![CDATA[<p>A search tool that resembles the way google shows suggestions when typing keywords. Basically a simple javascript application that I wrote from scratch to see if I could create something similar.<br />
<span id="more-202"></span>
<p>&nbsp;</p>
<p><a href="http://reviewspindle.com/" target="_blank">ReviewSpindle</a><br />
A gateway between articles and affiliate links.</p>
<p>Key features:<br />
* It dynamically updates the suggestion list with bold character recognition.<br />
* The suggestion list can be navigated using arrow keys and mouse.<br />
* When using arrow keys, movement takes over from mouse location.</p>
<p>The application JS code is easily available through viewing the source. The PHP used is just a 2-dimensional array with titles and urls. And a foreach-loop to check for form submits, along with populating the JS version of the array.</p>
]]></content:encoded>
			<wfw:commentRss>http://thronic.com/2010/development/devlog/google-like-search-suggestion-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Galaxy &#187; A sci-fi browser game</title>
		<link>http://thronic.com/2010/development/devlog/web-galaxy-a-sci-fi-browser-game/</link>
		<comments>http://thronic.com/2010/development/devlog/web-galaxy-a-sci-fi-browser-game/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 17:06:29 +0000</pubDate>
		<dc:creator>Dag Jonny Nedrelid</dc:creator>
				<category><![CDATA[Devlog]]></category>
		<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://thronic.com/?p=189</guid>
		<description><![CDATA[Web Galaxy is a simple multiplayer browser game. It was made spontaneously without any specific game design in mind, I pretty much winged the whole thing as I went along based on awesome randomness. All codes and algorithms is original work. I borrowed graphics from the web and processed most of it through photoshop to [...]]]></description>
			<content:encoded><![CDATA[<p>Web Galaxy is a simple multiplayer browser game. It was made spontaneously without any specific game design in mind, I pretty much winged the whole thing as I went along based on awesome randomness. All codes and algorithms is original work. I borrowed graphics from the web and processed most of it through photoshop to get what I needed.</p>
<p><span id="more-189"></span></p>
<p>Web Galaxy currently has 10 solar systems with 30 asteroids in every system by default. Web browsers may lag when running more than 30-50 asteroids in the solar system view through the asteroid movement engine, I want to avoid that. If I were to add support for more player activity I would probably want to build more solar systems instead.</p>
<p><strong>Technical</strong><br />
Mainly Javascript functionality. DHTML for effects, AJAX for real-time database updates, PHP and MySQL for back-end. The whole project consists of 15 images and 6 web files, 903KiB in total size. Game is wrapped in a very simple and basic user login system, just enough to keep players separated. The game should work without cookies as well.</p>
<p>I started making the game Feb. 9, 2010. Game was considered completed enough for testing on the Feb. 15, 2010. And that is where it is right now until I decide to put more work into it. The next step would be to create a messaging and/or chat system between players.</p>
<p><strong>Gameplay illustrations:</strong><br />

<a href='http://thronic.com/2010/development/devlog/web-galaxy-a-sci-fi-browser-game/attachment/wgg1/' title='Establish your home base.'><img width="150" height="150" src="http://thronic.com/wp-content/uploads/2010/02/WGG1-150x150.jpg" class="attachment-thumbnail" alt="Step1: Build your command center, ship factory and ship tech center. Build a spaceship and upgrade it with a laser weapon. Upgrade your command center with mineral operations to earn more minerals. You can do this on every asteroid you claim." title="Establish your home base." /></a>
<a href='http://thronic.com/2010/development/devlog/web-galaxy-a-sci-fi-browser-game/attachment/wgg2/' title='Travel the galaxy.'><img width="150" height="150" src="http://thronic.com/wp-content/uploads/2010/02/WGG2-150x150.jpg" class="attachment-thumbnail" alt="Step2: Once you have built a spaceship, you can travel the web galaxy to increase your empire and build more Mineral Operations. Mineral Operations will increase your economy." title="Travel the galaxy." /></a>
<a href='http://thronic.com/2010/development/devlog/web-galaxy-a-sci-fi-browser-game/attachment/wgg3/' title='Travel to solar systems in search for other asteroids.'><img width="150" height="150" src="http://thronic.com/wp-content/uploads/2010/02/WGG3-150x150.jpg" class="attachment-thumbnail" alt="Step3: Travel to solar systems in search for other asteroids." title="Travel to solar systems in search for other asteroids." /></a>
<a href='http://thronic.com/2010/development/devlog/web-galaxy-a-sci-fi-browser-game/attachment/wgg4/' title='Attack other players with your spaceship.'><img width="150" height="150" src="http://thronic.com/wp-content/uploads/2010/02/WGG4-150x150.jpg" class="attachment-thumbnail" alt="Step4: If you attack another player&#039;s home base, they will be struck hard, loose their spaceship and will either have to use a nuclear defense or wait for help from other players." title="Attack other players with your spaceship." /></a>
<a href='http://thronic.com/2010/development/devlog/web-galaxy-a-sci-fi-browser-game/attachment/wgg5/' title='Structure struck by laser weapon.'><img width="150" height="150" src="http://thronic.com/wp-content/uploads/2010/02/WGG5-150x150.jpg" class="attachment-thumbnail" alt="The spaceship laser weapon is a powerful thing, but it also cost you 500 minerals every time you fire it, so consider your targets!" title="Structure struck by laser weapon." /></a>
<a href='http://thronic.com/2010/development/devlog/web-galaxy-a-sci-fi-browser-game/attachment/wgg6/' title='Expand your empire for survival and glory.'><img width="150" height="150" src="http://thronic.com/wp-content/uploads/2010/02/WGG6-150x150.jpg" class="attachment-thumbnail" alt="Step5: After wiping another player from an asteroid surface, you can claim the asteroid for yourself. More mineral operations means more minerals! And more survival as you will generate a lot of minerals, and be able to use more nuclear defenses." title="Expand your empire for survival and glory." /></a>
</p>
<p>You can try out the game yourself <a href="http://webgalaxygame.thronic.com/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thronic.com/2010/development/devlog/web-galaxy-a-sci-fi-browser-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IdleGuard</title>
		<link>http://thronic.com/2009/development/devlog/idleguard/</link>
		<comments>http://thronic.com/2009/development/devlog/idleguard/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 20:59:45 +0000</pubDate>
		<dc:creator>Dag Jonny Nedrelid</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Devlog]]></category>
		<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://thronic.com/?p=165</guid>
		<description><![CDATA[Some MMO games have been criticized for having up to 5 hour &#8211; or more &#8211; queues before you can actually enter the game and play. This inspired me to create a mini-program that might help you with this by reducing the amount of times you need to actually log in. Any software that kicks [...]]]></description>
			<content:encoded><![CDATA[<p>Some MMO games have been criticized for having up to 5 hour &#8211; or more &#8211; queues before you can actually enter the game and play. This inspired me to create a mini-program that might help you with this by reducing the amount of times you need to actually log in. Any software that kicks you for being idle might have a use for this little program.</p>
<p><span id="more-165"></span></p>
<p><strong>IdleGuard</strong><br />
A small program (72kb) that &#8211; so far &#8211; every 5 minutes &#8220;pushes&#8221; the space key for you which should reset the ingame logout timer. It is extremely CPU cycle friendly (no loop stress/block/hang), and will require practically zero resources to keep running.</p>
<p><strong>Is it safe to use?</strong><br />
Yes. The program does not hack or manipulate any memory space of any software. It simply sends a virtual key code into the windows keyboard stream.</p>
<p><strong>Can I only use this with games?</strong><br />
It <em>should</em> work on any applications and systems that would otherwise kick you for being idle for too long.</p>
<p><strong>Vista note</strong><br />
The Windows Vista User Interface Privilege Isolation (UIPI) might prevent this program to run properly or even crash as I have not bothered to error-handle such an event. You should be able to solve this by either turning off UAC or simply run it as administrator.</p>
<p>You can download the program <a href="http://thronic.com/pubfiles/IdleGuard.zip">here</a> (win32 executable, no dependencies).</p>
<p><strong>How do I use it?</strong><br />
Just start it, it will open a small window that you can close when you don&#8217;t need it running anymore. As long as you run it, it will &#8220;push&#8221; the space key for you every 5 minutes. Remember to have your game or program in focus while it&#8217;s running.</p>
]]></content:encoded>
			<wfw:commentRss>http://thronic.com/2009/development/devlog/idleguard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Animation Engine</title>
		<link>http://thronic.com/2009/development/devlog/javascript-image-animation-engine/</link>
		<comments>http://thronic.com/2009/development/devlog/javascript-image-animation-engine/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 11:10:33 +0000</pubDate>
		<dc:creator>Dag Jonny Nedrelid</dc:creator>
				<category><![CDATA[Devlog]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://thronic.com/?p=131</guid>
		<description><![CDATA[This is a small animation engine I made to handle an animation that a good friend of mine created in 3D Max and exported to images. This should have been made in Flash for any serious use, but for a quick experiment and FPS testing it worked out fine.

You can check it out here.
You can [...]]]></description>
			<content:encoded><![CDATA[<p>This is a small animation engine I made to handle an animation that a good friend of mine created in 3D Max and exported to images. This should have been made in Flash for any serious use, but for a quick experiment and FPS testing it worked out fine.</p>
<p><span id="more-131"></span></p>
<p>You can check it out <a href="http://deepbytes.thronic.com/TheRing/" target="_blank">here</a>.</p>
<p>You can view all the javascript code simply by right-clicking and &#8220;view source&#8221; after it opens in a new window.</p>
]]></content:encoded>
			<wfw:commentRss>http://thronic.com/2009/development/devlog/javascript-image-animation-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rental Calendar Website Script</title>
		<link>http://thronic.com/2009/development/devlog/rental-calendar-website-script/</link>
		<comments>http://thronic.com/2009/development/devlog/rental-calendar-website-script/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 16:26:13 +0000</pubDate>
		<dc:creator>Dag Jonny Nedrelid</dc:creator>
				<category><![CDATA[Devlog]]></category>

		<guid isPermaLink="false">http://thronic.com/?p=118</guid>
		<description><![CDATA[A calendar solution that can calculate years up until 2038 where it meets the millennium UNIX bug. There might be a system fix for this somewhere that changes the way UNIX count seconds, but I don&#8217;t see it necessary just yet to make it support years beyond 2038.

The script is made for simple rental needs. [...]]]></description>
			<content:encoded><![CDATA[<p>A calendar solution that can calculate years up until 2038 where it meets the millennium UNIX bug. There might be a system fix for this somewhere that changes the way UNIX count seconds, but I don&#8217;t see it necessary just yet to make it support years beyond 2038.</p>
<p><span id="more-118"></span></p>
<p>The script is made for simple rental needs. If you got a cabin that you would like to rent out through the web, then you could use this script on your website to show others when the cabin is available in a simple manner.</p>
<p>You can try out the script <a title="Will open in a new window." href="/pubfiles/RentalCalendar/" target="_blank">here</a>. (admin log-in: demo // test)</p>
<p>And/or download it <a href="/pubfiles/RentalCalendar/RentalCalendar.zip">here</a>.</p>
<p>The script is made with PHP and AJAX. It requires that your server supports PHP and that you can connect to a MySQL database where you need to create a small table. Instructions for how to create the necessary SQL table is contained in the <em>settings.php</em> file.</p>
]]></content:encoded>
			<wfw:commentRss>http://thronic.com/2009/development/devlog/rental-calendar-website-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Gallery Website Script</title>
		<link>http://thronic.com/2009/development/devlog/image-gallery-website-script/</link>
		<comments>http://thronic.com/2009/development/devlog/image-gallery-website-script/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 17:03:34 +0000</pubDate>
		<dc:creator>Dag Jonny Nedrelid</dc:creator>
				<category><![CDATA[Devlog]]></category>

		<guid isPermaLink="false">http://thronic.com/?p=120</guid>
		<description><![CDATA[A generic Image Gallery script that automatically shows all pictures uploaded into its subdirectory &#8220;imagebase&#8221;, and its subdirectories.
The script comes with a search function that can search for images in all directories based on single search keywords.
The gallery supports the .GIF, .JPG and .PNG image formats.

You can check out the gallery here.
And/or download it for [...]]]></description>
			<content:encoded><![CDATA[<p>A generic Image Gallery script that automatically shows all pictures uploaded into its subdirectory &#8220;imagebase&#8221;, and its subdirectories.</p>
<p>The script comes with a search function that can search for images in all directories based on single search keywords.</p>
<p>The gallery supports the .GIF, .JPG and .PNG image formats.</p>
<p><span id="more-120"></span></p>
<p>You can check out the gallery <a href="/pubfiles/ImageGallery/" target="_blank">here</a>.</p>
<p>And/or download it for free <a href="/pubfiles/ImageGallery/ImageGallery.zip">here</a>.</p>
<p>The script is made purely in PHP and only depends on GD version 2 (for high res image sampling).</p>
]]></content:encoded>
			<wfw:commentRss>http://thronic.com/2009/development/devlog/image-gallery-website-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KeyGuard &#8211; A keylogger in C</title>
		<link>http://thronic.com/2008/development/devlog/keyguard-a-keylogger-in-c/</link>
		<comments>http://thronic.com/2008/development/devlog/keyguard-a-keylogger-in-c/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 00:15:50 +0000</pubDate>
		<dc:creator>Dag Jonny Nedrelid</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Devlog]]></category>

		<guid isPermaLink="false">http://thronic.com/?p=49</guid>
		<description><![CDATA[A small keylogger that&#8217;s easy to install. I used the Win32 API with socket/networking and windows registry manipulation, programmed in C. My goal was to create a small keylogger that can be installed just by executing a single small file.

Main KeyGuard features:

A background program that logs PC keyboard activity.
Automatic system injection by copying itself into [...]]]></description>
			<content:encoded><![CDATA[<p style="font-weight: bold;">A small keylogger that&#8217;s easy to install. I used the Win32 API with socket/networking and windows registry manipulation, programmed in C. My goal was to create a small keylogger that can be installed just by executing a single small file.</p>
<p><span id="more-49"></span></p>
<p><strong>Main KeyGuard features:</strong></p>
<ul>
<li>A background program that logs PC keyboard activity.</li>
<li>Automatic system injection by copying itself into a specified directory and adding a run value in the registry for automatic execution on startup/reboot.</li>
<li>Sends the log on e-mail when it has reached a specified amount of bytes, resets the log file for new use at every send. (Relay Server backlog will log until manual reset).</li>
<li>Consists of just 1 standalone executable with file size of 167kb (68,5kb without the icon), injects itself into the system when executed, system will remain injected with it until uninstalled as specified in source file.</li>
<li>Logs the most common keys of interest and formatting.<br />
Easy to extend its logging features.</li>
<li>Does not depend on SMTP for sending logs. Can connect to a listening KeyGuard bouncer/relay server on the Internet somewhere that will receive data and forward it and/or just save it.</li>
</ul>
<p><strong>Info from KeyGuard.c</strong></p>
<blockquote>
<pre>/*
    --
    KeyGuard

    An attempt at user activity logging by Dag J Nedrelid.
    This code is written and compiled in C.

    Designed for Windows XP clients.
    --

    A keylogger that logs the most important characters
    such as letters, numbers and common formatting. It
    can easily be extended by modifying the formatKeys[]
    array and its usage. Log is stored in a text file
    which is sent on e-mail.

    * It attempts to log in a reader-friendly way by
      logging activity under the active window titles.

    * It should be performance friendly without keeping the
      CPU towards 100% by sleeping 10 milliseconds each cycle.
      This is still fast enough to log a quick writer. 

    * It prevents logging the same key twice while same key
      is being held down in a proper way without missing the
      next key activity.

    * A mix of \r\n and HTML formatting, so it looks more
      readable on received mail and directly in text file.
      Of some reason \r\n won't trigger a newline effect in
      my text mails, and I refused to have it all on 1 line.

    * Sends you a log on e-mail and resets the log file for
      new usage. MAX_LOG_SIZE decides when to send the file.

    * The function InjectKeyGuard() is called by default:
      - It will attempt to put a copy of the file itself into
        the location defined by FILE_COPY_NAME.
      - It will attempt a windows registry modification so the
        copied file will start on every system boot/restart.

    * How to uninstall once injected:
      - Kill the process in task manager.
      - Delete the file specified in FILE_COPY_NAME
      - Delete the log file LOGFILE from same directory.
      - Delete the registry value named REGISTRY_RUN_NAME under:
        HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

    TIP: Compile with /MT and not /MD for standalone
         functionality and easy distribution.

    NOTE: Remember to link with WS2_32.lib, this code uses winsock
          to send the file through an SMTP server to an e-mail.

    The end product is a one-click keylogger that installs by itself.
    When compiled with /MT, executable file becomes ca 167KB in size.
*/</pre>
</blockquote>
<p><strong>Log output example on e-mail:</strong></p>
<blockquote>
<pre>[WINDOW: Google - Windows Internet Exp]
somesite.com

[WINDOW: Connect to somesite.com]
the username[Tab]thepassword

[WINDOW: Google - Windows Internet Exp]
I am searching stuff I should not search</pre>
</blockquote>
<p>Values such as the SMTP server to use, e-mail to receive logs &#8211; will differ in every case. It is designed for one-click execution injection, and as such it must be compiled individually with these values.</p>
<p><span style="font-style: italic; font-size: 10px;">UPDATE 24th October 2008:</span><br />
I have made a <strong>KeyGuard Relay Server</strong> (also programmed in C). This is a small linux multi-threaded server program that is able to relay connections from all <strong>KeyGuard2</strong> versions.</p>
<p>The server is useful in cases where you are not sure about what SMTP the targeted computer is using, or where the SMTP security is too strict.<br />
<strong>The KeyGuard project files</strong><br />
These files have been tested OK and been used several times with variations. I use the VC++ 2008 C compiler when making the binaries. Here are the source files &#8211; play with them, learn from them, use them wisely. Much can be improved and added, but I will not make any updates in near future as it covers what I have needed it for and I don&#8217;t have time for it. <strong></strong></p>
<p><strong>KeyGuard</strong><br />
- Sends log through a local SMTP(mail) server where it&#8217;s installed.<br />
<a href="/pubfiles/KeyGuard.zip">Download the source</a></p>
<p><strong>KeyGuard2</strong><br />
- Sends log through it&#8217;s own server, works everywhere.<br />
<a href="/pubfiles/KeyGuard2.zip">Download the source</a></p>
<p><strong>KeyGuard Relay Server</strong><br />
- Waits for authenticated calls from KeyGuard2 versions to forward the logs, and/or save them on the server itself. This is a very small multi-threaded server that can run on most linux servers as a normal user by just running the command &#8220;nohup ./KGServer &amp;&#8221; to make it keep running after you log out. Binds to a port specified in advance.<br />
<a href="/pubfiles/KGServer.zip">Download the source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thronic.com/2008/development/devlog/keyguard-a-keylogger-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP Browser</title>
		<link>http://thronic.com/2008/development/devlog/wp-browser/</link>
		<comments>http://thronic.com/2008/development/devlog/wp-browser/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 11:16:43 +0000</pubDate>
		<dc:creator>Dag Jonny Nedrelid</dc:creator>
				<category><![CDATA[Devlog]]></category>

		<guid isPermaLink="false">http://thronic.com/?p=133</guid>
		<description><![CDATA[I have a major collection of wallpapers I&#8217;ve downloaded off the Internet from free sites. I decided to make a small browser for all the images for personal use for when I need something new.

If you recognize an image that&#8217;s yours and you don&#8217;t want it in the browser for free download, let me know [...]]]></description>
			<content:encoded><![CDATA[<p>I have a major collection of wallpapers I&#8217;ve downloaded off the Internet from free sites. I decided to make a small browser for all the images for personal use for when I need something new.</p>
<p><span id="more-133"></span></p>
<p>If you recognize an image that&#8217;s yours and you don&#8217;t want it in the browser for free download, let me know and I&#8217;ll remove it completely if you provide me with enough ensuring details that you own the rights to it.</p>
<p>You can find the WPBrowser <a href="http://deepbytes.thronic.com/WPBrowser/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thronic.com/2008/development/devlog/wp-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KiKi Trix &#8211; A Tetris Clone</title>
		<link>http://thronic.com/2007/development/devlog/kiki-trix-a-tetris-clone/</link>
		<comments>http://thronic.com/2007/development/devlog/kiki-trix-a-tetris-clone/#comments</comments>
		<pubDate>Thu, 27 Dec 2007 20:23:54 +0000</pubDate>
		<dc:creator>Dag Jonny Nedrelid</dc:creator>
				<category><![CDATA[Devlog]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://thronic.com/?p=21</guid>
		<description><![CDATA[A tetris clone. Tested OK in FF2 and IE7. Programming a tetris game is a fun challenge. A basic tetris clone covers many real-time gaming mechanics that can be used outside the gaming genre as well for other types of applications.

Click here to play (opens in a new window).

]]></description>
			<content:encoded><![CDATA[<p>A tetris clone. Tested OK in FF2 and IE7. Programming a tetris game is a fun challenge. A basic tetris clone covers many real-time gaming mechanics that can be used outside the gaming genre as well for other types of applications.<br />
<span id="more-21"></span><br />
<a title="KiKi Trix" href="/pubfiles/KiKiTrix/KTrix.html" target="_blank">Click here</a> to play (opens in a new window).</p>
<p><a href="http://thronic.com/wp-content/uploads/2007/12/kikitrix.jpg"><img src="http://thronic.com/wp-content/uploads/2007/12/kikitrix.jpg" alt="" title="KiKi Trix illustration" width="456" height="764" class="aligncenter size-full wp-image-197" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://thronic.com/2007/development/devlog/kiki-trix-a-tetris-clone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3D Rotation Trig</title>
		<link>http://thronic.com/2007/development/devlog/3d-rotation-trig/</link>
		<comments>http://thronic.com/2007/development/devlog/3d-rotation-trig/#comments</comments>
		<pubDate>Sun, 23 Dec 2007 20:42:31 +0000</pubDate>
		<dc:creator>Dag Jonny Nedrelid</dc:creator>
				<category><![CDATA[Devlog]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://thronic.com/?p=30</guid>
		<description><![CDATA[I started off easy with a simple simulated z-axis rotation in a 2D script. However 2D is not 3D which is what I wanted to learn. I was eager to get a better grasp on the underlying trigonometry math of 3D rotation behavior.

Below I have created a small matrix with 8 vectors rotating around a [...]]]></description>
			<content:encoded><![CDATA[<p>I started off easy with a simple simulated z-axis rotation in a 2D script. However 2D is not 3D which is what I wanted to learn. I was eager to get a better grasp on the underlying trigonometry math of 3D rotation behavior.</p>
<p><span id="more-30"></span></p>
<p>Below I have created a small matrix with 8 vectors rotating around a center point by using the vector coordinates instead of a preset radius like I did in the 2D rotation. I&#8217;ve used DHTML for functionality and illustration. Viewing the source may help you grasp the use of the formula.</p>
<p><a href="/pubfiles/Trig-rotation/3D-Rotation-Trig.html" target="_blank">Click here</a> to open the script in a new window.</p>
<p>In the 2D script I used this formula to rotate around a center point:</p>
<blockquote><p><code><span style="color: #0066cc;">x = Math.cos(Radian)*XRadius(hypotenuse)<br />
y = Math.sin(Radian)*YRadius(hypotenuse)</span></code></p>
<p><code><span style="color: #0066cc;">By changing the radius, you can simulate x,y rotation as well, but only on a 2D plane. It would be simulation, not real 3D. Add depth with another z calculation with the above formula, and you would have the 3D effect available.</span></code></p></blockquote>
<p>It means to give the coordinate or a vector&#8217;s &#8216;x&#8217; and/or &#8216;y&#8217; new values based on finding the radian x and y ratio through cosine and sine multiplied by hypotenuse to keep the proper center point (radius). This formula could be used for simulating 3D on a 2D plane.<br />
It could even be used for real 3D calculation, but you would need to find a way to make the rotation radius/hypotenus values work together when e.g crossing a z-axis with a y-axis rotation. When e.g. the z-rotation closes in on the y-axis, the radius of z-rotation (x) would have to be shortened accordingly, start a x-rotation as well and you have a calculation challenge.</p>
<p>Here is a formula that does the proper job of 3D calculation.<br />
It respects every axis radius/hypotenuse in regards to each other.</p>
<blockquote><p><code><span style="color: #0066cc;">// Rotation around the X axis<br />
xy = Math.cos(RadianX)*y - Math.sin(RadianX)*z<br />
xz = Math.sin(RadianX)*y + Math.cos(RadianX)*z</span></code></p>
<p><code><span style="color: #0066cc;">// Rotation around the Y axis<br />
yz = Math.cos(RadianY)*xz - Math.sin(RadianY)*x<br />
yx = Math.sin(RadianY)*xz + Math.cos(RadianY)*x</span></code></p>
<p><code><span style="color: #0066cc;">// Rotation around the Z axis<br />
zx = Math.cos(RadianZ)*yx - Math.sin(RadianZ)*xy<br />
zy = Math.sin(RadianZ)*yx + Math.cos(RadianZ)*xy</span></code></p>
<p><code><span style="color: #0066cc;">Where zx(X), zy(Y), yz(Z) are the new values to use after every calculation in a 3D space of coordinated rotation. By running this formula on every vector in my little ASCII cube matrix, I get coordinated movement based on the Radians given to it.</span></code></p></blockquote>
<p>By changing the RadianX, RadianY, RadianZ up to 2π(6.28)(360°) in this formula you control every axis rotation, and each rotation radius/hypotenuse should work in harmony. The trick here is basically how each axis calculation inherits the results from the previous.</p>
<p>It will help to repeat the chapter in a math book on trigonometry (especially sine and cosine) if you are having a hard time understanding the formula above.</p>
]]></content:encoded>
			<wfw:commentRss>http://thronic.com/2007/development/devlog/3d-rotation-trig/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
