Pies

July 31st, 2008

Allo!

Well, I figure I should probably get back into the swing of things now. I should probably also explain why I haven’t been in the swing of things too.

A month and a bit ago I thought it’d be a great idea to reformat my main computer to install a couple more operating systems and to clean out the crap that always seems to have accumulated in Windows after about half a year or so. It should have been dead straight-forward, but instead resulted in hair-pulling frustration and a lot of CDs in the bin. After several nearly-working installations of XP and Vista I discovered (through use of the helpful little tool memtest86+) that my RAM had somehow become broken, at the exact same time that my DVD drive broke. This wiped out about two weeks through experimenting, waiting for things to arrive, experimenting again, waiting for more things to arrive, and finally setting up four (yup) operating systems.

Then once I’d gotten my development environment all up and running with the latest versions of my dependencies (Ogre, UnitTest++ etc.) I found out that, in a nutshell, Ant is rubbish for C++ projects. I already suspected this since after making the build scripts work cross-platform they looked quite grotesque (XML doesn’t express logic well…), but the final nail in the coffin was the ridiculous bug that causes builds to continually slow down until they eventually stop. After asking on the project’s forum, I was directed to a patch written in 2003 that would fix it. Having to apply a patch from half a decade ago to get things back to their previous level of slowness is just stupid, so I spent a while setting up some different MSVC project files and rejigging the way CITS is built. That all took about a week (spare time only, remember).

Then the new version of Dwarf Fortress came out.

Then my lovely girlfriend and I went on holiday to Vienna for four days, which was nice.

Now we’re back though, and I’m ready to get on with things. Since in the plane I saw a lot of clouds and decided they were awesome, I may well go about revamping the sky a bit since it still looks rubbish to me. I know it’s not very important, but you guys have been deprived of screenshots for so long!

Clumsy cuboids

June 15th, 2008

The little cuboid people can now trip over if staying upright is getting too tough for them. I had to do some proper maths-y stuff to get it working, which flummoxed me for a while – who would have thought that the maths I learnt at uni would ever be needed in real life?? I needed something that would allow a continuous random chance of something happening based on some measure of ‘continuous probability’. Turns out a Poisson process is ideal for this, and though the equations look scary I realised that they can be simplified greatly in some cases, including mine.

So, when the island is tilting a lot, people trip up and fall off more often, which is nice (for me, not for them). It looks slightly funny at the moment since it’s only taking into account the island’s tilt, and not the gradient of the terrain each person is on or their proximity to the tilting edge, which would make things look cooler. That’s on my to-do list, but it’s not terribly important right now.

Also, I’ve made the people wander a bit more interestingly – they walk (glide) across the island and turn around when they meet a building or an edge, rather than vibrating about. It’s looking good. I’ll probably put together a video once I’ve done a few more of these tasks I’ve got scribbled on my notepad.

Next on my list is getting buildings to detach properly. Currently they never get detached, and it looks like OPAL isn’t going to be smart enough to do this in a physically-based manner (accumulating joint damage, for example), so I’ll do it in a similar way to how it’s done for people. For now it’s the mechanic that counts, not how good it looks or how smug it makes me feel as a software engineer.

That’s it for today though, I need to clean the flat before my better half gets back, else she’ll beat me or refuse to make me lunch or worse.

A lazy day, for a change

June 14th, 2008

Great, I’ve got a completely free weekend with my girlfriend away, perfect chance to get some work done on CITS… but I’m not in the mood, so I’ve only done some minor tidying work (programmers like me love making code pretty) and finished up some bits to do with people falling off the island that I should have done before (they get ‘tidied up’ like the buildings do now). The rest of the day was taken up cleaning my bike, sorting out insurance, calling estate agents and other boring but necessary things like that. Tomorrow will be better, I promise!

Now I’m relaxing with a bottle of Tanglefoot, listening to some Frank Zappa (I’m trying new musics… can be quite good if you listen to the right albums. Lumpy Gravy, Hot Rats and Apostrophe are my favourites so far), and probably playing some more GTA4 and Trackmania.

Note: Trackmania is great with retro red-and-blue 3D glasses. Cheers Joe :)

Cuboid fear

June 8th, 2008

The little cuboid people now have something to fear. If they get hit by a building, they fall off the island to their doom. By “doom” I mean “negative infinity in the Y axis”, and by “fall” I mean “get launched upwards for comedy effect”.

In other news I’ve been out and about in Loughborough looking for a new place to live. Seems like a lovely place, if you ignore the North and the South and the East of it.

People are a lot like cuboids

May 29th, 2008

Well would you look at that. The island seems to have become inhabited by tiny cuboid people, who stick rigidly to its surface and vibrate rapidly for locomotion. What a crazy world we live in.

Next up is better physics integration for people, more interesting behaviour/AI, and a bit more of a gameplay tie-in.

Professional Crastination

May 26th, 2008

Well, I just made myself laugh. I went to see the new Indiana Jones film with my girlfriend today (it was pretty good). We had to get there very early since Odeon’s online booking system broke whilst I was using it (refusing to load any pages at all just after I’d tapped in my credit card details, my favourite kind of broken), so we didn’t have seats reserved.

So we were sat there watching the ads and one came on for the new Mini Clubman – a little ‘short’ entitled procrastination. It was this charming hand-drawn animation about a guy wanting to get his ‘things’ done, but who keeps finding other things to do. It ends up with him noticing his chair is squeaky, and going to buy some oil to stop it squeaking and distracting him from doing his things.

I hadn’t thought about it much until a few minutes ago, when I caught myself kneeling by my upside-down deskchair with a can of WD40. I guess it’s made even more ironic by the fact that I’m now writing a blog post about it.

Anyway, progress has been roughly zero these past few weeks, but I have plenty of excuses – getting wrongly sued for copyright infringement and having to write a series of cheeky but serious letters to very non-technical lawyer-types, dealing with a car company that went bust after we handed over

Cities in the Sky *is* a game

April 24th, 2008

It’s not just an experiment in software engineering, I promise. I’ve done the last of what I needed to do now – finished up unit test integration with a couple of extensions to UnitTest++, re-wrote the build script to allow debug and release builds to be called in the same ant invocation (which has unfortunately shown me just how ugly XML can get when used for conditional logic…), and a load of other minor tweaks and fiddles to get things running as smooth or smoother than they were before in terms of day-to-day development.

I also spent a good long while upgrading this website’s WordPress installation and playing around with the wp-cache plugin, as I’ve noticed it takes a stupidly long time to load most of the time. This broke everything though so I’ve now uninstalled it. Perhaps I’ll just change hosts once my two year stint with StreamlineNet is up. It took a fair while to do all this since at the same time I was trying to get a local mirror of the site set up on my file server, to allow me to cock around with a local copy and upload changes once I’m happy with them. Again this didn’t work out too well, but since it’s not so important I was clever and gave up.

So, now I’m all set to make some tangible progress with CITS. Trac is telling me people are important. It probably knows best. Then again, it’s telling me I’m 55% done so perhaps it doesn’t.

Tools count as progress too

April 16th, 2008

Okay, so I lied. I haven’t actually done any more on the game, I’ve worked on the build tools and server some more instead. I do have a reason though: the in-house tools we use at work are terrible, and I like to think that if I put together my own stuff in a spiffy enough way we can swap over to doing things my way instead!

Since I’m feeling guilty about not having any new screenshots, here’s one of my Trac roadmap page, showing a lovely progress bar for each version of the game. I shan’t show you the tickets page lest I give away too many tasty secrets!

Here’s a slightly more tasty shot showing my Pulse project overview. This makes me happy. Things to note are that there are lots of green bars (I like green bars), and that the recent builds (tied to checkins, or versions) have numbers of tests next to them, which will be increasing rapidly! You can also spy a couple of commit messages at the bottom, indicating that I have indeed been farting around with build-related stuff recently. There are a few nice graphs showing changing build times, numbers of tests and so on, but two non-game related screenshots are enough for now!

You’ll probably also notice the ‘Deluge’ and ‘Fuppes’ bookmarks in the browser too – I’ve been spending a little time pimping out my file server with some nifty toys. It’s now got bittorrent running as a service, with a web UI, which is very nice. Also I’ve been wanting to stream video to my 360 for a while now, but I don’t want to have a Windows PC turned on solely to grab stuff from the Linux file server and forward it on, so I set up Fuppes to do this. It’s all a bit complicated (as is Deluge, what with compiling from source), but very configurable and after a lot of tweaking does exactly what I want. All in all I’m actually quite liking doing things like this in Linux-land, the way it does a lot of things is very sensible, and I think Windows could learn a lot from it.

Thank you, Internet

March 31st, 2008

Wow, what a great week it’s been for my website! On the 28th of March I had a whopping 7 unique visitors according to good ol’ Google Analytics. Let’s have a look at what people searched for to get here:

  • “Cities in the Sky”. Well, that’s reassuring.
  • “Creating clouds with libnoise”. I only wrote about it once, but still, topical.
  • “Is there a motorway in the sky?”. That’s a bit of a tenuous link. I suppose it’s possible to add motorways into CITS though.
  • “Crap cities”. Thanks google, I’m honoured that you associate CITS with ‘crap cities’.
  • “big hairy cits”. I think we all know what this guy was really searching for. You need to get a girlfriend, or a less disgusting fetish.

The ironic thing is that by posting these search terms on my site I’m only making it more likely that people will arrive here by searching for them. Hooray for positive feedback.

In other news, I haven’t had much time to work on CITS, but I now have Pulse set up and merrily building anything I commit, and I have to say that I’m really quite impressed. I’ve also migrated over to Trac, which is great since I now have a nice little progress bar for the project. Once it reaches the end, out pops a release of the game. You’ll be glad to know that it’s at about 40% :)

Good news for geeks that like sky cities

March 3rd, 2008

So, I’ve done a lot of things since I last wrote here. Here’s a waffly overview:

I’m refactoring like a beast (a beast that’s good at refactoring), and the code is now looking rather spiffy. It builds super-fast too. Though I haven’t that much time available to work on the game, my time at work is helping me spot all sorts of new opportunities to clean things up, and increasing my C++ experience massively. I’m now at a point where I’m actually giving advice to others, and people come to me for my opinions and advice on coding matters. Yay!

A few months back (I probably should have blogged this) I added in a few new input methods just for fun, since tapping an arrow key once per square was getting tedious. It’s now continuous over a grid, which is nice. I tried continuous over a grid where the island spins with the left/right movement of the cursor too, but that just felt weird. I’d like to go back to that some time soon since it means you can use a much lower camera angle and expose more of the beautiful sky, rather than having ugly grey clouds in the background.

I’ve also been getting rather geeky as of late; it all started when I bought a new PC (with the wads of cash I have lying around nowadays) and set up my old one with Ubuntu Linux to use as a server. I first set up SVN, served to the rest of my network via Apache. That was pretty easy, and didn’t really offer much more than I was getting already with a local SVN installation, so I added issue tracking in the form of Trac and Retrospectiva. I’m mostly using Retrospectiva since it’s a bit more simple and pretty, but the installation was a bitch and I’m finding Trac is more customisable to my needs. I’m definately regretting this now, since it seems that Retrospectiva->Trac migration is non-existant. Anyways, this has helped me properly document and catalogue ideas, tasks and so on, which is great. Instead of farting around for ages and ultimately implementing something completely unnecessarily, I can sort by priority and get on with whatever’s most important. If I encounter something whilst coding, I can log it and carry on with what I was doing, rather than going off on a tangent and getting lost as usual.

Next, since I could see where I was heading with all this, I decided to change the build process. I needed something cross-platform, fast, elegant, and able to support what I’m doing fully. I went through absolutely loads of possibilities, which all fell short for one reason or another – it seems that there’s no clear winner when it comes to C++ build systems. Noel Llopis’ articles were of great help in weeding out some otherwise tasty-looking options (SCons for example – my team used this for a university project, but Noel’s articles show it as painfully slow, which I’d agree with). I almost went with Jam, but decided against it as the documentation is rather bad, and it’s completely dead now so there’s no hope of getting any support for it. In the end I chose Apache Ant with the cc task from ant-contrib, which is cross-platform thanks to Java, relatively fast despite this, has plenty of useful features and the possibility to add more via extensions, and has a nice (if very verbose) syntax – XML. I like the idea of using XML to specify the build declaratively, but I find that with a C++ project there are plenty of options that would be much better specified using a proper programming language. For example, the directories where external libraries can be found are different depending on the platform, and the names of those libraries are different depending on whether you’re compiling in debug or release, which can result in a lot of conditional logic, something XML does in a very clunky manner. Anyway, the Ant buildscript is now working, and working well.

The next thing I did was fix things to build CITS on Linux. This turned out to actually be quite straight-forward, even a little enjoyable. I found myself really getting to grips with the command line, so much so that in the end I was working remotely via SSH rather than using Gnome on the server to do things. It’s quite nice that if you discover you don’t have some piece of software required for something that you can just use apt-get and have it in seconds, rather than loading Firefox, finding the project website, downloading it, extracting, installing, configuring and finally getting back to what you were doing beforehand. Also, ./configure, make and make install is more elegant than I’d assumed, and I like the idea of things installing to common locations such as /usr/local/include. Nice. So anyway, I made some minor changes to the code, fiddled around a little with building dependencies (OGRE was a bit of a pain, though building from scratch was *far* quicker than on Windows), and now CITS builds and runs on Linux!

So, what I’m doing now is setting up a continuous integration server in the form of Pulse from Zutubi. It looks to be a very simple, clean, yet fully-featured continuous integration environment, which provides exactly what I need and not a lot more, which is great. Once that’s done the next system-ish thing I’ll be doing is setting up automated testing (both unit and functional tests), hooked into the build and integration systems, and then I’ll have pretty much my ideal setup!

Now, you’ll probably have noticed that this post has been one long geek-fest without any mention of real progress in terms of the game itself. Another thing work has made me realise is what a fool I’ve been so far – since I didn’t have these systems set up to aid me I’ve only been able to see two feet in front of my nose and have been implementing all the unimportant things first. Really I should be tackling the high-risk, high business-value features first, to see whether the game is going to be any fun. As such, the next thing I do won’t be to check out bloom again or add particle effects or revamp the state system, it’ll be to get some people on the island. No more farting around :)