Feb 20 2012

LEVEL GENERATION

I’ve been working on a few new kinds of level for CQ2. The first is a forest to traipse through and kill things in. Forests are messy, confusing places! The main features in these forests are trees (that get in the way) and bushes (which you can’t see through). Your sight lines are pretty limited, except when you find the odd clearing, but there are plenty of opportunities for leaping out of the bushes and stabbing people.

Please excuse the placeholder graphics. It’s essentially grey boxing: I’m roughing the levels out with dumb coloured blocks to see what works and what doesn’t, and the pretty art comes later when we’ve settled on level features worth keeping. So for now, trees are solid orange blocks; bushes are mottled grey and orange; and the forest floor is grey.

You’ll just have to use your imagination a bit. Trust me, this is more forest-like than using the old tileset and having bricks everywhere!

Continue reading »

Feb 17 2012

INTERNATIONAL

Fixing text layout issues is extra fun when you can’t actually read what you’re fixing!

Almost every single displayed string in Cardinal Quest is loaded from a text file. I wrote a tool to embed these text files in the source code, so the whole thing’s entirely self-contained as a .swf or .exe, but the game can also load the text files on the fly so we can modify strings and just relaunch the game to try new stuff faster.

All of this supports Unicode. Doing a translation has pretty much just involved sending off these text files to be translated.

The only real problems were fonts and layout. Cardinal Quest uses two different fonts throughout. The Japanese version, now, that uses a single font almost exclusively. It’s not like you can knock up a useful Japanese font easily or cheaply – a usable font would need thousands of glyphs! As a result, there aren’t nearly as many fonts around to pick from.

On the layout side, most of the text is only loosely framed by artwork around it. The font sizes of some stuff needed tweaking, but only really a handful of things in the UI. If you’re ever designing something which you think you’ll have translated later, just remember that tolerating a little whitespace around your text goes a long way. 🙂

Feb 13 2012

CORPSE SNAKE

On Saturday evening I was browsing the TIGSource forums and came across this thread about making a game of Snake in ActionScript and sharing the source. It got me thinking, and I ended up spending the weekend making a Snake variant called Corpse Snake where you grow as normal and then score points by mutilating yourself. Go play it!

One thing I’ve noticed a lot of Snake clones do is that they make the play field really large and empty, so there’s very little pressure on the player to respond. I prefer to keep the pressure on – so Corpse Snake runs on a pretty tight 18×13 play field, it starts off with a few squares filled in around the edges, it has five apples to go for at any given time… and the play field gets smaller as you go. I hate to bang on about this, but it’s one of those situations where the size of the screen is really important.

I finally started playing with Pixel Bender on Sunday, which is basically a way of using GPU shaders in Flash. You can now look forward to every single game I make having shaders in. ALL OF THEM. 😀 I’ve been meaning to get into shader programming for a while: it’s basically how to make pretty things happen just with programming, which suits me fine. Layering Pixel Bender effects over the top of 2D games isn’t quite as fun as shader programming in 3D, but it’ll do for now.

Anyway – if you want to play around with Corpse Snake yourself, the source code’s at the bottom of the game’s page. You’ll just need FlashDevelop, HaXe and Sam HaXe. You’ll need the Pixel Bender toolkit as well if you want to muck about with the shader.

Feb 11 2012

DOWNLOAD VS FLASH

I was discussing download figures on Twitter with @SurplusGamer (one of the chaps behind The Wager) the other day and I came to a realisation: if you’re putting a game out for free, a Flash game doesn’t really get your name out there any better than a download game.

I put out two games last year. The first was Beacon, a download game for Windows, Mac and Linux. The second was Fear is Vigilance, a Flash game. Both started as Ludum Dare 48 competition games, ranking #2 and #3 overall respectively in the competition. Both were about the same scope, and both were covered in Rock, Paper, Shotgun. The only real difference is that one was downloadable and one was Flash, and the figures tell me that didn’t really change how much impact they had.

“But wait!”, you say. “Fear is Vigilance has 130,000 views on Newgrounds!”

It does! But I’m not sure that’s as helpful as it sounds.

 

Continue reading »

Feb 08 2012

CLOSE QUARTERS

I’ve been messing around with level generation. The big plan at the moment is to get various generators up and running – for things like dungeons, caves, towns, forests and so on – meaning that we can have a whole bunch of different-feeling levels. One of the core features of CQ2 is going to be a sense of place, a feeling that you’re carving a way through different areas on a journey and that there are new things to discover up ahead if you persevere.

First up was messing with a cave generator of Ido’s that was already in the codebase. I played around with the settings a bit and then, thinking of NetHack, tried pulling the view distance all the way in so it feels a bit darker and more threatening:

It certainly feels a bit different! (Ignore the tileset :D)

One thing I’ve realised is that, even with procedural generation like this, the different areas of any given level type tend to feel a bit bland due to being all pretty much the same. We’re going to need a range of level features, like special rooms and so on, so there are things to find when you explore. I’m not sure what to do on that front yet. I’ll work on it – I don’t just want to stick in shops and treasure rooms, though they might be part of the solution.

For now, I’m going back to raw level generation. These villages and forests aren’t going to make themselves!

 

Feb 06 2012

THE HAWTHORNE EFFECT

Back in the early 20th century, at Western Electric’s “Hawthorne Works” factory near Chicago, management decided to run a long term study on factors that might affect productivity. They took a bunch of people and had them work in a separate room for five years, assembling telephone relays, trying out various changes to their hours and working environment to see what worked best.

They hit on a strange, seemingly paradoxical effect. In one example of this effect, when they reduced the workers’ hours, measurable productivity went up; but when they increased the workers’ hours back to normal later, productivity went up again.

This is the Hawthorne Effect. Changes to someone’s environment tend to increase productivity, either because people develop better habits as they’re adapting or because they’re aware that these changes involve their performance being monitored more carefully. Those increases drop off over time, but they’re real.

In short: if you want to get more stuff done, routinely disrupting and improving your process isn’t going to hurt. You’ll likely get a temporary boost no matter what, and if it doesn’t stick you can always go back to what worked before, right?

I installed Procrastitracker today (as Michael Todd suggested in the talk I linked on Friday). It’s a bit of software that tracks what windows have focus while it’s running, so it can give you a readout afterwards of how much time you spent on-task and how much time you spent mucking about.

So far it’s definitely helping me keep focused when it’s running, but I’ve learned something else: I don’t really get distracted while I’m mainly working. Sure, I spent about 20% of my tracked time up there browsing, but that’s a relatively small percentage. Also, when I was starting to lose focus, it was pretty easy to stay on track.

Where I go wrong is that I spend about an hour at a time working, then – and this is when I was switching off the tracker – slack off for a solid chunk of time before starting up again. I’m probably spending about 50% of my work time in between bursts like this.

I’m going to try and use Procrastitracker to fix this habit. So far I’ve stayed focused pretty well while it’s running. If I can keep that up, I can gradually start running it more and more of the time, on a daily schedule; eventually I’ll be able to just start it up when I want to work and my brain should damn well listen. 🙂

Fingers crossed, anyway. If this doesn’t work, plan B is switching off internet access for most of the working day. Work around that, brain!

Feb 03 2012

BREAK

Yesterday I tried to get some stuff done and I just couldn’t. Work was going slowly, I was feeling really stressed – I’ve been feeling gradually more stressed about work for the past month, to be honest, but it finally got to the point of making it hard to think clearly about the whole thing.

What’s really been getting to me is, I’m in the middle of this long period – about two months – where I’m changing lots of core stuff about Cardinal Quest and I’m not totally sure if it’ll all fit together and work well. Everything feels good in isolation, but I won’t know if it’s actually good until all this rough work-in-progress stuff starts to resolve into something shaped like a coherent game again.

Now rationally, I do believe it’ll be good and solid. Emotionally, I’ve been worrying about it and second guessing my own judgement. I’ve never actually designed a roguelike/RPG before, so hey – what if I’m making poor judgement calls and I don’t even know it? It’d mean the work I was doing would be a waste of time. Trying to get stuff done when you’re feeling it might not be worth it isn’t much fun!

Not having much confidence in the game and feeling unhappy about it was making working on the game pretty stressful. My first response was to try and power through by spending more time thinking about and working on it, but that just amplified the stress.

What I needed to do is twofold. Firstly, I needed to get a solid idea of where the game’s going to end up and restore my confidence in it. Secondly, I needed to create some space in my life insulated from work, so even if work was getting stressful it wouldn’t drive me completely crazy within a couple weeks.

So I shut the PC off mid yesterday afternoon and took a break. 😀

I’m already feeling much better and I’ll probably get back to work on Monday or over the weekend. I won’t be rushing it, though. More than anything this has shown me that I need to pace myself when things get a bit rough. Starting next week I’m going to try and get back into working days and taking evenings off instead of it all blurring together. I think that’ll help a lot. A month or so of taking it easy and methodically knocking through to-do list items and it’ll be properly ready for playtesting. From there on out, constant corrective feedback should make development much easier, emotionally speaking.

To anyone else going through a rough patch mid-project, lots of hugs. We’ll get through it 🙂

Related: Michael Todd gave this cool talk at the Independent Games Summit last year about depression in game development, Turning Depression into Inspiration. It’s good stuff.

Feb 01 2012

EQUIP? – ROUND TWO

Since the game was starting to come together okay, I put a version out to a few people for testing yesterday.

The main thing this found was a whole bunch of bugs – I broke mouse control entirely! However, another common point of feedback was that the Found Item dialog was confusing and a bit rubbish, like it not being obvious at a glance which is the new item and which is the old one.

All the clues are there – sort of – but it’s still something that took a while to interpret, and this is stuff you need to be able to parse in a split second. I’ve been revising it today and it’s now leaner and clearer:

It’s a pain in the arse redoing work you thought was done, but hey! If it’s broke, it needs to be fixed. Hopefully this version will playtest better or I might have to reconsider removing the inventory altogether.

Time to code it… again 🙂

Jan 30 2012

AFFORDANCES

I had a go at merging the character and inventory screens. I think it’ll have to wait for now! I can do it, but I’ll have to rewrite the popup system so I can put item descriptions etc. into popups. So I started looking at a few other things instead.

CQ has some quite opaque mechanics. All the stats are pretty opaque, in fact! Attack, defense, speed and spirit all have non-obvious effects, and that’s a real killer when I’m trying to make them important. You can’t enjoy making choices unless you understand the relative merits of your options!

I’ve been experimenting with ways to clarify them:

Mousing over an enemy will now give you your chances to hit and get hit. There’s a similar display for the chance a spell will fail that shows up while spellcasting.

Another little fix here is the recharge timer on spells – the fireball spell there taking 8 turns to recharge. That’ll hopefully be a further guide to the impact of Spirit, though it might be unnecessary. As for Speed, I have no idea. You’ll just have to judge that by enemy movement.

Spell recharging is a pain. What really complicates it is that Spirit makes recharging faster, but Speed makes it (subjectively) slower. Objectively speaking, spells take the same amount of game time to recharge – but your turns happen faster! It’s a hard problem to fix. I could have spells charge faster when your Speed stat increases, meaning they take the same number of turns… but that makes the Speed stat even more powerful.

It might be a necessary compromise for the sake of clarity. I could try balancing it that way – make Spirit more important, accept that the Speed stat is part of a magic-casting character build unless matched with a really low Spirit, and make Speed points rare and valuable.

Well, this project’s still in the early stages, so I have the flexibility to try out stuff like that. 🙂 I’ll give it a shot!

Jan 27 2012

INVENTORY

I’m getting rid of it, piece by piece. 🙂 I’m now handling item and spell management entirely with popup dialogs when you find stuff. Anything you don’t want will either be sold or left on the dungeon floor for you to revisit later.

First up, that ‘Found Item’ dialog got a slight revamp once it went in game. The “Keep” button was confusing as heck; did it mean you were keeping the new item, or keeping the item it was under? So I moved the buttons around.

I also changed its behaviour to sell the unwanted item, because the levels were getting a bit cluttered with rubbish gear. Now you’re either equipping the item on the right or selling it. It’s not perfect – I’ll probably have to clarify that you currently have the item on the left equipped already and we’re looking at the one on the right – but it’s getting there.

Either way, you’re going to end up with one item equipped. The other one will be sold and destroyed.

Spells require a different approach. You’ve got to chuck them into a spell slot. Rather than wiring up something so you could compare spells to each other, I just went with this:

Spells aren’t as simple as items; they have all these different unique effects. You might try spells out and then change your mind about them! Because of that, spells can’t be destroyed. Any spell you replace, or choose not to equip, will stay on the floor for later in case you change your mind.

When you find a spell on the floor, it’s going to start fully charged so you can cast it immediately and see how it works. This is all just about making things as transparent and self-explanatory as possible.

There’s now no reason whatsoever in the game to use the inventory. Next job is to look at merging the equipped items display from the Inventory screen into the Character screen somewhere. Then I can ditch the Inventory screen and its access button entirely!

That ought to be done by Monday. I’m looking forward to moving on from UI work and getting some more content in. 😀