(You probably want to read parts one, two, three, four, five and six before starting this).
At the conclusion to part six, I touched briefly on the importance of taking a data-centric approach to game design in Unangband, and cryptically hinted at 'merging possible game spaces' as a means of improving the overall game design. And by merging the possible game spaces, I mean minimising the number of disjoint game elements: that is, the number of different components that make up the game play. A concrete example will help immensely, before I degenerate into a series of circular definitions.
In Angband, there are two ways that a player can be affected by monster attacks. Each monster blow has an effect, which for historical reasons starts with RBE_. Examples would be RBE_HURT, RBE_POISON, RBE_CONFUSE and so on. The monster blow effects dictate what type of damage the player suffers, what items protect the player from this damage and so on.
But there's also monster spells, which have their own separate set of effects, which for historical reasons start with GF_. Examples would be GF_FIRE, GF_POISON, GF_CONFUSE and so on. The spell effects dictate what type of damage the player suffers, what items protect the player from this damage and so on.
When implementing the feature code, I wanted to add the ability to define trap damage in the terrain.txt file. I could have equally created a new set of trap effects, which for historical reasons would start with AD_. Examples would be AD_HURT, AD_POISON, AD_CONFUSE and so on.
Or I could have adopted either the monster blow code, or the monster spell code to implement my trap effects. This would have allowed me to re-use the code that already existed for these two types in many instances, but I would have had to compromise slightly for game balance sake, as the vision I had for e.g. confusion traps, may not have matched either the monster blow or the monster spell code exactly. Unfortunately, there was no clear 'winner' out of the two existing implementations.
What I instead did, was merge the RBE_ and GF_ types together, so that I only had a single choice to make, and then adopted the merged effects code for the trap implementation. This meant not only could I refactor some existing code away, but that I could have traps that caused the player to hallucinate (a monster blow effect) or be hit by gravity (a monster spell effect).
This is the concrete example of what I mean by 'merging the game space'. I took two disparate game elements (monster blows and monster spells) and combined them to take advantage of synergies of scale. I was then able to apply these to traps, other terrain, and ultimately as it turns out, to coating weapons, casting spells, implementing object effects and many other areas that did not feature in the original implementation.
The above example may seem fairly self-evident to you. But consider how you'd implement traps. I discussed this briefly in the previous part of this article. As I mentioned, several variants have implemented traps using a separate data structure, instead of as a feature (or object).
But this means that they have to extend e.g. the monster path finding code to consider separate cases for moving through a fire trap vs a fiery terrain grid. By making traps a feature, I got this functionality for free. Similarly, the monster trap disarming code uses the majority of the same code path as the monster door opening code.
In general, you should extend your existing data structures where ever possible, instead of creating additional ones. I suspect that the vast majority of games would be satisfied with five core data structures: player, enemies, playing field, pick-ups and effects. You may even be able to collapse e.g. player and enemy together.
I would argue against further reduction of data types, because you end up with an object oriented design where everything gets reduced to an 'entity'. This level of abstraction means you'll end up worrying more about the data type design than actual implementation. It seems to crop up quite frequently as a question on rec.games.roguelike.development and I've yet to see any concrete benefits in doing so.
These five data types then have a minimum of ten possible interactions between them as shown below. Actually, there's an implicit additional set of 5 interactions, because each data type could potentially interact with itself.
An interaction is not necessarily just between one instance of each type: it could equally be a 'has-a' relationship of some kind. For instance, in across the Angband variants where the enemy is a monster race, a player 'has-a' an implicit monster race consistenting of the shape the player currently is, as well as being able to ride a monster, and in Unangband, being escorted by particular monster types on battle field dungeons.
Generally in programming, you want to minimise the different total interactions, as these usually require a separate set of code paths (and test cases). But you want the interactions to be as expressive as possible, by maximising the number of permutations of these interactions.
In Unangband, there are a large number of effects, such as fire, water, acid, plasma and so on. Effects are associated with all of the above data types: players and monsters can create effects using spells, the playing field hits locations with effects and pickups (objects) create an effect by exploding, coating another item, and being used by the player.
So it's possible to use water to douse a fire, wash a bloody altar clean or create a wave. A water source could be the waves washing around a water elemental, a potion of fresh or salt water, a player casting a wall of water spell or water flooding from an adjacent grid location. This immediately creates a large number of possible interactions (the player could summon a water elemental to clean a bloody altar, or throw a potion of water at it, or cast a spell, or flood an adjacent location etc) for any particular situation, creating a large number of action choices and rewards the player for lateral thinking.
By merging the possible game-spaces, I've not had to write nearly as much code: instead of every possible permutation of water source and water effect, I've abstracted away as much as possible to the higher level 'playing field' and 'effect' interactions, and handled the majority of the work with data as opposed to code.
In part eight, I attempt some kind of summing up (Actually, it turns out I just continue, looking forward to summing up at in a later part).
Sunday, 13 January 2008
Unangband Dungeon Generation - Part Seven (Game-Spaces)
Posted by
Andrew Doull
at
17:01
1 comments
Labels: articles, procedural generation, unangband
Saturday, 12 January 2008
How to make the DVD drive on a Intel MacBook DVD region free
I've finally found the Achilles heal of using an Intel Apple MacBook. Note that I never noticed this with my Intel Apple MacBook Pro, but we had a region free DVD player in the house which cost approximately £20. No more however.
I've just emigrated from Europe, which is Region 2, to Australia, which is Region 4. I do a lot of DVD purchases via the States using Amazon: the States is Region 1.
Apple lets me change the region code on the DVD player 4 times. That's 4 times total. So for example, I can watch one region 1 DVD player, then one region 2, then one region 4, then another region 1. And then no more DVDs on this machine ever, except for whichever region I end up selecting last. That means approximately 2/3rds of my DVD collection will be unavailable to me.
Now, the savvy amongst you will suggest using a region free software DVD player like VLC. Unfortunately, on the Intel Macs this doesn't work. The Matshita DVD player itself compares the DVD region of the disc to the DVD region held in the firmware, and prevents any access to the disc if the regions differ. This means any access, including at a data layer - you just end up with read/write errors using any of the suggested workarounds you may have found on various Mac forums.
The only option is to download a hacked firmware downgrade that changes the DVD player from an RPC-2 player to an RPC-1 player. This of course immediately means the hardware is unsupported - and you risk the OS/X software updater overwriting the downgraded firmware, potentially cause system instability, brick the DVD drive etc.
Here's how you do it:
- Download the DVD info utility from MacUpdate here.
- Run DVD info. You'll get output of the form shown at the end of the article.
- Check this thread and this thread on RPC1.org to see if you've lucked out, and a hacked firmware is available for your particular make and model of DVD player.
- If it is, download the firmware and install it.
- If it isn't, you need to follow a slightly different process. This only works if you have DVDs of 4 or less regions.
- Take all the DVDs of your current drive firmware and rip them using Handbrake, DVD Backup or another DVD ripping software. You'll probably want to DivX or Xvid encode them to reduce disk utilisation.
- Locally back them up to your Buffalo TeraServer.
- Remotely back them up to isohunt.com using Vuze or another bittorrent client. By doing this you ensure the files are available later - effectively an offsite disaster recovery solution.
- Repeat steps 6-8 for the remaining three regions worth of DVDs that you have.
- File a suit with the World Trade Organisation against Matshita, Apple, the DVD Forum and other suitable bodies for violating the WTO agreement against region based restraint of trade. The Australian and New Zealand governments may support you, as may Antigua.
DVD Info X v1.0.2, by xvi (xvi@rpc1.org)
WARNING --- DVD Info X will only list DVD drives that have some WRITE
capabilities, like combos, DVD-R, DVD-RW, etc...
DVD-ROM-only drives will NOT be listed.
WARNING --- You also must eject any inserted medium to list the drive.
Vendor: MATSHITA
Model: CD-RW CW-8221
Firmware: GA0J
RPC-2 (region locked)
State is SET
4 vendor resets left
4 region changes left
Region 2
Test post
One of the problems of running a blog is that your content gets scraped and redistributed illegally. I've just amended the RSS feed so hopefully I'll at least get some back links from people reading this elsewhere. Suggested by SEO blog.
Oh, and this doubles as a test post...
Posted by
Andrew Doull
at
10:35
2
comments
Labels: blog
Friday, 11 January 2008
Eine Seite fand ich dabei besonders gut
Every so often, I look through Google Analytics to see who is referring to Ascii Dreams. The above sentence comes from Quixotic Project. Luckily I don't need a translation...
Posted by
Andrew Doull
at
13:54
3
comments
Labels: links
Distractions
In case you haven't known, I'm working my way through 'games I own and should have played', and figured you may appreciate my thoughts on the matter. These are a little off-topic, but allow me to procrastinate while I look at the long and well-organised Unangband bug list that Mikolaj has put together for me.
If you want numeric scores with your reviews:
Call of Duty 4/10
S.T.A.L.K.E.R. 9/10
I've really enjoyed S.T.A.L.K.E.R. - immensely so, and it has given me new appreciation for the ability of dynamic AI and monster re-population to keep a location feeling fresh. I would in many ways call this game a roguelike-like for this reason. A couple of things that didn't make the review cut.
S.T.A.L.K.E.R. reminds me of why inventory damage in Angband is such a great mechanic. S.T.A.L.K.E.R. has equipment damage for thematic reasons - it means you can't get too attached to any item, and have to constantly throw away and upgrade your equipment. This fits the Zone: the only thing being made here is the weird artifacts and everything else is temporary and disposable including the people who inhabit it. The dynamic and frequently failed quests work well for the same reason.
Those people who install equipment repair mods seem to be missing the point.
I got quite attached to one of the stalkers, Fox, who appears early on in the game, and who you help out fighting off a pack of dogs. The first time, I kept my weapon drawn too long after wards, and he went from neutral to unfriendly as stalkers do when you threaten them and shot me in the head. Reload. Then he stayed by the fire in the lonely ruined building waiting for someone. I returned much later, and was horrified to see a body there amidst another pack of dogs: relieved when it wasn't his.
I also made the classic error that Sean Bean does in Ronin of trying to position men on both sides of an ambush. Result: I shoot the bad guys, and my Duty allies, they go hostile and return fire.
Let me know if you're enjoying these.
Posted by
Andrew Doull
at
12:52
1 comments
Review: S.T.A.L.K.E.R. : Shadow of Chernobyl
A man lies on the road. He is curled up into a fetal position, head pressed to the tarmac. Fluid gurgles in his lungs. As you move closer past the ruins of a burned out bus, he sees you, and begins to curse and plead with you in a voice you can't understand. He speaks Russian, with a strong Ukrainian accent, but you only know that because of where you are - in the radiation blasted reaches of Chernobyl. You have lost your memory, but there's one thing you have learned.
There are many factions in S.T.A.L.K.E.R., some of which you can ally yourselves with. Others start out hostile and seem to stay that way - but it's never made clear why they're that way inclined. Only a thin line of ambiguity separates the stalkers from bandits, mercenaries, the military in the Zone. You've spoken to the damaged men standing around the camp fires, swilling vodka and listening to the strains of a guitar. Few have much to say, most have none, but the untranslated Russain forms part of the haunting sound scape of the game, and the laughter a friendly counterpart to the howls of wild dogs and worse that infest the wilderness around you.
Posted by
Andrew Doull
at
11:40
2
comments
Labels: articles, game industry, reviews
Wednesday, 9 January 2008
Poll results for 'What is your favourite commercial roguelike?'; new poll
Azure Dreams | 4 (3%) |
Chocobo's Mysterious Dungeon | 0 (0%) |
Chocobo's Dungeon 2 | 0 (0%) |
Diablo | 17 (16%) |
Diablo II | 49 (48%) |
Dragon Quest: Shōnen Yangus to Fushigi no Dungeon | 0 (0%) |
Dungeon Hack | 7 (6%) |
Fatal Labyrinth | 1 (0%) |
FATE | 9 (8%) |
FastCrawl | 2 (1%) |
Hellgate: London | 4 (3%) |
Izuna: Legend of the Unemplyed Ninja | 2 (1%) |
JauntTrooper | 1 (0%) |
Lufia II: Rise of the Sinistrals | 6 (5%) |
Mobile Suit Gundam: Mysterious Dungeon | 0 (0%) |
Mysterious Dungeon 2: Shiren the Wanderer | 6 (5%) |
Ragnarok | 6 (5%) |
Rogue | 6 (5%) |
Pokémon Mystery Dungeon | 0 (0%) |
Pokémon Mystery Dungeon 2: Time & Darkness | 0 (0%) |
Strange Adventures in Infinite Space | 3 (2%) |
The Nightmare of Druaga: Mysterious Dungeon | 0 (0%) |
Torneko's Great Adventure: Mysterious Dungeon | 1 (0%) |
Torneko: The Last Hope | 0 (0%) |
Weird Worlds: Return to Infinite Space | 5 (4%) |
Other | 6 (5%) |
I hope you were at least surprised to see some of the games on this list. It was a bit thrown together, but I wasn't able to find a comprehensive list of commercial roguelikes: I appear to have missed at least one.
Which brings us to the next poll: 'What features must a game have to be a roguelike?'
Posted by
Andrew Doull
at
16:41
6
comments
Labels: polls, roguelikes
Review: Call of Dirty
I've got nowhere else to rant about it, but I'm currently playing through the dirty brown spray that is Call of Duty 4. I suspect deep down it's my play style, but I'm failing to see anything of the Game of the Year recommendations that seem to have sprung up mushroom-like from it's fertiliser-based medium.
[Edit: While I disagree with CoD being a great game, it does have a great message. Have a read through the last comment nominated here for a good view of what Call of Duty 4 does right. I think reviewers may have got confused a little and marked the message, not the game play].
Posted by
Andrew Doull
at
16:07
1 comments
Labels: articles, blog, game industry, reviews
Tuesday, 8 January 2008
The R word
Play This Thing has referred to roguelike games for the last two games it's reviewed: Meritous and Transcendence. This echoes an argument I'll always make: that games and game designers outside the genre have a lot to learn from the writers of roguelikes.
I'd like to propose a new genre that encompases games of this nature, called roguelike-likes. Roguelike-like games are clearly not roguelikes but have been designed and/or inspired by Rogue and its ilk.
You've probably voted for a few in the latest poll.
Posted by
Andrew Doull
at
13:29
5
comments
Labels: links, roguelike-likes, roguelikes
Monday, 7 January 2008
Privateer: Ascii Sector
Another game that blurs the boundaries of what constitutes a roguelike is Privateer: Ascii Sector. Ascii Sector is a ascii art remake of the 1993 space sim/rpg Wing Commander: Privateer using ascii art assets and animation. Unlike the original, it's only in two dimensions, but otherwise it looks incredible.
I've not had a chance to play it yet, but you can read a more comprehensive write up of the game at the Artful Gamer.
Posted by
Andrew Doull
at
08:57
0
comments
Labels: links, roguelikes
Tuesday, 1 January 2008
What is a roguelike?
The new poll on commercial roguelikes is up. Of course, I've been fairly broad in defining what commercial is, and more importantly, what a roguelike is.
I'm interested to hear your thoughts on the matter. Is it not using graphics? Perma-death? Randomly generated dungeons? Rapidly ramping up difficulty level? Should I have added Uplink: Hacker Elite?
Posted by
Andrew Doull
at
17:28
7
comments
Labels: polls, roguelikes
Results for 'What is your favourite roguelike of the year'; new poll
The full poll results for voting for Ascii Dreams Roguelike of the Year 2007 are below. Again, thanks to everyone who voted (all 152 of you).
Angband | 14 (9%) |
Beggar | 1 (0%) |
Berserk! | 11 (7%) |
CastlevaniaRL: Serenade of Chaos | 7 (4%) |
ChessRogue | 5 (3%) |
Cracks and Crevices | 2 (1%) |
Deep | 1 (0%) |
DoomRL | 42 (27%) |
Dungeon Crawl Stone Soup | 26 (17%) |
DrashRL | 1 (0%) |
Dwarf Fortress | 50 (32%) |
First Age Angband | 7 (4%) |
Frozen Depths | 6 (3%) |
GearHead | 9 (5%) |
Gumband | 3 (1%) |
Incursion: Halls of the Goblin King | 23 (15%) |
Into The Darkness | 1 (0%) |
IronBand | 7 (4%) |
Lair of the Demon Ape | 1 (0%) |
LambdaRogue | 1 (0%) |
Lands of Elderlore | 1 (0%) |
Lords of DarkHall | 2 (1%) |
Magic Monsters | 1 (0%) |
MazeCrawl | 1 (0%) |
Paprika | 1 (0%) |
Saffron | 3 (1%) |
Sewer Jacks | 2 (1%) |
Subterrane | 1 (0%) |
The Sewer Massacre | 1 (0%) |
Tower | 1 (0%) |
T-Engine/ToME/ODE | 11 (7%) |
Urban Warfare: The Escape | 1 (0%) |
UnAngband | 13 (8%) |
UnReal World | 9 (5%) |
Warp Rogue | 6 (3%) |
Next poll is 'What is your favourite commercial roguelike?'. I may run out of time getting this set up - if so, it'll be a later in the week thing.
Posted by
Andrew Doull
at
12:41
3
comments
Labels: ascii dreams roguelike of the year, polls, roguelikes