Saturday, 12 April 2014

When drives don't mount nicely

While rebuilding my media sharing Raspberry Pi I've come across a small problem with usb drives. If you don't unmount a drive from a Windows machine properly, the Pi will mount it read-only. A simple solution for this is:
  1. install the ntfs-3g package:
    sudo apt-get install ntfs-3g
  2. mount the drive using this utility:
    sudo ntfs-3g /dev/sda1 media
    (to mount drive at sda1 to directory media) which clears up all the locks for you
  3. then simply umount and mount and things are back to normal

Saturday, 1 February 2014

A city in Crysis

Oh look – I’ve got a blog. Seems I managed to forget that for most of last year. New Year’s resolution: write more. Let’s see how that turns out.

Games!

Back in the old days this was a blog about video games. I played through and wrote about Crysis and Crysis: Warhead and made certain criticisms of the design decisions. In my post about Crysis I praised the game but said the narrative was a bit wonky, lurching from shooting Koreans to shooting aliens and in the process utterly changing the way the game played – and not for the better. They fixed that in Crysis: Warhead. I also said that the nanosuit, while being interesting was overly complicated and that they’d be better off losing some of the power modes and having them always-on.

Which brings us nicely to Crysis 2.

Suit me up

We’re back in the nanosuit – now apparently only being worn by one person in the entire gameworld – but with some of the power modes removed and those functions always-on. Sounds familiar. The new interface is far slicker than the old one which makes the gameplay faster and more fluid. The missing modes (Speed and Strength) are still around, but accessed via context-sensitive prompts (Strength) and just running quickly (Speed) which makes a lot more sense, even if you’re sometimes killed by enemies because being shot has drained your energy leaving you unable to run away properly. Still – it’s your fault. Plan properly next time.

Me suit up 

But you can’t just remove the useless element from an interface - you have to add new and exciting buttons to push to justify the “2”ness of the experience. So we have nightvision, which I don’t remember in the original games and not really worth the bother now. It is only of any use in one (very brief) section where the lights fail and a couple of occasions when the playing area is randomly filled with smoke. It just feels tacked on, which is a shame.

Then there is TacVisorThing. I struggle with TacVisorThing. I like game worlds and generally I feel it helps immersion to build logical gadgets then incorporate them into the gameplay rather than adding something cool and hoping the setting can swallow it. In the gameworld, the TacVisor makes sense. Basically, you bring down the “spotter” sights and the nanosuit analyses the battlefield and overlays tactical options to help you out. Generally they are quite obvious (marking high ground as suitable for "sniping" or the bit at the side suitable for "flanking") but it can point out weapon and ammo caches which would otherwise be easily missed. The problem is that all this really does is put a series of button presses between you and continuing the action when you enter one of the more open areas. It’s just busywork and I can’t help feeling that an automatic overlay would have been a nicer solution (prediction for Crysis 3! Which has been out for nearly a year!).

Oh, and there is an upgrade system too. More on that later.

Up me suit

So, we’re suited up. Time to get going. The gameplay drops Crysis’s vaguely open world for a series of corridors spilling out into arenas. It keeps things focused, but does lose any real sense of planning. You’re going in at A and coming out at B. All you can really decide is how to progress between those points. Oh – you’ve chosen stealth. Well, that means you can just walk from A to B and ignore the guys hanging around waiting to kill you.

Damn.

Yes, the Stealth option basically lets you bypass most of the enemies and without ever engaging them. And there really isn’t much encouraging you to fight – sure the human opposition are portrayed as a bunch of thuggish tools, but you’ve got places to be and pretty soon they are all busy being eaten by aliens anyway. The aliens on the other hand are big walking robot things with tentacles coming out of their heads (gone are the flying squid-things from the first game) who … you can also walk straight past. Sigh.

Actually, this feels like a step backwards from Crysis 1 where the enemies would hunt you down once you’d shown yourself. Now re-cloaking utterly confuses them. They don’t try shooting where you might be, or throw things to make you appear. You can just scurry off and murder anew from a new angle. The AI in general seems universally dense – they follow very obvious paths and just don’t seem to react to what you’re doing beyond “turn and shoot” instincts.

In an effort to stop you bypassing all the enemies in stealth mode there is an upgrade system which is powered from the corpses of the alien troops. There is some pseudo-science explaining this, but suffice to say that it means you’ll 1. spend a lot of time running like an idiot through the middle of firefights because you don’t want to lose the XP, rather ruining game flow (why can’t the pick-ups drift to you?) and 2. become next to invulnerable horribly quickly. Pro tip when upgrading – get level 1 of all 4 sections, then save for level 3 stealth and armour in that order. Everything else is largely worthless.

There are also token collectables which do little other than say YOU’RE PLAYING A COMPUTER GAME (why am I picking up tourist models of famous buildings, exactly?). It’s important to not forget those.

Tell me a tale

The plot? Yeah, there's one of those too.

Come on

Eugh. Well, there is some evil-PMC nonsense, an alien invasion, a sinister businessman pulling the strings behind the scenes and some of the noblest marines you’ll ever meet. The characters are largely uninteresting and to a man unlikable and most of the time you’re glad you’re on your own. The marines do provide a particularly hilarious sequence though – you’re told that the normal humans basically have no chance against the aliens and you need to escort them back to base. However, these normal humans turn out to be invulnerable (presumably to stop the escort quest making you hate all of humanity which is what normally happens – definitely a good decision) which means you can cheerfully use them as shields or just cower in a corner while they PUNCH THE ALIEN MECHA-SUITS TO DEATH. Do NOT mess with the US Marine Corps.

You’re still typing

That’s about it. It all functions, but it feels rather uninspired. It’s as if Crytek have built a great engine, hired the best artists on the planet (even seven years on it looks amazing, but then you already knew that), thought about the nanosuit and basically free-styled the actual game part. Not to say that it isn’t fun – I had an enjoyable 10 or so hours blasting through it, aside from a horrible end of game fight against cloaked aliens who had to die to unlock a door for … reasons – but it feels like a missed opportunity. There was the potential to do an open-world game in a semi-ruined cityscape here which changed as the war evolved. Who knows – maybe some of your actions could have helped that evolution along different paths. In that world the nanosuit could have come into its own, allowing you to customise the game to your preferred play-style via your use of powers and upgrades. Instead, we have a corridor shooter with some knobs on. A good corridor shooter, with some very pretty knobs but still – corridors and knobs.

Saturday, 26 October 2013

Jekyll and Foundation with Guard

tl;dr - I've dropped the jekyll asset pipeline in favour of Guard in my pre-configured example project of Jekyll and Foundation.

A few weeks I wrote about my attempts to create a bootstrapped jekyll / foundation combination using the Jekyll asset pipeline to keep things building on the fly. I hit a snag, though. The asset pipeline was abandoned back in February and is locked to version 0.12 of Jekyll (current release being 1.2.1 at the time of writing). There are various forks of the project which bring things up to date but I'm worried about being left in the same position again and, frankly, I'm starting to question the methodology of using Jekyll to do everything instead of running the tools separately.

What I really want, I think, is some kind of meta-tool which lets me manage my build environment but by using the core tools - in my case Jekyll and Compass and probably a CoffeeScript processor eventually - so I (hopefully) have fewer maintenance problems down the line. Seems like Guard is pretty much what I want. I'm coupling it with guard-jekyll-plus and guard-compass to work with those tools. It isn't perfect, and doesn't assuage my dependency fears entirely but it feels a much more robust solution than the previous version.

My basic jekyll-foundation project has been changed to use this new tool chain and seems much more responsive than before (could be anecdotal) so I'm looking forward to making more use of it.


Monday, 30 September 2013

Jekyll and Foundation automatically recompiling changes

tl;dr - I've glued jekyll, jekyll pipeline and foundation into a pre-configured example project.

I look after a handful of small sites and I've been playing with different ways of maintaining them and keeping them vaguely modern. A CMS is the obvious way forward, but that has the learning curve problem and, frankly, after working away at this kind of thing all day I'd rather approach the problem a little differently.

What I really want is something which lets me write content in my markup language of choice, then generates some html for me and wraps it in a template. It should also handle some of the simpler optimization tasks (minifying, compressing, compiling any sass) and ideally allow some kind of on-the-fly regeneration of all these assets so I can work and hit refresh with it running in the background.

Jekyll seems like a good contender as a starting point. I love the fact it generates static HTML files for me (I'm getting tired of requiring the comparatively slow processing power of PHP for ultra-simple tasks) and it has a "watch" mode for recompiling the pages as I work. It uses the Liquid templating engine, which is sufficiently simple for my needs, and there is support for a variety of markup options.

Next, I need some sass support. This is easily done, but I want a simple workflow so it needs to recompile on the fly while jekyll watch is running. Step up the jekyll asset pipeline which lets me add whatever I like to the jekyll process with a minimum of fuss, including css compression and the sass compilation I wanted. I'm pretty sure I could add CoffeeScript support with it too, but I haven't tried that yet.

Right, I have the components I need. I'm going to work with Foundation 4 because it happens to be a framework I know relatively well. If only there was a vanilla project which pulled all this together ready so I could just fork it and start building a new site. Oh look.

In all seriousness, I've hammered these elements together into something that should be easy to just pick up and start using. I'm hoping it'll be useful to me and - this being the internet - chances are that means it'll be useful to someone else too. If that someone is you, enjoy this vanilla jekyll project with foundation sass built on the fly. Why not let me know?

Friday, 31 May 2013

An FPS but a bit more

I find the mechanics of Republic Commando interesting. On the face of it, it's a basic FPS which uses the Unreal 2 engine. You can carry 5 weapons plus melee attack and you fight waves of droids and flying bugs. Underneath that, however, it is something a bit different.

At the heart of what makes Commando different is the squad combat mechanic. Instead of the usual lone commando setup, you are one of four and you can order your AI buddies around to help everyone else around. So far, so unremarkable (although at the time perhaps not - I can't recall offhand when squad control started becoming a regular thing). The really nice part is the way the squad control mechanics are worked into the game.

Firstly, it is not a gimmick, rather it is a tool that is incredibly useful to progress. In a game such as Mass Effect 2, you can quite happily ignore your squad to do their own thing and blast your way through the encounters however attempting to do this in Commando this will likely result in a quick and painful death. On several occasions during my playthrough I blundered into a firefight and had my team slaughtered however on restarting the section, playing thoughtfully and actually using the options available to me the exact same encounter became a breeze. This isn't because your mates are victims of stupid and in dire need of micromanagement (the AI of your team is well above average in fact) but because there is a very tangible benefit to using the squad order system and instructing them to switch to sniper mode or hold a section of cover or whatever. Having said that, the order system does remain a tool. You are rarely forced to command your fellows and you can, if you're feeling light on your feet, play Commando as a more traditional shooter. Importantly, there are also some really bad command options presented so mechanically issuing orders doesn't work which avoids the danger of it becoming a simple "I win" option.

So the issuing of orders is a noticeably useful option given to the player. However it doesn't feel like a mechanic to be exploited because of the second great thing about its implementation - it is part of the game world. The obvious point there is that your character is the squad leader so you are expected to be telling everyone what to do. More subtly is the way the game encourages you to think carefully about your options. In any decent sized firefight there will be a dozen positions your squad can take up so you need to not only use the mechanic but think in real terms about the way this will benefit you. Most of the time it's fairly obvious stuff - but only if you're thinking about covering fire, line of sight and so on and then you're thinking about real world options rather than clicking buttons which helps with the immersion.

Something else important about the design of the squad is the commando skillset. Although each one of your team mates has a distinct personality, in terms of ability they are entirely interchangeable. While that may sound simplistic it helps avoid making everything too obvious. You don't drop your sniper in the sniper spot simply because he's a sniper, for example. You can have intersecting fields of sniper fire if you want - you aren't restricted to just one guy with a rifle. You also don't have the problem of needing to blow something up and your demo guy is the one who decided to get his face shot off - someone else can step up to the task.

Linked to this is the way you can define your own role in the team. You have the same skills as your team mates which means every time you order someone to set a bomb or hack a terminal, you can do it instead if you prefer. In the middle of a firefight, you can order one of your chaps to get on with hacking while you shoot the enemies off him, however if you prefer you can instead put yourself in danger and order your team to give you covering fire. It may not sound like much, but this really makes you feel like part of a team instead of above it which does wonders for the oh-so-important immersion.

There are other clever design ideas - regenerating shields but collectible health so you can limp along without being completely crippled but not getting shot has its benefits springs to mind - however the squad control system is what makes Commando interesting. It manages not only to avoid being a gimmick, but also demonstrate how a cleverly applied gameplay mechanic can enhance atmosphere and immersion.

Saturday, 18 May 2013

Defending the Republic

I've been playing Star Wars: Republic Commando because sometimes you need to step back in to the past to remember a time when games weren't all about DRM arguments and chest high walls.

Before moving on, though, I have a confession to make: I am a huge Star Wars fan. Not the new Clone Wars nonsense, but the older stuff made before Lucas went completely mad and (particularly) the Expanded Universe. For those who haven't read any Star Wars novels, the EU is the place where (mostly) talented sci-fi authors were allowed to play in George Lucas's beautiful sand pit and contribute to a (mostly) curated timeline which spanned thousands of years of Republic history. The stories explored different aspects of the central characters of the original films, but also expanded on the lives of pretty much every being shown in the films and added hundreds more besides. It's in this tapestry of supporting characters that Star Wars really shines - the Jedi may be the knights errant of the universe, but there are a tiny number of them. The other characters bring them to life.

For anyone reading this in the future, this is why Star Wars used to be great before the Clone Wars retconned a ton of stuff and Disney made some new movies which undid the rest (these movies don't exist at the time of writing - my crystal ball is not optimistic).


Republic Commando, then. It's a game which focuses on the clone commandos of the Republic (no, really) in a series of engagements during the Clone Wars. It spawned a series of excellent novels by Karen Traviss and contains no lightsabers or Force powers. In fact, a Jedi only shows up once in a cut scene and he just gives some orders and leaves again. It really is very good.

Firstly, the game feels like Star Wars. The blasters make the proper noises, the vehicles move around ponderously, the architecture looks right and the music is spot on. Secondly, and more importantly, the central characters are plausible. The commandos do joke and banter while moving around but they are focused on the task at hand. Throughout, there is a sense that the plot is moving on because the main characters are driving it onwards through their ability to complete missions, rather than hanging on while events unfold around them.

Mechanically, the game is a fairly basic FPS with some squad mechanics built into it. The squad controls are very well streamlined and well worked into gameplay. Successfully commanding your troops makes a huge difference to the frantic firefights and there are just enough options to leave you feeling in  control, without becoming needlessly detailed and fiddly. The AI is pretty good too - you generally feel part of the squad, rather than the leader of a band of special needs troopers. Your team will heal themselves, pick each other up, take intelligent firing positions and sometimes even take point when exploring - and this is before you start giving them orders. It means you can often choose your role in an encounter. Want to stand back and shoot Separatists whilst your team go and set explosives? No problem. Want to set up a sniper crossfire while you run around in the open hacking terminals and taking fire? You can do that too, and your team mates will actually shoot enemies off you.

There are problems too, of course. The AI is good, but not great. There are moments when they run off the wrong way or melee the super battle droid you want to grenade. The contextual squad controls can sometimes be annoyingly fiddly to target. You non-squad allies are, to a man, completely useless and will usually catch a blaster bolt within a moment of appearing and some of the badguys are horribly unfair as they flit around, dodging your gunfire. All of these problems are ignorable because it's so Star Wars which, after sitting through Clone Wars cartoons and that horrible cgi film is so very nice.

Wednesday, 21 November 2012

New skin for my website

In an effort to not look like I've learnt nothing in the last four years, I've reskinned my website. I don't kid myself that anyone actually wants to know this information, but by writing a post about it, in years to come I can find out when I released this particular version by looking at my blog. That's keeping some kind of digital timeline - the digital archivists would be proud.