<?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>Webdev &#8211; Rotates.org V12</title>
	<atom:link href="https://www.rotates.org/category/webdev/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>Thu, 26 Jun 2025 19:01:24 +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>Webdev &#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>CodePen greatest hits pt. 1</title>
		<link>https://www.rotates.org/2025/06/26/codepen-greatest-hits-pt-1/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Thu, 26 Jun 2025 19:01:24 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Past]]></category>
		<category><![CDATA[Plugs]]></category>
		<guid isPermaLink="false">https://www.rotates.org/?p=399</guid>

					<description><![CDATA[I&#8217;ve always enjoyed short, snappy little projects that deliver a quick dose of dopamine, and I&#8217;m a big fan of CodePen as a way to exercise that &#8216;tinker and play&#8217; attitude. One of my earlier and more involved pens was the result of a thought: &#8220;What if 8-bit but open world?&#8221;. A great candidate seemed [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve always enjoyed short, snappy little projects that deliver a quick dose of dopamine, and I&#8217;m a big fan of <a href="https://codepen.io/lewster32">CodePen</a> as a way to exercise that &#8216;tinker and play&#8217; attitude.</p>



<p>One of my earlier and more involved pens was the result of a thought: <em>&#8220;What if 8-bit but open world?&#8221;</em>. A great candidate seemed to be Jet Set Willy, and luckily there&#8217;s an absolutely excellent <a href="https://skoolkit.ca/disassemblies/jet_set_willy/index.html">disassembly of the game</a> available. It was fascinating to dive into the data and see how efficiently everything was packed in there while remaining pretty readable. Before the days of widespread fast and convenient compression, programmers just squeezed things down to the last bit.</p>



<p>I ended up writing various routines to process things in a way that looked true to the original, including figuring out how to parse the attributes (the way the Speccy encoded colour and more into 8&#215;8 pixel blocks with a single byte) and generate all of the graphics, rooms and movement patterns.</p>



<p>It&#8217;s not complete unfortunately &#8211; the arrows and the rope swinging routine got the better of me at the time, but I still think it&#8217;s still a really cool little bit of nostalgia, and decently structured (for the time at least; this is pre-ES6 JavaScript).</p>



<p>Anyway, here it is in all its glory. Enjoy!</p>



<div class="wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper"><iframe id="cp_embed_MKQzPm" src="//codepen.io/anon/embed/MKQzPm?height=450&amp;theme-id=dark&amp;slug-hash=MKQzPm&amp;default-tab=result" height="450" scrolling="no" frameborder="0" allowfullscreen allowpaymentrequest name="CodePen Embed MKQzPm" title="CodePen Embed MKQzPm" class="cp_embed_iframe" style="width:100%;overflow:hidden">CodePen Embed Fallback</iframe></div>



<p>I quite like the big comment attempting to explain all the bitwise stuff:</p>



<pre class="wp-block-code" style="font-size:12px"><code>    // The attribute format is a single byte containing 2x 1-bit values for flash and bright, then 2x 3-bit values for paper and ink
    // So the value 221 (binary 11011101) broken down becomes flash 1 (1), bright 1 (1), paper 011 (3) and ink 101 (5)
    // To extract these, we perform up to two operations:
    // 1. We perform a bitwise AND on the value with a bitmask of corresponding length for how many bits you want to extract - if 
    // we're looking for a boolean here (using a single bit in the mask), we can just coerce it with the !! operator as the outcome
    // will be zero for false and non-zero for true
    // 2. We perform a bitwise shift to the right so that the bits we're interested in are at far right side
    //
    // Examples:
    // To get the bright value (1 - true) from 221 (11011101):
    // 221 &amp; 64 = 64  (binary: 11001101 AND 01000000 becomes 01000000)
    // !!64 = true    (binary: 01000000 is non-zero, so it becomes true)
    //
    // To get the paper value (3) from 221 (11011101):
    // 221 &amp; 56 = 24  (binary: 11011101 AND 00111000 becomes 00011000)
    // 24 &gt;&gt; 3  = 3   (binary: 00011000 shifted right 3 times becomes 00000011)
    //
    // Quite a nice explanation of what you can do with bitwise operators can be found here:
    // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators
    // 
    // P.S. I revised this whole intro in September 2020 as I realised I didn't understand bitwise operations as well as I should
    // have. Littered throughout this code are examples of the old inefficient method of "shift then and", as opposed to the
    // 'correct' way of doing things (especially for single bits). No doubt there's more on this for me to learn but it's good to
    // be honest.</code></pre>



<p>I&#8217;ll write up a few more of these for other pens I&#8217;ve done if there&#8217;s any interest. Let me know in the comments or via one of my socials if you&#8217;d like to know more about any of these, or indeed anything else I&#8217;ve done!</p>



<ul class="wp-block-social-links is-layout-flex wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-bluesky  wp-block-social-link"><a href="https://bsky.app/profile/lewster32.dev" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Bluesky</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a href="https://x.com/lewster32" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-codepen  wp-block-social-link"><a href="https://codepen.io/lewster32" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z"></path></svg><span class="wp-block-social-link-label screen-reader-text">CodePen</span></a></li></ul>



<p></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">399</post-id>	</item>
		<item>
		<title>Archaos: beta 1</title>
		<link>https://www.rotates.org/2021/12/05/archaos-beta-1/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Sun, 05 Dec 2021 13:29:01 +0000</pubDate>
				<category><![CDATA[Archaos]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[Webdev]]></category>
		<guid isPermaLink="false">https://www.rotates.org/?p=377</guid>

					<description><![CDATA[It&#8217;s been a while has it not? Well, here we are near the end of 2021 and what do I have but&#8230; a beta release of Archaos! Yes, that&#8217;s right, the game I&#8217;ve been working on most of my adult life finally gets a public, playable release! This iteration has taken just over a month [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>It&#8217;s been a while has it not?</p>



<p>Well, here we are near the end of 2021 and what do I have but&#8230; a beta release of Archaos! Yes, that&#8217;s right, the game I&#8217;ve been working on most of my adult life finally gets a public, playable release!</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" src="https://rotates.org/archaos/2021/images/web/logo.png" alt=""/></figure></div>



<p>This iteration has taken just over a month from start to beta, and I&#8217;m pretty happy with where it is right now. There are of course bugs, inconsistencies, and annoyances, as well as some big missing features (computer opponents and multiplayer being the ones I feel most will point out) but I hope to address these in time.</p>



<p>If you want to play it now, you can do so here: <a href="https://www.rotates.org/archaos/2021/" target="_blank" rel="noreferrer noopener">https://www.rotates.org/archaos/2021/</a></p>



<p>It currently has no network multiplayer or computer opponents (things I plan on addressing in due time) and has some bugs and inconsistencies, but I&#8217;ve managed to have a decent amount of relatively &#8216;vanilla&#8217; experiences now playing the game on my own.</p>



<p>The source code is also public, available at my Github: <a rel="noreferrer noopener" href="https://github.com/lewster32/archaos" target="_blank">https://github.com/lewster32/archaos</a> &#8211; please do feel free to report any bugs or requests features etc. on here, and I&#8217;ll do my best to get around to them.</p>



<p>Thanks for holding on there, it&#8217;s been a journey.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">377</post-id>	</item>
		<item>
		<title>Phaser Isometric plug-in</title>
		<link>https://www.rotates.org/2014/08/08/phaser-isometric-plug-in/</link>
					<comments>https://www.rotates.org/2014/08/08/phaser-isometric-plug-in/#comments</comments>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Fri, 08 Aug 2014 14:53:43 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Phaser Isometric]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[axonometric]]></category>
		<category><![CDATA[dimetric]]></category>
		<category><![CDATA[Isometric]]></category>
		<category><![CDATA[Phaser]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[plugin]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=358</guid>

					<description><![CDATA[Recently, as part of my continued work on Archaos (yes, I&#8217;m still working on it, never fear!) I put together an isometric (well, axonometric to be a little less precise) renderer for Richard Davey&#8216;s wonderful Phaser HTML5 game development framework. It&#8217;s got a nice adjustable axonometric projection helper, a simple and fast physics engine based on [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Recently, as part of my continued work on Archaos (yes, I&#8217;m still working on it, never fear!) I put together an isometric (well, axonometric to be a little <em>less</em> precise) renderer for <a href="http://twitter.com/photonstorm" target="_blank" rel="noopener noreferrer">Richard Davey</a>&#8216;s wonderful <a href="http://phaser.io" target="_blank" rel="noopener noreferrer">Phaser</a> HTML5 game development framework. It&#8217;s got a nice adjustable axonometric projection helper, a simple and fast physics engine based on Phaser&#8217;s own bread-and-butter Arcade Physics, and it&#8217;s probably close to production ready. I deliberately kept the system simple, and the API as close to the existing Phaser API as possible to allow for quick adoption, and it plugs in pretty much seamlessly.</p>
<p>You can view the microsite I put together for it <a href="http://rotates.org/phaser/iso" target="_blank" rel="noopener noreferrer">here</a>, browse the repo (and maybe even if you feel like it, or spot some of my horrendous and inevitable broken maths, contribute) on GitHub <a href="https://github.com/lewster32/phaser-plugin-isometric/" target="_blank" rel="noopener noreferrer">here</a>, view the API docs <a href="http://udof.org/phaser/iso/doc/Phaser.Plugin.Isometric.html" target="_blank" rel="noopener noreferrer">here</a>, and I&#8217;ll also be posting some simple examples to demonstrate the various features shortly. Enjoy!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.rotates.org/2014/08/08/phaser-isometric-plug-in/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">358</post-id>	</item>
		<item>
		<title>Future proofing</title>
		<link>https://www.rotates.org/2013/03/23/future-proofing/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Sat, 23 Mar 2013 20:26:31 +0000</pubDate>
				<category><![CDATA[Archaos]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[NodeJS]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=337</guid>

					<description><![CDATA[For the last few weeks I&#8217;ve been adding in two very important systems to Archaos &#8211; namely real-time communications via TCP, and the use of a database back-end for the server. The first makes games much more responsive, and allows the server to inform connected players of actions as and when they happen. It will [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>For the last few weeks I&#8217;ve been adding in two very important systems to Archaos &#8211; namely real-time communications via TCP, and the use of a database back-end for the server. The first makes games much more responsive, and allows the server to inform connected players of actions as and when they happen. It will also pave the way for an exciting addition I have planned, which will (hopefully) combat the inevitable pacing problems that arise from typical turn-based games. If you want to know more about what I&#8217;m getting at, give <a href="http://www.lostgarden.com/2005/06/space-crack-fixing-turn-based-strategy.html" target="_blank">this excellent article</a> a read.</p>
<p><div id="attachment_339" style="width: 213px" class="wp-caption alignright"><a href="https://rotates.org/wp-content/uploads/2013/03/servers.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-339" class="size-medium wp-image-339" alt="The database server, client and game server respectively." src="https://rotates.org/wp-content/uploads/2013/03/servers-203x300.png" width="203" height="300" srcset="https://www.rotates.org/wp-content/uploads/2013/03/servers-203x300.png 203w, https://www.rotates.org/wp-content/uploads/2013/03/servers.png 514w" sizes="(max-width: 203px) 100vw, 203px" /></a><p id="caption-attachment-339" class="wp-caption-text">The database server, client and game server respectively.</p></div></p>
<p>The second addition is a solid database-driven server. Until now, as a temporary solution I&#8217;d been storing all of the game data in a single file. When the server opened, it read all of the users and games from this file, and then stored all of the data in memory. If the data changed, the server would periodically save the entire file back to disk. The server would only write the data to disk if it had changed, and only once every so often &#8211; this kept writes to a minimum. The solution was fine for small scale testing, but it would not have scaled up well &#8211; quickly consuming all of the memory in the server machine, as well as being difficult to manage.</p>
<p>Now all of the data is stored on a <a href="http://www.mongodb.org/" target="_blank">mongoDB</a> server in essentially the same format. The game server is then only responsible for the manipulation of the data, and not the storage and management of it. The game server itself is relatively simple in its approach; when a user sends an action, it loads the game, determines if the action can be performed, and if so what the outcomes are. It then saves the changed game back to the database and sends the actions to all of the connected players (which it does via TCP). The game server never keeps games, users, units or anything else in memory for longer than it needs to check or manipulate it. There are no special objects or instances; every function works only on the raw data. I may introduce some caching to reduce database operations later but at this stage the setup is fairly efficient.</p>
<p>So, I have what I feel is a solid base now, I&#8217;ve got some of the actions in and working (such as creating, joining and leaving games, unit movement and engagement) and now it&#8217;s just a case of writing the client-side stuff for the remaining actions, adding in the spell system and then getting it out there for public beta testing!</p>
<p>Look out soon for another post on the spell system and how I intend to tweak it to provide a more balanced start to each game.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">337</post-id>	</item>
		<item>
		<title>UI and the lobby</title>
		<link>https://www.rotates.org/2013/02/21/ui-and-the-lobby/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Thu, 21 Feb 2013 14:25:48 +0000</pubDate>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Archaos]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=334</guid>

					<description><![CDATA[I&#8217;ve spent the last two months refactoring a lot of code, tidying up and making everything more manageable. I&#8217;ve also spent the time working on implementing a Feathers-based GUI so that the game works more like a game should (i.e. with an opening screen, the ability to select which game you want to play and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve spent the last two months refactoring a lot of code, tidying up and making everything more manageable. I&#8217;ve also spent the time working on implementing a <a href="http://feathersui.com/" target="_blank">Feathers</a>-based GUI so that the game works more like a game should (i.e. with an opening screen, the ability to select which game you want to play and so on).</p>
<p>I won&#8217;t lie, Feathers has been difficult to get my head around &#8211; it seems to be an excellent library once you&#8217;ve sussed it out, but it&#8217;s not well documented (relying mainly on examples rather than proper documentation, and leaving you to even look at the library&#8217;s code itself to figure some things out) and took me a long time to get comfortable with. The upshot is I now have a very nice, fast, flexible native-feeling interface to Archaos which will work the same on all platforms.</p>
<p>You can see a short video of me demonstrating it on my desktop below &#8211; and you&#8217;ll just have to take my word for it that it works just as well on a mobile device <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><iframe class="youtube-player" width="563" height="317" src="https://www.youtube.com/embed/WQFsbJwqC0U?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></p>
<p>None of what you see here is mocked up &#8211; the games you&#8217;ve joined or created are being retrieved from the server, and their details are being displayed. The isometric mini-map shows a real-time view of the game, and will update even while you view it from the lobby.</p>
<p>More features will need to be added to make the lobby fully featured, such as an interface that allows you to add friends (and so see their newly created games and join them), the ability to sort and filter the games by various criteria and of course the &#8216;create new game&#8217; screen itself, where you&#8217;ll be able to set things such as the board size, maximum number of players, round/turn lengths and so on.</p>
<p>One last thing &#8211; I had a discussion with one of my friends about Archaos and realised that the words I was using to describe various things didn&#8217;t make sense. Because of this conversation I&#8217;ve settled on the following:</p>
<ul>
<li><strong>Board</strong>: The rectangular grid upon which the game is played.</li>
<li><strong>Unit</strong>: A piece on the board, be it a wizard, wall, creature or corpse.</li>
<li><strong>Turn</strong>: An individual player&#8217;s &#8216;go&#8217; &#8211; i.e. selecting a spell, casting a spell or moving his/her units.</li>
<li><strong>Phase</strong>: The three distinct gameplay segments, consisting of spell selection, spell casting and unit movement. Technically a fourth non-playable phase happens after spell casting and before unit movement, in which gooey blobs and magic fire spread, magic wood and castles/citadels may disappear and so on. Other phases may be introduced with new game modes.</li>
<li><strong>Round</strong>: One set of phases, beginning in Classic mode with spell selection, and ending after the last player&#8217;s turn in the unit movement phase.</li>
</ul>
<p>This means that each round has several phases, and within each phase each active player has a turn. Not all phases force the players to take turns one after the other &#8211; the spell selection phase will allow all players to select their spells together, and the phase will only end when either all of the players have selected a spell (or cancelled) or the time runs out for that phase. The spell casting and movement phases that follow will work as normal, with every player taking their turn one after another in the correct order. Timers here will work on an individual&#8217;s turn, so each player will have (for instance) five minutes to cast their spell, before the game cancels their turn and moves on to the next player. The same goes for the movement phase&#8217;s turns. All of this will of course be configurable upon creation of a new game.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">334</post-id>	</item>
		<item>
		<title>Meet the cast</title>
		<link>https://www.rotates.org/2012/11/14/meet-the-cast/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Wed, 14 Nov 2012 22:08:07 +0000</pubDate>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Archaos]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=296</guid>

					<description><![CDATA[I&#8217;m happy (for now) with the performance I&#8217;m getting on all tested devices, and so I&#8217;ve spent the last few days on the units and visual tweaks. The coloured background is now back in (and more subtle, like the original concepts I posted before) and I&#8217;ve painstakingly redrawn each of the original creatures from the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;m happy (for now) with the performance I&#8217;m getting on all tested devices, and so I&#8217;ve spent the last few days on the units and visual tweaks. The coloured background is now back in (and more subtle, like the <a title="Going solo" href="https://rotates.org2012/09/27/going-solo/" target="_blank" rel="noopener">original concepts I posted before</a>) and I&#8217;ve painstakingly redrawn each of the original creatures from the game, keeping as true to the originals as I can while injecting a bit more detail and colour variation.</p>
<p><div id="attachment_297" style="width: 573px" class="wp-caption aligncenter"><a href="https://www.rotates.org/wp-content/uploads/2012/11/the-cast.png"><img decoding="async" aria-describedby="caption-attachment-297" class="wp-image-297 size-large" title="the-cast" src="https://www.rotates.org/wp-content/uploads/2012/11/the-cast-563x317.png" alt="" width="563" height="317" srcset="https://www.rotates.org/wp-content/uploads/2012/11/the-cast-563x317.png 563w, https://www.rotates.org/wp-content/uploads/2012/11/the-cast-300x169.png 300w, https://www.rotates.org/wp-content/uploads/2012/11/the-cast.png 1136w" sizes="(max-width: 563px) 100vw, 563px" /></a><p id="caption-attachment-297" class="wp-caption-text">Plenty for the blobs to eat&#8230;</p></div></p>
<p>One of the important factors for me is to give every unit a distinct presence. I&#8217;ve kept myself within a relatively small palette of colours, but tried to ensure that every unit is easily discernible. My first test had Hydras, Green Dragons, Gooey Blobs and to a lesser extent Crocodiles all looking very similar due to them using the same green. I&#8217;ve now varied the colours a bit to make the Hydra more yellowish, and given the Crocodile a tan belly. This will help when the board gets cluttered with units &#8211; especially given the isometric perspective which serves to make the board look even more hectic.</p>
<p>There are a few units I&#8217;m not entirely happy with at the moment &#8211; the Gryphon looks a little bit like a big goose or something, and needs to look more eagle-like. The Wall presented an interesting challenge and I decided it&#8217;d be best if I rendered it isometrically. I may yet do the same for the other large structural units too (i.e. Dark Citadel and Magic Castle).</p>
<p>The &#8216;classic&#8217; unit set comprises 286 separate sprites, with separate sprites for left and right (because of the edge lighting always being on the right)  although some units end up with duplicates for various reasons; the Gorilla for instance, which looks the same from either direction &#8211; or the Vampire, whose cape blowing in the wind should always go in the same direction. An absolute godsend during this process has been <a href="http://www.codeandweb.com/texturepacker" target="_blank" rel="noopener">TexturePacker</a> &#8211; which has meant I&#8217;ve been able to quickly create, change and update a very optimised single sprite sheet with ease.</p>
<p>As well as these visual bits and bobs, the client now connects to the proper server (rather than a quickly hacked together server) and it can now manage multiple games. This means that I&#8217;m closing in on that first big milestone: a properly playable alpha version . Shortly after the game reaches playable alpha, I&#8217;ll be announcing my plans for beta testing.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">296</post-id>	</item>
		<item>
		<title>Optimisation</title>
		<link>https://www.rotates.org/2012/11/11/optimisation/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Sun, 11 Nov 2012 17:27:17 +0000</pubDate>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Archaos]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=287</guid>

					<description><![CDATA[I&#8217;ve done an awful lot in the last week or so on Archaos. Primarily the focus has been on optimisation, as it quickly became apparent that as3isolib was simply not fast enough for the job at hand. This led me to explore the possibility of using Starling, a fantastic 2D-on-the-GPU framework, which tries to remain [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve done an awful lot in the last week or so on Archaos. Primarily the focus has been on optimisation, as it quickly became apparent that <a href="http://code.google.com/p/as3isolib/" target="_blank">as3isolib</a> was simply not fast enough for the job at hand. This led me to explore the possibility of using <a href="http://www.starling-framework.org/" target="_blank">Starling</a>, a fantastic 2D-on-the-GPU framework, which tries to remain true to the standard AS3 display list as much as possible.</p>
<p>This of course meant I had to rewrite my entire render stack from the ground up. Bummer.</p>
<p>After a few days of building and tinkering with my own Starling-powered custom and very lightweight isometric rendering engine, the frame rates began to climb and climb. Today, after reading up on it a bit more, I&#8217;ve managed to get the game pretty speedy.</p>
<p><div id="attachment_288" style="width: 573px" class="wp-caption aligncenter"><a href="https://rotates.org/wp-content/uploads/2012/11/lots-o-dragons.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-288" class="size-large wp-image-288" title="lots-o-dragons" src="https://rotates.org/wp-content/uploads/2012/11/lots-o-dragons-563x316.png" alt="" width="563" height="316" srcset="https://www.rotates.org/wp-content/uploads/2012/11/lots-o-dragons-563x316.png 563w, https://www.rotates.org/wp-content/uploads/2012/11/lots-o-dragons-300x168.png 300w, https://www.rotates.org/wp-content/uploads/2012/11/lots-o-dragons.png 1436w" sizes="auto, (max-width: 563px) 100vw, 563px" /></a><p id="caption-attachment-288" class="wp-caption-text">A whole lotta dragons</p></div></p>
<p>Above is a 200&#215;200 board (that&#8217;s 40,000 squares) with approximately 20,000 animated, interactive golden dragons nodding away at just under 5 frames per second on my (admittedly pretty powerful) PC. Now this kind of test is pretty unrealistic, but it demonstrates what the engine is now capable of pretty well.</p>
<p>I&#8217;ve included further optimisations such as clipping (items off-screen are not drawn, which speeds things up considerably) and making use of a single &#8216;Texture Atlas&#8217; for all of the units (basically a sprite sheet &#8211; gives a huge performance boost).</p>
<p>I&#8217;ve deployed some tests to my iPad 1 and my iPhone 4S and they&#8217;re running pretty nicely on both (my iPad is pretty much past it now but still churns the game out at a good 30-40fps) which makes me very happy indeed &#8211; especially in comparison to earlier last week when I deployed the as3isolib version to my iPhone and it ran at about 2fps!</p>
<p>I&#8217;ve also added other little visual touches and niceties (such as units jumping/flying between tiles rather than just sliding across) and have plans to add some really fun little things to make the whole experience of wizards and creatures fighting with one another all the more satisfying.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">287</post-id>	</item>
		<item>
		<title>Expressing my love</title>
		<link>https://www.rotates.org/2012/01/04/expressing-my-love/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Wed, 04 Jan 2012 00:24:06 +0000</pubDate>
				<category><![CDATA[Archaos]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[NodeJS]]></category>
		<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=255</guid>

					<description><![CDATA[Over the last few days I&#8217;ve been planning, and then implementing the RESTful communication part of the server, and this has been built on top of Express&#8216;s fantastic routing. The next few days will see me implementing the rest of the current game logic on top of this routing, using the HTTP GET and POST [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Over the last few days I&#8217;ve been planning, and then implementing the RESTful communication part of the server, and this has been built on top of <a href="http://expressjs.com/" target="_blank">Express</a>&#8216;s fantastic routing. The next few days will see me implementing the rest of the current game logic on top of this routing, using the HTTP GET and POST methods and simple URI schemes in order to provide any client with a stateless, efficient way of communicating with the server.</p>
<p>For example, a client could request &#8216;<code>/games</code>&#8216; from the server and receive a list of games, each with its vital stats (players, board size etc). A client can then request to see more on an individual game by requesting &#8216;<code>/games/game01</code>&#8216; for instance. A client can then finally choose to get the status of the game from a particular point via &#8216;<code>/games/game01/update/20</code>&#8216; which will return all the actions from action 20 and above, or alternatively the client can request &#8216;<code>/games/game01/update/1325635230240</code>&#8216; which retrieves the actions from after that timestamp. The server determines whether a request called for a timestamp or an action ID easily because of the huge numerical difference between the likely amount of actions in a game and the value of a typical timestamp.</p>
<p>I have also decided (for now at least) to focus on JSON as the primary format for data from the server &#8211; I had intended to explore other formats such as XML, <a href="http://bsonspec.org/" target="_blank">BSON</a> and <a href="http://msgpack.org/" target="_blank">MessagePack</a> but keeping things in JSON seems to be efficient enough at the moment.</p>
<p>Once the server is returning everything correctly using this new URI structure, I&#8217;ll shift my focus to the client for a while, and get some of the boring stuff such as creating/editing users and access control sorted out. I&#8217;m being purposely very careful about having something solid and playable before I go and start with the spell phase, and all of the delightful things that brings with it!</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">255</post-id>	</item>
		<item>
		<title>Errors and actions</title>
		<link>https://www.rotates.org/2011/12/18/errors-actions/</link>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Sun, 18 Dec 2011 01:22:59 +0000</pubDate>
				<category><![CDATA[Archaos]]></category>
		<category><![CDATA[Javascript]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=248</guid>

					<description><![CDATA[I&#8217;ve been getting into a routine of testing, re-writing and bolstering everything over the past week or two. This is in direct contrast to my usual routine of writing massive blocks of code without testing, then firing it up and watching it fail in multiple places, then lose the will to continue (something perhaps familiar [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve been getting into a routine of testing, re-writing and bolstering everything over the past week or two. This is in direct contrast to my usual routine of writing massive blocks of code without testing, then firing it up and watching it fail in multiple places, then lose the will to continue (something perhaps familiar to many developers) &#8211; so this time making sure every routine is working efficiently and giving me verbose feedback in every possible situation has been high on my priority list.</p>
<p>Tonight I implemented error codes and matching error messages &#8211; boring I know, but it&#8217;s just one of many steps I&#8217;ve taken to make sure I know when things aren&#8217;t working, and to make the client/server architecture as bullet-proof as possible. All this work at the front-end is to make sure that when the server&#8217;s launched, it&#8217;ll have a really easy to use API. One of my major goals after all is to make this an &#8216;open&#8217; Chaos server, and invite front-end developers to produce their own ports for various platforms &#8211; indeed it should be very possible to write a front-end for a Spectrum using the same graphics, sounds and so on!</p>
<p>One of the other things I&#8217;ve implemented is a step-by-step list of actions for each game. The stored game data contains a current snapshot of the game, active players, unit positions etc &#8211; but it also now contains a blow-by-blow account of the entire game from when it&#8217;s created, as players join and then start playing. Clients will then be able to store a timestamp (returned from the server after each action they perform) and then put out polled or long-polled requests for updates from the server, quoting that timestamp. Once the server processes new actions, it can return those actions to the requesting client in the correct order (so for instance, if a player moves their wizard in the first turn, the server automatically advances to the next player as they no longer have any units to move &#8211; this logs two actions, a unit movement and then a &#8220;next user&#8217;s turn&#8221; action). Clients may choose to return actions from any timestamp, so as long as the client knows when it last got an update, it can always stay in sync. The client may also optionally request all the actions, in effect providing a way of replaying an entire game, or it can just request a &#8216;refresh&#8217;, which sends the client a snapshot of the game as it stands, with all the data it needs to resume the game from scratch.</p>
<p>Here&#8217;s an example of a typical update:</p>
<pre class="javascript" name="code">{

    "response": {
        "success": [
            {
                "id": 8,
                "action": {
                    "turn": 3,
                    "currentPlayer": 0
                },
                "time": 1324168638420
            },
            {
                "id": 9,
                "action": {
                    "moved": {
                        "id": "wizard_0",
                        "from": {
                            "x": 3,
                            "y": 5
                        },
                        "to": {
                            "x": 4,
                            "y": 5
                        }
                    }
                },
                "time": 1324168655828
            },
            {
                "id": 10,
                "action": {
                    "turn": 3,
                    "currentPlayer": 1
                },
                "time": 1324168655828
            }
        ]
    },
    "currentTime": 1324168722155

}</pre>
<p>So far, I have a very solid base &#8211; board sizes and player counts are limitless and the server will automatically position wizards in a &#8216;Chaos-like&#8217; arrangement around the board, regardless of size, shape or number of wizards, or at least up to 8 wizards, after that I need to write a routine to automatically space them &#8211; probably via some kind of circular distribution. Although spell casting isn&#8217;t yet implemented, units are and can be created by manually editing the game data &#8211; so I&#8217;ve had a wizard and his hydra happily moving around the board to my infinite satisfaction.</p>
<p>Next to be done is the combat routines &#8211; which will lead to the invariably sticky (though hopefully MUCH more manageable) death routine, which is always a bit of a pain with Chaos. Remember, some units die, some units disappear, some units (wizards) disappear and trigger a player defeated routine, blobs engulf, magic fire destroys outright and leaves no corpse, wizards on mounts if attacked by units lose their mount, but if overrun by magic fire disappear and trigger a player defeated routine and so on and on.</p>
<p>Plainly remaking Chaos is not as simple as it seems.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">248</post-id>	</item>
		<item>
		<title>Merry Christmas, happy new year and so on</title>
		<link>https://www.rotates.org/2011/03/12/merry-christmas-happy-new-year-and-so-on/</link>
					<comments>https://www.rotates.org/2011/03/12/merry-christmas-happy-new-year-and-so-on/#comments</comments>
		
		<dc:creator><![CDATA[SEPTiMUS]]></dc:creator>
		<pubDate>Sat, 12 Mar 2011 02:01:17 +0000</pubDate>
				<category><![CDATA[Archaos]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://www.rotates.org/?p=238</guid>

					<description><![CDATA[First of all, apologies for not updating in yonks &#8211; I could give you the usual programmer excuses about real life, work and so on but you&#8217;ve heard them all before, so I&#8217;ll dive right in to what I&#8217;ve been doing: Archaos is very, very slowly moving along &#8211; we&#8217;re talking geologically slow here, but [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>First of all, apologies for not updating in yonks &#8211; I could give you the usual programmer excuses about real life, work and so on but you&#8217;ve heard them all before, so I&#8217;ll dive right in to what I&#8217;ve been doing:</p>
<p><a href="http://chaosremakes.wikia.com/wiki/Archaos" target="_blank">Archaos</a> is very, very slowly moving along &#8211; we&#8217;re talking geologically slow here, but nonetheless there&#8217;s still a roadmap and there&#8217;s still progress on it. My aim now is to have a release before my 30th birthday (next year) and I&#8217;ll be damned if I don&#8217;t make it!</p>
<p>I&#8217;ve been experimenting with presentation and so on, and came up with a <a href="https://rotates.orgarchaos/isotest.htm" target="_blank">little thing</a> tonight which I thought was quite cute.  I&#8217;m really feeling the love for CSS3 and HTML5 now.</p>
<p><a href="http://www.wordpress.org/" target="_blank">WordPress</a> has become my new powerhouse tool at work, and I&#8217;ve been churning out sites left, right and centre in this wonderful blog engine turned CMS (as of 3.1 especially so) &#8211; check out some of the following:</p>
<ul>
<li><a href="http://www.redboxdesign.com/" target="_blank">www.lovegeobar.com</a></li>
<li><a href="http://www.communityfoundation.org.uk" target="_blank">www.communityfoundation.org.uk</a></li>
<li><a href="http://www.redboxdesign.com/" target="_blank">www.redboxdesign.com</a></li>
</ul>
<p>The last is our most recent project, and is very much not a site you&#8217;d expect to be WordPress powered &#8211; such is its flexibility!</p>
<p>I don&#8217;t update on <a href="http://twitter.com/lewster32">Twitter</a> much anymore, as it&#8217;s become a bit of a joke now with all of the celebrities and ridiculous trends; it pains me to say it but I think Twitter is more about Justin Bieber now than anything sensible. Alas, I spend most of my social networking time now on <a href="http://www.facebook.com/lewster32">Facebook</a>.</p>
<p>Finally, I&#8217;ve booked a flight to Arizona in September for a two week photography road trip with two of my good friends &#8211; should be awesome!</p>
<p>Anyway, hopefully that&#8217;s got everyone up to speed on what I&#8217;m doing &#8211; keep your eyes peeled in the coming months for updates on Archaos and other projects.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.rotates.org/2011/03/12/merry-christmas-happy-new-year-and-so-on/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">238</post-id>	</item>
	</channel>
</rss>
