New home

Yes good folks, we have a new domain! And one that I hope will stay for a loooong time. A reminder of the history of domains:

  • cotwmtor.meteor.com: At the start of this journey, August 2015, when meteor still offered free hosting, we lived on their free hospitality.

  • cotwmtor.meteorapp.com: In March of 2016, meteor decided to can their free hosting, giving everyone two weeks notice to move. All hell broke loose from the hundreds of awesome projects being linked to thousands of sites which was going to be broken in a matter of weeks. Yours truly spent a morning moving host. There was minimal backend and so not very disruptive.

  • cotwelm.herokuapp.com: From May 2016, the crazy new rewrite of castle of the winds meant I was able to whip up hosting on heroku for free. Meteor was costing me $50/month for hosting a couple of js files, heroku is free.

  • game.castleofthewinds.com: So when meteor first announced their plans to cut hosting, I went looking for alternative hosts and decided that I needed a static domain too. Hated having to change the domain name each time I had to move to a new host. This is how I chanced upon castleofthewinds.com and a guy who goes by the name of Sean Perryman! It turns out Mr Perryman and I had something in common, we are both big fans of castle of the winds and both dream of creating a remake of the game! So I’m very happy to announce that we’ve finally got a home.

Looking back…

I’m coming up to the point in the writing of the game where I had stopped in both my previous two attempts. The shop. The shop is an interesting part of the game where the player’s equipment, the pack and a shop intersect with some rules about weight/bulk limits, purchasing costs, cursed item removals etc… it represents a bit of a complexity jump in the implementation and it’s where I really struggled in both previous attempts. This is probably a good time to reflect on the three attempts at making castle of the winds. (If Rick Saada saw this, he’d probably be laughing.)

cotwjs - Jun 16, 2013 – Feb 18, 2014 (8 months)

  • Written using Typescript, jQuery, otherwise, vanilla Html/Css
  • ~3400 lines of code, 250 commits to github
  • 0 tests written, buggy as hell. In fact, the reason why I stopped was because it was so buggy and painful to write the drag/drop for the shop, I lost all motivation and stopped dead that day.
  • Highlights: Working with a friend made this the longest lived project I’ve had to date. It was great fun working together.
  • You can still see it live here (cotwjs.appspot.com)

cotwmtor - Aug 2, 2015 – May 24, 2016 (9 months)

  • Written with Reactjs/Redux/Meteor, built with Webpack, tests in Jasmine/Karma
  • 4074 LoC, 105 commits
  • 120 tests, still quite a few regression bugs from refactoring. Map jumping issue, drag/drop intermittent failure, etc…
  • Highlights: TDD was really fun to implement and the confidence from tested functions is a great feeling.

cotwelm - May 8, 2016 – Jun 19, 2016 (1.5 months so far…)

  • Written with Elm (+ a handful of core packages)
  • 4199 LoC, 108 commits
  • 0 tests, no known bugs
  • Highlights: A handful of bugs overall. Workflow has been really fast because the compiler and fully customised type system catches most bugs. Most days, when the program compiles, it is already working.

This time, I have a good feeling about where I’m at. Elm makes the shop/inventory part not too complex and I can refactor without fear of introducing regression bugs. Mayhaps by the time I’ve spent 8-9 months on this rewrite, I’d be alot closer to completion. Fingers crossed.

Progress

This brings us up to the last but not lease section, the current state of the game. Inventory

In the last 3 weeks, I’ve put in items, the ability to equip them, the pack, weight/bulk restrictions on what packs can hold, drag/drop between equipment and pack, and a shop that auto-generates some items. The goal is to get buy/sell working and perhaps just console notifications for errors. I’m thinking of using Greensock Tweens for doing animations like animating notifications. Due to Elm having quite a small community, there is not a large variety of packages to choose from and in the interest of making the game feature complete before polishing, I’m going to focus on the core mechanics of the game and only go into polishing later. So that Hammer which takes up a third of the screen… yeah, it’s gonna stay that way until it really annoys me.

What’s next?

I’ve been keeping this trello board fairly up to date (read: every time I remember to update it, weekly…) so this is a good place to go if I’m not explicitly mentioning what’s happening next in a blog post. For now, I’m really stoked that I got some randomly generated items going and unique IDs in the system (these are really hard with Elm). So the next logical step is to be able to buy/sell items with the shop. This should be fairly easy to do and if I don’t end up refactoring half my codebase a few times in between, I should be able to get this done, have the hero generate some derived stats and go pick a fight with a kobold soon!