<?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>Javascript &#8211; Rotates.org V12</title>
	<atom:link href="https://www.rotates.org/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.rotates.org</link>
	<description>The personal blog of developer, photographer and designer Lewis &#039;SEPTiMUS&#039; Lane</description>
	<lastBuildDate>Sun, 10 Jan 2010 02:43:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.rotates.org/wp-content/uploads/2025/06/cropped-rotates-logo-32x32.png</url>
	<title>Javascript &#8211; Rotates.org V12</title>
	<link>https://www.rotates.org</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">6964888</site>	<item>
		<title>nodelog IRC bot</title>
		<link>https://www.rotates.org/2010/01/10/nodelog-irc-bot/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Sun, 10 Jan 2010 02:43:58 +0000</pubDate>
				<category><![CDATA[NodeJS]]></category>
		<category><![CDATA[NodeLog]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[mirc]]></category>
		<category><![CDATA[node]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=194</guid>

					<description><![CDATA[As a little bit of an aside to &#8216;the main project&#8217; , I&#8217;ve been getting more familiar with node.js by forking a nice simple IRC bot project on github. At the moment I&#8217;ve just got it logging in an mIRC compatible format, and added some missing features to the logging, but in the future I&#8217;m [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>As a little bit of an aside to &#8216;the main project&#8217; , I&#8217;ve been getting more familiar with <a href="http://nodejs.org">node.js</a> by <a href="http://github.com/lewster32/nodelog">forking</a> a nice simple <a href="http://github.com/felixge/nodelog">IRC bot project</a> on github. At the moment I&#8217;ve just got it logging in an mIRC compatible format, and added some missing features to the logging, but in the future I&#8217;m going to extend it into a proper modular IRC bot.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">194</post-id>	</item>
		<item>
		<title>Non techies avert your eyes</title>
		<link>https://www.rotates.org/2010/01/04/non-techies-avert-your-eyes/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Mon, 04 Jan 2010 00:34:39 +0000</pubDate>
				<category><![CDATA[Archaos]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[actions]]></category>
		<category><![CDATA[board]]></category>
		<category><![CDATA[chaos]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[mechanics]]></category>
		<category><![CDATA[piece]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[spell]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=190</guid>

					<description><![CDATA[The server is really starting to take shape now. Turns and phases flow along nicely, and I&#8217;ve spent the last few days working on the spellcasting system. If you&#8217;ve read the Google Code page on Spells you&#8217;ll know that the spells themselves are simply sandboxed Javascript functions. I had thoughts before about writing some kind [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>The server is really starting to take shape now. Turns and phases flow along nicely, and I&#8217;ve spent the last few days working on the spellcasting system. If you&#8217;ve read the Google Code page on <a href="http://code.google.com/p/archaos/wiki/Spells">Spells</a> you&#8217;ll know that the spells themselves are simply sandboxed Javascript functions. I had thoughts before about writing some kind of scripting language for the spells because I wanted maximum flexibility, but it dawned on me that simply giving the spells access to the game and board data themselves in the native language would be the best way to do it. I also not long after that thought about making the validation step the spell goes through beforehand (i.e. where it tells you you can&#8217;t cast the spell here, or you can&#8217;t cast it on this piece or whatever) in a similar manner, but subsequently rejected it for one very good reason: the clients also need to validate at their end, and they may not be written in Javascript!</p>
<p>For those interested in creating a client (and because the code isn&#8217;t yet ready for viewing!) here&#8217;s the current output of a test run on the server. Note that games, pieces and spells have a unique game ID, which is a letter followed by an incrementing numeric value. One of the current things I&#8217;m working on is cleaning up the code so all possible references are made to these UIDs, and not directly to the objects, as this will make things safer and more manageable within the engine at the expense of a little bit of performance (no doubt I&#8217;ll rewrite much of this at a later date so there are two &#8216;levels&#8217; of code; the UID data-driven level that the users interact with, and the deeper object-driven stuff that processes things.</p>
<pre class="javascript" name="code">{
  "turn" : 1,
  "phase" : "select_spell",
  "interaction" : "all",
  "finished" : true,
  "actions" : [
    {
      "type" : "select_spell",
      "player" : "lewster32",
      "time" : 1262563476,
      "data" : {
        "spell" : "s0"
      }
    },
    {
      "type" : "select_spell",
      "player" : "bobster16",
      "time" : 1262563476,
      "data" : {
        "spell" : "s6"
      }
    }
  ]
}
</pre>
<pre class="javascript" name="code">{
  "turn" : 1,
  "phase" : "cast",
  "interaction" : "sequence",
  "finished" : true,
  "actions" : [
    {
      "type" : "cast",
      "player" : "lewster32",
      "time" : 1262563476,
      "data" : {
        "spell" : "s0",
        "target" : {
          "x" : 0,
          "y" : 1
        }
      }
    },
    {
      "type" : "spawn",
      "player" : "lewster32",
      "time" : 1262563476,
      "data" : {
        "x" : 0,
        "y" : 1,
        "occupant" : {
          "uid" : "p2",
          "owner" : "lewster32",
          "properties" : {
            "movement" : 1,
            "combat" : 7,
            "defense" : 8,
            "maneuver" : 6,
            "resistance" : 4
          }
        }
      }
    },
    {
      "type" : "succeeded",
      "player" : "lewster32",
      "time" : 1262563476,
      "data" : {
        "spell" : "s0",
        "target" : {
          "x" : 0,
          "y" : 1
        }
      }
    },
    {
      "type" : "end_turn",
      "player" : "lewster32",
      "time" : 1262563476
    },
    {
      "type" : "cast",
      "player" : "bobster16",
      "time" : 1262563476,
      "data" : {
        "spell" : "s6",
        "target" : {
          "x" : 11,
          "y" : 1
        }
      }
    },
    {
      "type" : "spawn",
      "player" : "bobster16",
      "time" : 1262563476,
      "data" : {
        "x" : 11,
        "y" : 1,
        "occupant" : {
          "uid" : "p3",
          "owner" : "bobster16",
          "properties" : {
            "movement" : 1,
            "combat" : 6,
            "defense" : 5,
            "maneuver" : 2,
            "resistance" : 4
          }
        }
      }
    },
    {
      "type" : "succeeded",
      "player" : "bobster16",
      "time" : 1262563476,
      "data" : {
        "spell" : "s6",
        "target" : {
          "x" : 11,
          "y" : 1
        }
      }
    },
    {
      "type" : "end_turn",
      "player" : "bobster16",
      "time" : 1262563476
    }
  ]
}
</pre>
<p>These are what every player will receive at the end of each phase. They contain each action performed by the players in the order that they performed them, and timestamped for reference and backup purposes. Players have relatively limited access to the game in terms of actions, just like in the original game. A player may select spells, cast spells, move and attack pieces and end their turn. From these actions however, more actions may occur, so a player casting a spell on tile x will set off a chain of actions, where the server rolls against the spell&#8217;s chance, then (if successful) performs the spell&#8217;s effect, which may be to spawn a new piece or whatever.</p>
<p>Soon I&#8217;ll be locking down the format of these outputs, and documenting the errors and notices a user receives directly. This will allow for anyone wishing to do so to begin planning or working on a client &#8211; and I sincerely hope people do!</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">190</post-id>	</item>
		<item>
		<title>What have I created?</title>
		<link>https://www.rotates.org/2009/12/29/what-have-i-created/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Tue, 29 Dec 2009 00:47:07 +0000</pubDate>
				<category><![CDATA[Archaos]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[server]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=184</guid>

					<description><![CDATA[SCENE: DANK LABORATORY FULL OF OLD RUSTING BULBOUS MACHINERY, GLOWING FILAMENTS AND RAIN DRIPPING THROUGH THE OPEN ROOF ONTO THE STONE FLOOR Lew: (Screaming) &#8220;MUHAHAHAHA!! IT&#8217;S ALIVE&#8221; Ahem. Yes, I&#8217;ve been beavering away over the last few days and I can finally reveal a proper screenshot of some proper code doing something. Unfortunately, I&#8217;ve not [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>SCENE: DANK LABORATORY FULL OF OLD RUSTING BULBOUS MACHINERY, GLOWING FILAMENTS AND RAIN DRIPPING THROUGH THE OPEN ROOF ONTO THE STONE FLOOR</strong></p>
<p>Lew: (Screaming) &#8220;MUHAHAHAHA!! IT&#8217;S ALIVE&#8221;</p>
<p>Ahem. Yes, I&#8217;ve been beavering away over the last few days and I can finally reveal a proper screenshot of some proper code doing something. Unfortunately, I&#8217;ve not started on a client yet, and I&#8217;m using a quickly thrown together browser-based console to work with it. However, it <em>is</em> a screenshot, and so I&#8217;ll upload it!</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-185" title="archaos-local" src="https://rotates.org/wp-content/uploads/2009/12/archaos-local.png" alt="" width="529" height="671" srcset="https://www.rotates.org/wp-content/uploads/2009/12/archaos-local.png 529w, https://www.rotates.org/wp-content/uploads/2009/12/archaos-local-236x300.png 236w" sizes="(max-width: 529px) 100vw, 529px" /></p>
<p>One of the fantastic bonuses of writing in Javascript is I have an interpreter with a great debugging suite at my disposal right from the outset with no messing on &#8211; Archaos&#8217;s core code is designed to run locally in a browser as well as server-side, and an adaptive messaging system will smooth the whole experience out so that what goes in and what comes out is the same wherever the clients or the servers are located.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">184</post-id>	</item>
		<item>
		<title>For people with Javascript-shaped eyeballs</title>
		<link>https://www.rotates.org/2009/12/26/for-people-with-javascript-shaped-eyeballs/</link>
					<comments>https://www.rotates.org/2009/12/26/for-people-with-javascript-shaped-eyeballs/#comments</comments>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Sat, 26 Dec 2009 22:51:17 +0000</pubDate>
				<category><![CDATA[Archaos]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Google Code]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[planning]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[Wiki]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=182</guid>

					<description><![CDATA[I&#8217;ve started fleshing out the wiki on Archaos&#8217;s Google Code page &#8211; certainly worth a look if you&#8217;ve any technical interest in the project. Take a look and let me know your thoughts &#8211; I&#8217;ll be adding more content to the wiki as I sort out through my stacks of notes.]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve started fleshing out the <a href="http://code.google.com/p/archaos/w/list">wiki</a> on Archaos&#8217;s <a href="http://code.google.com/p/archaos/">Google Code</a> page &#8211; certainly worth a look if you&#8217;ve any technical interest in the project. Take a look and let me know your thoughts &#8211; I&#8217;ll be adding more content to the wiki as I sort out through my stacks of notes.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.rotates.org/2009/12/26/for-people-with-javascript-shaped-eyeballs/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">182</post-id>	</item>
		<item>
		<title>ColorShift 0.6</title>
		<link>https://www.rotates.org/2009/11/28/colorshift-0-6/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Sat, 28 Nov 2009 20:12:38 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[Attributes]]></category>
		<category><![CDATA[Background Color]]></category>
		<category><![CDATA[Change]]></category>
		<category><![CDATA[Colors]]></category>
		<category><![CDATA[Colours]]></category>
		<category><![CDATA[Global Change]]></category>
		<category><![CDATA[Hue Saturation]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Offsets]]></category>
		<category><![CDATA[Page Elements]]></category>
		<category><![CDATA[Selectors]]></category>
		<category><![CDATA[Slider]]></category>
		<category><![CDATA[Struggle]]></category>
		<category><![CDATA[Style Element]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=134</guid>

					<description><![CDATA[Sooner rather than later it seems, you can now download Rotates ColorShift 0.6 and bask in its amazingness. The main change is how you set your selectors; instead of writing your own jQuery to target the elements you want to change, you feed rotColShiftOpts.cssTransforms with an array of objects. This is what Rotates.org uses: [ [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Sooner rather than later it seems, you can now <a title="Rotates ColorShift 0.6" href="https://rotates.org/wp-content/plugins/download-monitor/download.php?id=1">download Rotates ColorShift 0.6</a> and bask in its amazingness.</p>
<p>The main change is how you set your selectors; instead of writing your own jQuery to target the elements you want to change, you feed rotColShiftOpts.cssTransforms with an array of objects. This is what Rotates.org uses:</p>
<pre name="code" class="javascript">[
	{
		selector: "a, h2, h3, h4, h5",
		styles: [
			"color"
		]
	},
	{
		selector: "#header, #searchsubmit",
		styles: [
			"background-color"
		]
	}
]</pre>
<p>Actually it was a bit of a struggle, as I wanted to abandon the DOM-based approach to changing the CSS of every individual element, and go for a global stylesheet change. Easy you say? Just .append/.text a style element. Well, yes, in all decent browsers. Sadly, the IE family seems unwilling to let you tamper with the style element so easily, and jQuery (at the moment) has no elegant way around it. So out came the &#8216;Lew hacking pants&#8217; with the following solution:</p>
<pre name="code" class="javascript">ieStyle = document.createStyleSheet();

$.each(rotColShiftOpts.cssTransforms, function(i, ttrans) {
	newColor = getColorWithOffsets(hue, saturation, brightness, ttrans.offsets);
	var tstyles = "";
	$.each(ttrans.attributes, function(i, ts) {
		tstyles += ts + ": " + newColor + ";";
	});
	tmpTransforms += ttrans.selector + "{ " + tstyles + " } ";
});

if ($.browser.msie) { // *sigh*
	ieStyle.cssText = tmpTransforms;
}
else {
	$("style[title='colshift']").text(tmpTransforms);
}</pre>
<p>Anyway the result is that you a) get a better, easier to use syntax for applying the changes to page elements, and b) can be safe in the knowledge the styles will be applied to <em>all</em> elements on the page (even generated ones)  just like CSS should be. Enjoy!</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">134</post-id>	</item>
	</channel>
</rss>
