Mar 09 2012

SCAVENGER

Wow – I haven’t had any spam on this blog over the past few days. Recently I’ve been fending off a flood of the stuff, especially trackback spam… but now I’ve got comments locked down on everything except the latest posts, comments can’t contain URLs and I’ve just disabled trackbacks entirely. Maybe I’ve got it licked?

I also lost some time this week tracking down and closing an exploit due to an outdated WordPress theme, if you can believe it, after a hacker tried to have a poke around (look up TimThumb; even if you’re not using a theme that contains it, having it installed leaves your server wide open). Basically, maintaining a web presence can be a pain in the arse 😀

Anyway! DEVELOPMENT NEWS.

Shops in roguelikes have always bugged me a bit. Diablo’s towns make a sort of sense, as does the town halfway through Nethack’s mines, but they’re very specific answers to this problem of where you can trade stuff. In general roguelikes just have random shops in the middle of nowhere, staffed by a single shopkeeper, with dozens of monsters banging around outside. Dungeons of Dredmor does exactly this. It’s always felt a bit weird.

So CQ2’s got scavengers.

Scavengers aren’t exactly shopkeepers. They’re foragers, sneaking around dungeons and battlefields, staying out of trouble (with invisibility) and picking up anything valuable they find. And, what do you know – they’ll sell it to you, if you’ve got the coin.

I haven’t got the shop in yet, but it’ll be a basic extension of the item comparison screen. Scavengers will only have two or three items worth buying, which simplifies things. Here’s a mockup:

Scavengers or wandering merchants wouldn’t work in everything, but it feels like a plausible way of letting you buy stuff in the middle of apocalyptic hellholes.

Oh – and it feels nice and bleak to have NPCs in the game make a living by going out there and nicking the boots off dead people.

Mar 02 2012

AWARENESS

I’ve been working on tile system features, how loot is managed and fixing a few bugs. It’s not very photogenic stuff! Fortunately, continuing the theme of making the game’s inner workings more visible, I’ve just added a list of active buffs/debuffs.

So now when something’s affecting you, you know it’s there and you know how long it’ll last. This’ll be especially useful when I get the terrain buffs working. (Moving through hedges will be slow but stealthy! That sort of thing.)

I’m currently going over two things in my head: shops and AI placement. Shop-wise, I think I’ll have vendors scattered through the game world that have one to three items for sale at fairly high prices; gold will carry over between playthroughs, up to a limit; and if you quit a level before all the monsters are dead, you’ll get extra gold as a bonus to compensate for less XP.

As far as AI placement goes, I’m contemplating putting most of the monsters in game into squads. Squads will tend to hang around each other, and when you alert one of them the rest will become alerted as well. It’s a way to make these open town, cave and forest areas a little more interesting, to stop you from easily pulling one enemy at a time as you clear through the level. Alerted AIs will also be able to open doors sometimes, too, so perhaps when you sneak up on someone and surprise them another AI will bust through a door behind you…

Well, back to it. The to-do list’s getting longer as quickly as it’s getting shorter; I need to fix that 😀

Feb 27 2012

PROPS

So I’m experimenting with scattering a handful of placeholder props and things around in sensible places, to make village huts and stuff feel a bit more lived in.

In towns, chests and enemies (and other NPCs) are going to try and spawn in houses rather than out in the streets and fields.

One major aspect I’m pushing with CQ2 is bringing a sense of geography and place into the mix. It’s still a way off that mark, and my temporary graphics shouldn’t be around for long… but the systems are getting there to support it, and that’s the main thing. 😀

Feb 22 2012

BOUNDARIES

Cardinal Quest’s tilemaps were pretty straightforward. Each 16×16 tile was a different image: wall, floor, door, stairs. The boundaries between tile types didn’t affect the graphics at all.

If we apply this approach to forests, we’d end up with Forest Tiles and Not Forest Tiles. Something like this (though obviously with better art):

That’d work, sure. But we can do better.

The approach I’ve decided to take is to stick with 16×16 tiles generally, but allow applying a variation to just a quarter of a tile – meaning the system can use 8×8 tiles where it counts.

Continue reading »

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 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 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. 😀