Rotates.org

January 11, 2026 - Archaos: beta 2

After quite a few years (people operating on geological time may be starting to sense a pattern here) I’ve updated the Archaos beta at www.rotates.org/archaos/2021

What’s new? Why, I thought you’d never ask!

  • Up to 8 players can now duke it out for wizardy supremacy.
  • Numerous bugs have been fixed, especially around mounted wizards.
  • Computer controlled wizards are now available, and can be mixed and matched with human players just like the original. They’re currently not the smartest tools in the shed, but they’re able to cast all spells and use all units reasonably effectively.
  • The code has had lots of inline documentation added, and the dependencies are almost entirely up to current versions (with the exception of Phaser, which introduced some breaking changes in recent versions that I need to catch up with).
All's fair in love and wizard war
Another hard day’s work in the realms of limbo.

You can follow along with the updates, check out the source code, raise issues or even contribute on the Github page here: https://github.com/lewster32/archaos

The game has also now been listed on Open Source Game Clones, so thanks to ju5 for doing that! It also has a listing on https://chaosremakes.fandom.com/wiki/Archaos which I’ve dutifully updated a bit.

June 26, 2025 - CodePen greatest hits pt. 1

I’ve always enjoyed short, snappy little projects that deliver a quick dose of dopamine, and I’m a big fan of CodePen as a way to exercise that ‘tinker and play’ attitude.

One of my earlier and more involved pens was the result of a thought: “What if 8-bit but open world?”. A great candidate seemed to be Jet Set Willy, and luckily there’s an absolutely excellent disassembly of the game 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.

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×8 pixel blocks with a single byte) and generate all of the graphics, rooms and movement patterns.

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

Anyway, here it is in all its glory. Enjoy!

I quite like the big comment attempting to explain all the bitwise stuff:

    // 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 & 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 & 56 = 24  (binary: 11011101 AND 00111000 becomes 00011000)
    // 24 >> 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.

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

November 27, 2012 - The ultimate Chaos creature infographic!

I’d love to share this little stroke of absolute genius from one of Archaos’s longest serving (and thus longest suffering) fans – and incidentally a very talented programmer in his own right and major Chaos buff:

Click the image to view the huge (7680 px wide) original

@andy_herbert has painstakingly put this ‘cheat sheet’ of all of the original game’s units together showing graphics, stats, movement and combat ranges for each one, and grouping them together into this attractive infographic. I think it’s wonderful, and I’m going to print a large version of it out for my wall to use during testing!

Alpha is now under way with a small number of testers. So far we’ve played a few furtive ‘games’ (in the loosest sense – no casting, no ranged combat yet!) and apart from a few silly bugs, all seems to be well. I’m putting the finishing touches onto the standard movement/combat model in the next day or two (including finally adding ranged attacks) and then I’m going to implement casting.

Casting brings with it the somewhat-more-complex-than-it-seems matter of the user interface – which of course is critical to any game and which if not implemented correctly can really hinder this game. The interface in Archaos has to be intuitive, compact, and it has to get out of the way when you’re trying to play the game itself. As a cross platform mobile and desktop game, the way a player will interact with the game will differ slightly amongst platforms, however I want to ensure that the differences aren’t too jarring, and that each platform plays to its own strengths.

One of the methods to improve the experience is the use of gestures, so a player can pan and zoom the map intuitively, like they’re used to – and it may also through testing lead to methods of reducing the chance of accidentally performing an action, such as by having a user tap and hold on a unit or tile and then drag outside of a circle in order to perform the action (to ensure that the unit or tile tapped is the intended target, and that the user hasn’t just accidentally tapped the screen somewhere).

As I realise people like to see screenshots of progress as well as words, here’s a view of a typical alpha testing game session (with debug data above the units) showing the newly added window bezel to the mini-map, which is the basis of the UI, as well as the new ‘volumetric’ cursors and the big ‘cancel’ button.

My horse prepares for its gallop towards the hopelessly outnumbered cyan wizard

 

November 2, 2012 - Julian Gollop has an announcement to make…

Earlier on I got wind of news that very nearly made my heart stop.

Yes, Julian Gollop – creator of the original Chaos, of the original X-Com, and of many other seminal classics, has begun work on his own remake of Chaos using Unity 3D to initially target PC, Mac and iOS. He also stated:

…which bodes well for it sticking to the original winning formula.

Development on the game has only just begun, and Julian is currently looking for good artists. He has estimated that the game will take around a year to finish, so we’ll all have to be patient.

I guess the recent massive success of XCOM: Enemy Unknown has brought Gollop back to the forefront and given him the motivation needed to revisit what has to be in my (and many other people’s) opinion one of the greatest games of all time.

Julian, if you read this, I wish you all the very best with your remake. Chaos has been crying out to be remade for a modern market, and a market that’s now clearly in the right place to readily accept a multi-platform turn-based strategy title such as this.

What however does this mean for Archaos? Surely with this title coming out, it makes Archaos obsolete and possibly in danger of legal action as it will directly compete with Julian’s version on the same platforms?

Sometimes it really is worth meeting your heroes.

August 18, 2010 - Raise dead

Well well well, I guess I haven’t posted here in… ohhh, ages? I owe you all an apology to be perfectly honest, as I’ve neglected to work on Archaos (or indeed any personal projects) in the time since my last update.

Life has panned out for me – work became extremely busy in the last few months, and my ever expanding role has ever expanded – and indeed shifted towards a more theoretical and management-style thang. I’ve been working directly with clients and producing a lot of exciting stuff for a lot of exciting projects which, if I get off my lazy arse and update this blog more often, you will no doubt hear about!

Another significant development is that I’m no longer a lonely geek sat in his room listening to chip music and writing Javascript – I’m a very much not lonely geek sat in his room listening to chip music and writing Javascript. I have indeed found a (dare I say it) lady geek – though to her credit, not even close to the caliber of my pure unadulterated nerdiness – whom I spend as much time with as my work and her sanity allows. I won’t allow myself to become soppy and embarrass her (and myself) but… well, I absolutely love you, and you make me a very, very happy boy. Oh bugger, I don’t think I succeeded there. Never mind!

This has meant of course (yes, you all knew it!) that my personal projects have taken a back burner in all of this. Well, I say a back burner, but I actually mean ‘have been placed in tupperware tubs and frozen’. I must say now that my passion for Archaos in particular has not waned one bit – however after such a hiatus, I’d like to start a lot of it again rather than try and work my way back into the existing code base. A problem with learning as you create is that everything you did a month previous is a bit crap – so stuff I started last year is gonna be pretty goddamn terrible now.

I will return to Archaos. I absolutely promise I will, and I have been reading Gooey Blob and other Chaos related stuff. The end of the year always proves to be a better time to get on with personal projects, and I hope to have something playable in December.

To those of you who still read this, still follow me on my similarly neglected Twitter account, I salute you – and I’ll be around more often!

P.S. Check this out. WOW!

January 16, 2010 - Full cycle

The Archaos server now validates, processes and outputs a full turn of human interactions. This is a pretty major milestone in the development process, and I’m very happy with the results so far:

{
  "turn" : 1,
  "phase" : "move",
  "interaction" : "sequence",
  "finished" : true,
  "actions" : [
    {
      "type" : "move",
      "player" : "lewster32",
      "time" : 1263682234,
      "data" : {
        "piece" : "p0",
        "path" : [
          {
            "x" : 1,
            "y" : 7
          }
        ]
      }
    },
    {
      "type" : "end_turn",
      "player" : "lewster32",
      "time" : 1263682234
    },
    {
      "type" : "move",
      "player" : "bobster16",
      "time" : 1263682234,
      "data" : {
        "piece" : "p1",
        "path" : [
          {
            "x" : 13,
            "y" : 5
          }
        ]
      }
    },
    {
      "type" : "move",
      "player" : "bobster16",
      "time" : 1263682234,
      "data" : {
        "piece" : "p3",
        "path" : {
          "x" : 11,
          "y" : 4
        },
        "flying" : true
      }
    },
    {
      "type" : "end_turn",
      "player" : "bobster16",
      "time" : 1263682234
    }
  ]
}

I’d like to mention the huge amount of support, encouragement and fantastic resources provided by certain people of late. @andy_herbert has been a fantastic vocal advocate and provider of much inspiration and technical knowhow (he’s an utterly brilliant multi-talented programmer in his own right) and I owe an awful lot to his ‘cheery’ tone on Twitter! 😉

Secondly, I’d like to shout out a big hello to the Slashdot horde, who accosted the site a few days back. I got a hell of a lot of visits from these guys and I’m sure it’s helped spread the word about Archaos (even if that wasn’t actually my intention) and more importantly the Chaos scene in general!

Finally, a big thanks to @Zolyx for mentioning the project on his blog along with the other fantastic Chaos projects out there – muchos appreciated!

December 17, 2009 - Timelapse

Wow…

http://vimeo.com/6686768

Stick it in HD, full screen. Nuff said.

November 17, 2009 - Perseverance pays off

Imagine having a web server that stores your objects and data just like a live app. Imagine being able to write in the same language on the server and on the client. Something this awesome has been a long time coming, but it’s finally here!

I’ve of course been playing with Persevere and absolutely loving it. Part of the big delay with ‘the Chaos remake’ has been the complexity of creating a robust way to get data from the clients to the server, and for the server to remember that data and be able to process it in the same way. Well now, thanks to this fantastic piece of kit, I can do all of that. Each server instance is a live JavaScript interpreter, with its own persistent object storage database – i.e. objects created are both accessible at any time, and saved.

What does this mean? Well, with the help of haXe (another brilliant tool) I can now write the code for the remake in one language, and ‘compile’ various parts of it to different platforms. I can write most of the game logic and other critical stuff and then have it work the same on the server as it does if it was just running on your own machine – and Persevere will make sure that it acts in that same ‘in-memory’ persistent way.

There are other projects on the go which I’m going to use as testbeds for Persevere – it’s not without possible issues, scalability being the big one at the moment, as one of my projects may end up being quite heavily used (one hopes anyway) and Java (the underlying tech behind Persevere) may not be up to that kind of task.

I can see Persevere being just the beginning of a whole paradigm shift for many parts of the internet into persistent object-based servers – it certainly doesn’t make sense with rich web apps to have to jump through all the current hoops and endure the inefficiences that go with the current ‘single shot’ model of web languages. Bring it on!

Website and content © 2009–2026 Lewis Lane