Is now up at Roguelike Radio.
I've had a blast putting this together with Darren and Scott.
Tuesday, 30 August 2011
Thursday, 25 August 2011
Another response
I thought I was going to use this in the last Proceduralism article, but didn't so I'd better highlight it here. Rune Skovbo Johansen has written an excellent response to my Proceduralism article on architecture: Forcing Structure in Procedural Spaces. I highly recommend it as well as following his blog if you're not already.
Proceduralism: Part Eight (Content)
[You'll probably want to read the original article series that inspired this follow up, then start with parts one, two, three, four, five, six and seven of this series.]
What do I mean by content?
This is one of the foundational ideas of procedural content generation: that there is something we can generate procedurally which has an impact on game play. From the PCG wiki:
Here I'm going to be more specific about my use of the word content: I'm going to define it in opposition to what I referred to as architecture in part six. Architecture is when you generate something procedurally and then try to fit game play to it, content is when you generate something procedurally for only game plays sake, and then let the player try to fit meaning to it.
[Edit to add: I'm using the word content in two different ways. As the C in PCG, content includes architecture, but I think it is relatively uninteresting. Topology is more interesting, but if you're just designing a maze for mazes sake: because you're game is set in a labyrinth for instance, then it doesn't help much. A better example would be buildings. If your building interiors are designed primarily to look like real building interiors, it is architecture, but if they're primarily designed to have waist high cover and door ways you can hide behind, it is 'content' driven in the way I'm defining in this article.]
A concrete example should help you. Later versions of Zangband (an Angband variant) feature a procedurally generated wilderness. Briefly, the wilderness map is a 2d array where each cell has three values: law, population and height, where each value is generated using Perlin noise and then normalised to guarantee that extremes of each value exist somewhere in the wilderness. The actual terrain selected for each grid location in the map array is selected from a 3d Whittaker diagram (basically a way of choosing a terrain type where adjacent values are usually similar, but with boundaries between terrain), where each axis is the law, population and height value. Each grid location is subdivided into a 16x16 map array where individual terrain features are generated as defined by the terrain in the Whittaker diagram - sparse trees, grass and occasional pools of water in savannah terrain for instance.
Zangband terrain looks beautiful, and natural up close, but has no bearing to any real world situation because the values used to pick terrain have no relationship to reality. Law is the (inverse) difficulty level of monsters generated in the terrain, population is the frequency of said monsters, and height is a randomiser to ensure that there's sufficient variety in terrain of similar population and law values (remember, the Zangband map is a 2d array), with a value picked for sea level so that a certain percentage of the map is water. High population are converted to towns and cities, high population, high law areas are fields, and low law areas include more dangerous terrain types like pools of acid and lava to complement the increased difficulty of monsters in those regions.
The Zangband procedural generation is, with the exception of height, a content-based PCG system. There is a direct relationship between terrain and the difficulty of the region, which the player can discover, with some explicit linking to player preconceptions (pools of lava), and some less direct linkages (are snowy forests more difficult, or simply at higher altitudes?).
While I said the values used to generate this terrain have no bearing on reality, the player is going to make sufficient meaningful connections between terrain and reality when they play the game. This is possible because the fine grade scale of the game looks plausible: everywhere the player looks appears that it might correspond to something in reality, so the player doesn't notice that the macro scale is nonsensical: actually not nonsensical, but generated completely around game play requirements, instead of ensuring the game matches an approximation of the real world.
While Zangband's wilderness generation code is elegant it doesn't play terribly well in its current form. There's no hard barriers (except for city walls) so it is very easy to move from safe terrain to deadly terrain without recognising the significance of the change, and the destinations you are looking for (dungeons) are sparsely populated because of a design decision to have different dungeon types without enough variety in what can occur in each dungeon. Both those problems can be fixed: one of the first posts for this blog is about wilderness generation using Voronoi diagrams where I propose generating the wilderness more as an undirected graph from randomly generated points on a plane, where some edges are eliminated from the Delaunay triangulation by putting up barriers, and some points are filled with untraversable terrain (mountains, seas, lava) while ensuring that all traversable nodes remain connected.
And I've written about how to make dungeons interesting in the Unangband Dungeon Generation article series: by subdividing the dungeon into one or more 'ecologies' of different but related monster collections which are used as selection lists for what monsters should exist here, and then decorates the dungeon rooms with randomly selected items and terrain types biased towards those which are related the most powerful monster in the dungeon ecology. The assumption here is that the player wants information about the most important thing on the current dungeon level - the most powerful monster that they are going to face, and so ecologies and decorations are selected which relate to some feature of that monster - if it breathes fire, the ecology may have other fire breathers and there may be burn marks on walls and floor and trees, if it is evil, there may be evil monsters and blood spattered furnishings, if it summons wolves, there will be at least one type of wolf available to choose from.
The correlations if you see an orc are only weak: you might be seeing it because the boss was an orc, and the ecology was partially filled with 'orc' monsters, or because the boss was an evil priest and the ecology had 'evil' monsters, or because the boss was a black dragon and it was a black orc (matching on names, instead of creature flags). Each ecology could be built from several such matches so you have multiple hints (and to ensure more variety); similarly the dungeon features chosen were heavily biased (5:1) or (10:1) to pick a feature with a similar match process, but could always pick a random one instead.
This ends up with a biased randomness, where you are being fed enough clues and enough noise that while you think something is going on behind the scenes, you are never quite sure if each piece of information in isolation is relevant. Information is a commodity when it comes to procedural content, but also a litmus test: it's not procedural if it can be spoiled.
The breakthrough in designing this came when I realised that there should be multiple ecologies on a level - with boundaries between each ecology which were filled with weaker related monsters, and that the architecture of the level (huge hallways, narrow burrows, natural caves) could be independent of what was filling it. Prior to those two conclusions, levels had ended up boring, but with multiple overlapping themes the dungeon became a lot more interesting. (For instance, Terraria has three axis in which themes overlap: depth, type of rock, and the presence of water or lava.)
That's because biased randomness was necessary but insufficient: you also require juxtapositions - where something unexpected occurs the player is forced to come up with a way to rationalize it. People are good at telling stories: the positioning of an arrow trap, a skeleton and a snake in Spelunky may be read as the dramatic death of a former explorer, whereas each of these elements separately may lack this meaning.
The big weakness with this biased randomness + juxtaposition approach to creating interesting content (and the simulate everything approach of Dwarf Fortress) is that you need a lot of content to make it interesting because otherwise you never have enough possible combinations to create any significant meaning. Luckily the total cost of creating a new creature in Unangband is incredibly low, somewhat more so for the complicated raw format that Dwarf Fortress uses, but compared to a 3d model (or in some instances a 2d sprite), it pales into insignificance.
Where the advantage is in the marginal cost: the cost to add an extra creature is generally fixed for a procedurally generated environment because once the rules are in place you can generate an infinite number of new levels; whereas in a hand-designed environment you have to potentially change every single level by hand if you should change an assumption about how a creature moves or the player acts, and as the total playable space goes up, the cost of additional content in that space goes up even faster. Procedural generation is how Terraria has been able to add so much content since release.
It is possible to combine procedural and hand-designed content without requiring a huge overhead of content types, by creating vignettes (small scenes) of artist created content which can be inserted into a larger procedural space. Some procedural generation systems consist of nothing but templates of hand-built scenes combined in such a way they can fit together. To make them effective, the vignette should have some random content so that it remains unpredictable when it is encountered over multiple playthroughs, as well as some interior space where the theme of the larger procedural area around them can break through (rather than merely restricting the template to a single theme). Part of the genius of Spelunky is that it consists of pieces of small platforming 'beats' combined together in a way that is only perceptible after multiple play throughs (Darius Kazemi suggests about 500 or so). I would also suggest considering adding bread crumbs of content which can be procedurally placed in the path leading to the vignette to help further integrate the template and the wider level.
Unangband does one better in that it has a room generator that is deliberately designed to create interesting rooms by placing content about the room in a combination of patterns and random placement. Briefly, two overlapping rectangles are created, and then content is placed in either the north, south, east, west or intersection of the two rectangles while a description of the room is created using a Markov chain. The tableau that is created can mimic player actions: bodies and blood can be scattered around the room in a manner similar to the consequences of player combat - creating additional resonance and meaning. More games could benefit from the procedural placement of the detritus of fire fights and assassinations.
Another piece of the content puzzle is progression. I've referred to increasing difficulty level already, but it needs to be stated that increasing reward levels are equally important. You can be sure that any newly generated weapons or treasures are going to be interesting for the player by ensuring that they will be more powerful than what the player has already found (give or take some random variance). Similarly, more challenging monsters are inherently interesting, to a point. To avoid the treadmill of more powerful items + more powerful monsters feeling like Ground hog day you should also expand the range of permitted behaviours: firstly by introducing them singly (ranged attacks, alternative movement) and then in combination.
The final piece of the puzzle is making sure your content is porous and well connected. This allows the player to find the optimal difficulty level for the way they want to play, and to move to freshly generated spaces when the content they have already encountered is exhausted. Terraria does this by allowing a new world to be generated at any time, Angband by allowing new levels to be created on the fly and so on.
But increasingly, developers aren't just relying on the player to find and create interesting content in procedural games, they're inventing methods that rely on simulating player wants and needs. The AI director in Left4Dead and Dark Spore is the best known example, but there are a number of others, and the most promising avenue of new research into procedural generation techniques. And I'll be looking at those in part nine.
What do I mean by content?
This is one of the foundational ideas of procedural content generation: that there is something we can generate procedurally which has an impact on game play. From the PCG wiki:
Procedural content generation (PCG) is the programmatic generation of game content using a random or pseudo-random process that results in an unpredictable range of possible game play spaces. This wiki uses the term procedural content generation as opposed to procedural generation: the wikipedia definition of procedural generation includes using dynamic as opposed to precomputed light maps, and procedurally generated textures, which while procedural in scope, do not affect game play in a meaningful way. The concept of randomness is also key: procedural content generation should ensure that from a few parameters, a large number of possible types of content can be generated.When I wrote the original Death of the Level Designer article series I set up PCG in direct opposition to PG, but they can clearly be seen as a continuum: dynamic lights and other traditional procedural generation techniques don't affect your ability to play the game until they do (see e.g. the flashlight in Doom, HDR bloom blinding you, trying to snipe through procedurally textured grass and so on).
Here I'm going to be more specific about my use of the word content: I'm going to define it in opposition to what I referred to as architecture in part six. Architecture is when you generate something procedurally and then try to fit game play to it, content is when you generate something procedurally for only game plays sake, and then let the player try to fit meaning to it.
[Edit to add: I'm using the word content in two different ways. As the C in PCG, content includes architecture, but I think it is relatively uninteresting. Topology is more interesting, but if you're just designing a maze for mazes sake: because you're game is set in a labyrinth for instance, then it doesn't help much. A better example would be buildings. If your building interiors are designed primarily to look like real building interiors, it is architecture, but if they're primarily designed to have waist high cover and door ways you can hide behind, it is 'content' driven in the way I'm defining in this article.]
A concrete example should help you. Later versions of Zangband (an Angband variant) feature a procedurally generated wilderness. Briefly, the wilderness map is a 2d array where each cell has three values: law, population and height, where each value is generated using Perlin noise and then normalised to guarantee that extremes of each value exist somewhere in the wilderness. The actual terrain selected for each grid location in the map array is selected from a 3d Whittaker diagram (basically a way of choosing a terrain type where adjacent values are usually similar, but with boundaries between terrain), where each axis is the law, population and height value. Each grid location is subdivided into a 16x16 map array where individual terrain features are generated as defined by the terrain in the Whittaker diagram - sparse trees, grass and occasional pools of water in savannah terrain for instance.
Zangband terrain looks beautiful, and natural up close, but has no bearing to any real world situation because the values used to pick terrain have no relationship to reality. Law is the (inverse) difficulty level of monsters generated in the terrain, population is the frequency of said monsters, and height is a randomiser to ensure that there's sufficient variety in terrain of similar population and law values (remember, the Zangband map is a 2d array), with a value picked for sea level so that a certain percentage of the map is water. High population are converted to towns and cities, high population, high law areas are fields, and low law areas include more dangerous terrain types like pools of acid and lava to complement the increased difficulty of monsters in those regions.
The Zangband procedural generation is, with the exception of height, a content-based PCG system. There is a direct relationship between terrain and the difficulty of the region, which the player can discover, with some explicit linking to player preconceptions (pools of lava), and some less direct linkages (are snowy forests more difficult, or simply at higher altitudes?).
While I said the values used to generate this terrain have no bearing on reality, the player is going to make sufficient meaningful connections between terrain and reality when they play the game. This is possible because the fine grade scale of the game looks plausible: everywhere the player looks appears that it might correspond to something in reality, so the player doesn't notice that the macro scale is nonsensical: actually not nonsensical, but generated completely around game play requirements, instead of ensuring the game matches an approximation of the real world.
While Zangband's wilderness generation code is elegant it doesn't play terribly well in its current form. There's no hard barriers (except for city walls) so it is very easy to move from safe terrain to deadly terrain without recognising the significance of the change, and the destinations you are looking for (dungeons) are sparsely populated because of a design decision to have different dungeon types without enough variety in what can occur in each dungeon. Both those problems can be fixed: one of the first posts for this blog is about wilderness generation using Voronoi diagrams where I propose generating the wilderness more as an undirected graph from randomly generated points on a plane, where some edges are eliminated from the Delaunay triangulation by putting up barriers, and some points are filled with untraversable terrain (mountains, seas, lava) while ensuring that all traversable nodes remain connected.
And I've written about how to make dungeons interesting in the Unangband Dungeon Generation article series: by subdividing the dungeon into one or more 'ecologies' of different but related monster collections which are used as selection lists for what monsters should exist here, and then decorates the dungeon rooms with randomly selected items and terrain types biased towards those which are related the most powerful monster in the dungeon ecology. The assumption here is that the player wants information about the most important thing on the current dungeon level - the most powerful monster that they are going to face, and so ecologies and decorations are selected which relate to some feature of that monster - if it breathes fire, the ecology may have other fire breathers and there may be burn marks on walls and floor and trees, if it is evil, there may be evil monsters and blood spattered furnishings, if it summons wolves, there will be at least one type of wolf available to choose from.
The correlations if you see an orc are only weak: you might be seeing it because the boss was an orc, and the ecology was partially filled with 'orc' monsters, or because the boss was an evil priest and the ecology had 'evil' monsters, or because the boss was a black dragon and it was a black orc (matching on names, instead of creature flags). Each ecology could be built from several such matches so you have multiple hints (and to ensure more variety); similarly the dungeon features chosen were heavily biased (5:1) or (10:1) to pick a feature with a similar match process, but could always pick a random one instead.
This ends up with a biased randomness, where you are being fed enough clues and enough noise that while you think something is going on behind the scenes, you are never quite sure if each piece of information in isolation is relevant. Information is a commodity when it comes to procedural content, but also a litmus test: it's not procedural if it can be spoiled.
The breakthrough in designing this came when I realised that there should be multiple ecologies on a level - with boundaries between each ecology which were filled with weaker related monsters, and that the architecture of the level (huge hallways, narrow burrows, natural caves) could be independent of what was filling it. Prior to those two conclusions, levels had ended up boring, but with multiple overlapping themes the dungeon became a lot more interesting. (For instance, Terraria has three axis in which themes overlap: depth, type of rock, and the presence of water or lava.)
That's because biased randomness was necessary but insufficient: you also require juxtapositions - where something unexpected occurs the player is forced to come up with a way to rationalize it. People are good at telling stories: the positioning of an arrow trap, a skeleton and a snake in Spelunky may be read as the dramatic death of a former explorer, whereas each of these elements separately may lack this meaning.
The big weakness with this biased randomness + juxtaposition approach to creating interesting content (and the simulate everything approach of Dwarf Fortress) is that you need a lot of content to make it interesting because otherwise you never have enough possible combinations to create any significant meaning. Luckily the total cost of creating a new creature in Unangband is incredibly low, somewhat more so for the complicated raw format that Dwarf Fortress uses, but compared to a 3d model (or in some instances a 2d sprite), it pales into insignificance.
Where the advantage is in the marginal cost: the cost to add an extra creature is generally fixed for a procedurally generated environment because once the rules are in place you can generate an infinite number of new levels; whereas in a hand-designed environment you have to potentially change every single level by hand if you should change an assumption about how a creature moves or the player acts, and as the total playable space goes up, the cost of additional content in that space goes up even faster. Procedural generation is how Terraria has been able to add so much content since release.
It is possible to combine procedural and hand-designed content without requiring a huge overhead of content types, by creating vignettes (small scenes) of artist created content which can be inserted into a larger procedural space. Some procedural generation systems consist of nothing but templates of hand-built scenes combined in such a way they can fit together. To make them effective, the vignette should have some random content so that it remains unpredictable when it is encountered over multiple playthroughs, as well as some interior space where the theme of the larger procedural area around them can break through (rather than merely restricting the template to a single theme). Part of the genius of Spelunky is that it consists of pieces of small platforming 'beats' combined together in a way that is only perceptible after multiple play throughs (Darius Kazemi suggests about 500 or so). I would also suggest considering adding bread crumbs of content which can be procedurally placed in the path leading to the vignette to help further integrate the template and the wider level.
Unangband does one better in that it has a room generator that is deliberately designed to create interesting rooms by placing content about the room in a combination of patterns and random placement. Briefly, two overlapping rectangles are created, and then content is placed in either the north, south, east, west or intersection of the two rectangles while a description of the room is created using a Markov chain. The tableau that is created can mimic player actions: bodies and blood can be scattered around the room in a manner similar to the consequences of player combat - creating additional resonance and meaning. More games could benefit from the procedural placement of the detritus of fire fights and assassinations.
Another piece of the content puzzle is progression. I've referred to increasing difficulty level already, but it needs to be stated that increasing reward levels are equally important. You can be sure that any newly generated weapons or treasures are going to be interesting for the player by ensuring that they will be more powerful than what the player has already found (give or take some random variance). Similarly, more challenging monsters are inherently interesting, to a point. To avoid the treadmill of more powerful items + more powerful monsters feeling like Ground hog day you should also expand the range of permitted behaviours: firstly by introducing them singly (ranged attacks, alternative movement) and then in combination.
The final piece of the puzzle is making sure your content is porous and well connected. This allows the player to find the optimal difficulty level for the way they want to play, and to move to freshly generated spaces when the content they have already encountered is exhausted. Terraria does this by allowing a new world to be generated at any time, Angband by allowing new levels to be created on the fly and so on.
But increasingly, developers aren't just relying on the player to find and create interesting content in procedural games, they're inventing methods that rely on simulating player wants and needs. The AI director in Left4Dead and Dark Spore is the best known example, but there are a number of others, and the most promising avenue of new research into procedural generation techniques. And I'll be looking at those in part nine.
100 Escapes
Just coming back to Cardinal Quest for a second, but I forgot to note in my original post that it avoids doing the one thing I really hate about 100 Rogues - it doesn't penalize me from moving away from an adjacent monster.
In 100 Rogues, if I move away from a monster next to me, every adjacent monster gets an attack. It annoys the heck out of me. I'd much rather be able to reposition, even if the monster is merely going to step into the space I was occupying, because it means I can do all sorts of interesting roguelike tactics e.g. flee into a corridor to avoid being surrounded, hack and back against slower monsters, pillar dancing and so on.
Also: Cardinal Quest on Rock Paper Shotgun. The conversation in the comments has got slightly derailed, and it needs some love to get back on track.
In 100 Rogues, if I move away from a monster next to me, every adjacent monster gets an attack. It annoys the heck out of me. I'd much rather be able to reposition, even if the monster is merely going to step into the space I was occupying, because it means I can do all sorts of interesting roguelike tactics e.g. flee into a corridor to avoid being surrounded, hack and back against slower monsters, pillar dancing and so on.
Also: Cardinal Quest on Rock Paper Shotgun. The conversation in the comments has got slightly derailed, and it needs some love to get back on track.
Tuesday, 23 August 2011
Fucking ridiculous
I've just bought Civilisation V.
It was four times cheaper for me to get a physical DVD shipped from the UK via air mail (AUD $21.49) then it is to buy a digital copy on Steam (AUD $79.95).
[Edit: To add insult to injury, I'm now typing the CD key into Steam. No need to install from the DVD at all. And the technology tree wall chart is out of date...]
It was four times cheaper for me to get a physical DVD shipped from the UK via air mail (AUD $21.49) then it is to buy a digital copy on Steam (AUD $79.95).
[Edit: To add insult to injury, I'm now typing the CD key into Steam. No need to install from the DVD at all. And the technology tree wall chart is out of date...]
Monday, 22 August 2011
Is user interface design holding roguelikes back?
I've been playing the excellent Cardinal Quest by Ido Yehieli and I can't recommend it strongly enough. You can download the demo from links at his site, read the IndieGames.com article about it and there's a great interview with Ido at True PC Gaming which outlines some of the challenges in designing an indie game.
While Cardinal Quest doesn't necessarily have the depth of some roguelikes - and isn't intended to, it has one outstanding feature, which I also praised Terraria for: amazing user interface design. Here's the first screen you see once you choose which class you'll play (click to see full size):
The user interface entirely describes what you can do in the game. There are keyboard shortcuts for every function you need to do but you don't need to look up help menus: everything is discoverable by mousing over it and a small pop-up reminds you of the key to use, as well as describing the item in the slot.
Not only that, but whenever you pick up an item, it automatically is placed in the correct slot if it is better than what you're already using, replacing any existing item which is converted to gold.
And perhaps best of all, the spell system has separate time outs on each spell, which are displayed by a clock ticking down effect which slowly highlights a slice of the spell icon as the spell recharges.
The user interface is so good, it has seriously forced me to reconsider my priorities in Unangband. I typically find other (non-Angband variant) roguelikes impenetrable because of the subtle but important differences in keyboard shortcuts which means I can't easily shift between games. But I had no problems at all with Cardinal Quest, I could start playing straight away and enjoy the progression of my little avatar (Down to level 8 first time).
With this and the success of Dungeons of Dredmor, I wonder how much the lack of attention to user interface typical of hobbyist and indie programmers has been holding roguelikes back. It's not just that of course: the verb-object model of using items - which has important properties for emergence - and the large number of items in a typical roguelike are also important, but most of those could be overcome by a smart redesign. I'm thinking about going through this process myself.
While Cardinal Quest doesn't necessarily have the depth of some roguelikes - and isn't intended to, it has one outstanding feature, which I also praised Terraria for: amazing user interface design. Here's the first screen you see once you choose which class you'll play (click to see full size):
The user interface entirely describes what you can do in the game. There are keyboard shortcuts for every function you need to do but you don't need to look up help menus: everything is discoverable by mousing over it and a small pop-up reminds you of the key to use, as well as describing the item in the slot.
Not only that, but whenever you pick up an item, it automatically is placed in the correct slot if it is better than what you're already using, replacing any existing item which is converted to gold.
And perhaps best of all, the spell system has separate time outs on each spell, which are displayed by a clock ticking down effect which slowly highlights a slice of the spell icon as the spell recharges.
The user interface is so good, it has seriously forced me to reconsider my priorities in Unangband. I typically find other (non-Angband variant) roguelikes impenetrable because of the subtle but important differences in keyboard shortcuts which means I can't easily shift between games. But I had no problems at all with Cardinal Quest, I could start playing straight away and enjoy the progression of my little avatar (Down to level 8 first time).
With this and the success of Dungeons of Dredmor, I wonder how much the lack of attention to user interface typical of hobbyist and indie programmers has been holding roguelikes back. It's not just that of course: the verb-object model of using items - which has important properties for emergence - and the large number of items in a typical roguelike are also important, but most of those could be overcome by a smart redesign. I'm thinking about going through this process myself.
Oh no, not again
I mentioned previously a podcast I listen to, One Life Left, was on the cusp of reviewing Angband, but failed to do so, after YANR (Yet another Nethack review). It looks like Gweek, Boing Boing's gaming podcast was similarly in a position considering reviewing Dungeon Crawl: Stone Soup on their Dwarf Fortress episode [1] but again didn't. I guess as far as mainstream media is concerned, there's Dwarf Fortress, Nethack and ZAngband... [2]
Anyone want to start Roguelike Radio with me, a podcast dedicated to roguelikes?
[1] If you know anything about Dwarf Fortress, it's probably only worth a glance. They didn't ask the one question I wanted to hear which is how do you persuade the editors of the New York Times magazine to publish such a crazy thing.
[2] That is of course a gross generalisation. There's now also 100 Rogues and Dungeons of Dredmor.
Anyone want to start Roguelike Radio with me, a podcast dedicated to roguelikes?
[1] If you know anything about Dwarf Fortress, it's probably only worth a glance. They didn't ask the one question I wanted to hear which is how do you persuade the editors of the New York Times magazine to publish such a crazy thing.
[2] That is of course a gross generalisation. There's now also 100 Rogues and Dungeons of Dredmor.
Proceduralism: Part Seven (Education)
[You'll probably want to read the original article series that inspired this follow up, then start with parts one, two, three, four, five and six of this series.]
I was going to be talking about content, but I think there's an important point that is worth underlining now, especially seeing as the previous post ruffled a few feathers.
One of the key challenges about procedural content generation is that so much of it is 'intuitive'. Not intuitive in the sense that it is easy to understand, but intuitive in the sense that you have to use your intuition to figure out what works and what doesn't work.
You will sit for hours, watching your algorithms generate content over and over, tweaking the parameters until you are satisfied with the outcome. It is an incredibly powerful feeling, like being a god in some sense, in that you are literally creating (and destroying) worlds with the click of a button or invocation of the command line. Even the smallest change can butterfly into unintended consequences or beauty, and there are a surprising number of times where accidents turn into final implementation. My favourite is the erosion simulation from Tribal Trouble, where a thermal erosion algorithm failed to produce the desired results, until the sign was reversed on the equation being used - turning a sophisticated model into a nonsensical result which happened to look better.
I've coined what I call Doull's Law: 'Any time saved using procedural generation will be wasted watching the resulting screen saver', to try to capture at least the amount of time this takes, if not the power of this idea.
The consequence of this centrality of intuition, is that you have to be told the story of developing a PCG algorithm, instead of just seeing the final code, in order to understand what was done and why. Projects that describe the process of development like Project Frontier, Procedural World, rune | vision, Making Worlds, Procedural Planets, Dungeon League, Polygon Map Generation, Infinity: the Quest for Earth, L.o.V.E. and Spore and all the other creation stories are incredibly important: not just as beautiful repositories of code and images and ideas, but as foundational documents to their procedural worlds.
And I believe, fundamentally, why procedural generation has never become mainstream, is that it takes time, especially time spent coding, to develop this procedural literacy. If you look at, for instance, the Braving Procedural Generation thread on TIGsource, you see variations on the same, simple cellular automata cave generation over and over, because each person who falls in love with PCG has to go through the same learning process themselves to try to discover this intuition.
That is why I set up the PCG wiki [1]- to try to improve the overall literacy in this field. And the feedback to the survey I'm running at the moment has been incredibly positive, but almost everyone feels like they don't know enough to contribute back. My vision ultimately is to have an online PCG paintbox on the wiki, that'll let you explore cellular automata, and height maps, and fire propagation and so on, all in your browser so you can experience this feeling without coding - I just don't have time to create such a beast.
Back on track in part eight.
[1] That and I needed a bibliography of PCG.
[Edit to add: I know we'll have achieved that level of literacy when we start talking about a Cepero nave, or Young trees. At the moment all we have is Perlin noise, which is a bit high frequency for my liking :) ]
I was going to be talking about content, but I think there's an important point that is worth underlining now, especially seeing as the previous post ruffled a few feathers.
One of the key challenges about procedural content generation is that so much of it is 'intuitive'. Not intuitive in the sense that it is easy to understand, but intuitive in the sense that you have to use your intuition to figure out what works and what doesn't work.
You will sit for hours, watching your algorithms generate content over and over, tweaking the parameters until you are satisfied with the outcome. It is an incredibly powerful feeling, like being a god in some sense, in that you are literally creating (and destroying) worlds with the click of a button or invocation of the command line. Even the smallest change can butterfly into unintended consequences or beauty, and there are a surprising number of times where accidents turn into final implementation. My favourite is the erosion simulation from Tribal Trouble, where a thermal erosion algorithm failed to produce the desired results, until the sign was reversed on the equation being used - turning a sophisticated model into a nonsensical result which happened to look better.
I've coined what I call Doull's Law: 'Any time saved using procedural generation will be wasted watching the resulting screen saver', to try to capture at least the amount of time this takes, if not the power of this idea.
The consequence of this centrality of intuition, is that you have to be told the story of developing a PCG algorithm, instead of just seeing the final code, in order to understand what was done and why. Projects that describe the process of development like Project Frontier, Procedural World, rune | vision, Making Worlds, Procedural Planets, Dungeon League, Polygon Map Generation, Infinity: the Quest for Earth, L.o.V.E. and Spore and all the other creation stories are incredibly important: not just as beautiful repositories of code and images and ideas, but as foundational documents to their procedural worlds.
And I believe, fundamentally, why procedural generation has never become mainstream, is that it takes time, especially time spent coding, to develop this procedural literacy. If you look at, for instance, the Braving Procedural Generation thread on TIGsource, you see variations on the same, simple cellular automata cave generation over and over, because each person who falls in love with PCG has to go through the same learning process themselves to try to discover this intuition.
That is why I set up the PCG wiki [1]- to try to improve the overall literacy in this field. And the feedback to the survey I'm running at the moment has been incredibly positive, but almost everyone feels like they don't know enough to contribute back. My vision ultimately is to have an online PCG paintbox on the wiki, that'll let you explore cellular automata, and height maps, and fire propagation and so on, all in your browser so you can experience this feeling without coding - I just don't have time to create such a beast.
Back on track in part eight.
[1] That and I needed a bibliography of PCG.
[Edit to add: I know we'll have achieved that level of literacy when we start talking about a Cepero nave, or Young trees. At the moment all we have is Perlin noise, which is a bit high frequency for my liking :) ]
Sunday, 21 August 2011
Finished Crysis
Technically I haven't finished Crysis but I've got past the bit where the aliens show up which counts as finished when you're playing a Crytek game. Not only did I get that far, but I played the stealth bit, the escort mission bit, the turret gunner bit and the Halo rip off bit before stopping at the fly a plane bit, all of which featured pretty uninspired alien design.
As I mentioned previously, I found Crysis incredibly refreshing because it had the balls to be a shooter that did the best parts of the previous game much much better with new game play mechanic twists (the Nano suit, destructible terrain), as opposed to a genre-bending wannabe sim/open world game/RPG which is what shooters have sadly turned into in too many cases.
(Please note I love the S.T.A.L.K.E.R. series enough to be bothered to punctuate it correctly, Far Cry 2 and ARMA 2 for their crazy ambition, TF2 for its class design etc. But does it have to be every game?)
But I don't think you should play Crysis because it's incredibly fun, or because its beautiful, or because your graphics card can finally handle it. I think you should play it because two thirds of the way through the game it drops you into a zero gravity alien maze and teaches you seamlessly how to navigate it and fight the enemies inside, which are the first truly alien aliens I've seen in a game.
It is a classy piece of game design. I wish the final third had turned into Prey, not Halo.
As I mentioned previously, I found Crysis incredibly refreshing because it had the balls to be a shooter that did the best parts of the previous game much much better with new game play mechanic twists (the Nano suit, destructible terrain), as opposed to a genre-bending wannabe sim/open world game/RPG which is what shooters have sadly turned into in too many cases.
(Please note I love the S.T.A.L.K.E.R. series enough to be bothered to punctuate it correctly, Far Cry 2 and ARMA 2 for their crazy ambition, TF2 for its class design etc. But does it have to be every game?)
But I don't think you should play Crysis because it's incredibly fun, or because its beautiful, or because your graphics card can finally handle it. I think you should play it because two thirds of the way through the game it drops you into a zero gravity alien maze and teaches you seamlessly how to navigate it and fight the enemies inside, which are the first truly alien aliens I've seen in a game.
It is a classy piece of game design. I wish the final third had turned into Prey, not Halo.
Saturday, 20 August 2011
Privacy and Google Plus
I don't think the Google circles quite map onto the way that we operate as individuals with an expectation of privacy. Not to say that I don't think circles are a good but not great privacy mechanism from a technical and easy of use stand point, but I'm not so sure they quite fit the way people think about public and private spheres.
For a start, you should never have a real expectation of privacy about anything you say on the Internet. Copy & paste pretty much defeats any security mechanism you could potentially come up with (along with lo fi reproduction techniques like photographing the screen). If you don't want something you say reproduced and seen by everyone in public, you shouldn't be saying it on the Internet. In fact, with today's level of mobile phone use, you shouldn't be saying it at all, because at any point someone can press a button on their phone and record you (and there's plenty of software that'll immediately upload it to remote secure web storage so even confiscating the phone isn't enough).
There are certainly areas where you have an expectation of privacy. For instance, you have a reasonable expectation your ISP isn't going to divulge your preference in pornography (along with the people who wrote your web browser and operating system). And you can certainly start suing people after the fact should information which needs to remain private is leaked. But, despite attempts to have super injunctions, you can't sue someone before the fact to prevent a juicy secret being released, and doing so is a big red flag for people who look for that sort of thing.
So Facebook's hard to use privacy controls and hidden and ambiguous relevancy filters are actually a better reflection of the state of control of your personal information than Google's deceptively easy to use system of circles, which create a false sense of security about how far what you say can be shared.
And that's ignoring the fact that circles are in some sense the wrong way around. I only want to hear about your interest in game design, not see photographs of your cats. But occasionally I might, because it may make me more likely to think of you as a real person as opposed to an anonymous stream of text on the Internet.
(This post brought to you by the Charles Stross school of blogging).
For a start, you should never have a real expectation of privacy about anything you say on the Internet. Copy & paste pretty much defeats any security mechanism you could potentially come up with (along with lo fi reproduction techniques like photographing the screen). If you don't want something you say reproduced and seen by everyone in public, you shouldn't be saying it on the Internet. In fact, with today's level of mobile phone use, you shouldn't be saying it at all, because at any point someone can press a button on their phone and record you (and there's plenty of software that'll immediately upload it to remote secure web storage so even confiscating the phone isn't enough).
There are certainly areas where you have an expectation of privacy. For instance, you have a reasonable expectation your ISP isn't going to divulge your preference in pornography (along with the people who wrote your web browser and operating system). And you can certainly start suing people after the fact should information which needs to remain private is leaked. But, despite attempts to have super injunctions, you can't sue someone before the fact to prevent a juicy secret being released, and doing so is a big red flag for people who look for that sort of thing.
So Facebook's hard to use privacy controls and hidden and ambiguous relevancy filters are actually a better reflection of the state of control of your personal information than Google's deceptively easy to use system of circles, which create a false sense of security about how far what you say can be shared.
And that's ignoring the fact that circles are in some sense the wrong way around. I only want to hear about your interest in game design, not see photographs of your cats. But occasionally I might, because it may make me more likely to think of you as a real person as opposed to an anonymous stream of text on the Internet.
(This post brought to you by the Charles Stross school of blogging).
Friday, 19 August 2011
An apology
Just a quick update to people who've already read the previous post on procedural generation that I've amended the article to include an apology about some ill-judged generalisations I made in haste.
Miguel Cepero wrote an article in response to this post, and quite rightly points out that I made a number of statements which were not especially nice things to say, specifically when his and Shamus Young's project should not be judged as they have not been released. I would like to apologise for this.
Miguel Cepero wrote an article in response to this post, and quite rightly points out that I made a number of statements which were not especially nice things to say, specifically when his and Shamus Young's project should not be judged as they have not been released. I would like to apologise for this.
Thursday, 18 August 2011
Proceduralism: Part Six (Architecture)
[You'll probably want to read the original article series that inspired this follow up, then start with parts one, two, three, four and five of this series.]
Edge Magazine recently featured an article, Building Worlds with a Single Click, which highlighted and praised two exciting new projects by independent developers: Project Frontier by Shamus Young and Procedural World by Miguel Cepero, both of which feature beautiful procedurally generated worlds.
The thing is, we've got very good at building procedural worlds - so good that virtually every example uses the same small underlying set of well understood systems: noise, L-system based architecture, Whittaker diagrams and so on that even a single programmer working in their spare time can implement. Just to pick a few featured in the World Building page on the PCG wiki: Making Worlds, Procedural Planets, Dungeon League, Polygon Map Generation. And of course, there's Infinity: the Quest for Earth, L.o.V.E. and Spore; all of which feature incredibly detailed environments created by incredibly talented and smart programmers.
And all these amazing worlds?Almost everyone is focused on building these curate's eggs - which, if they eventually end up being released as a game, become a disappointing, empty and lifeless one.
[Edit: Miguel Cepero has responded to this post, and quite rightly points out that the above statement is not a nice thing to say, specifically when his and Shamus Young's project should not be judged on this basis as they have not been released. I would like to apologise for making this generalisation, which the article in Edge magazine points out is the big challenge that all these projects face.]
Does almost all procedural generation amount to, as John Carmack puts it, is "a really crappy form of data compression"?
My procedural spider senses tingle as soon as I see a procedural generation system that uses one of the following two approaches:
1. Mazes (and by extension BSP-trees)
2. Height maps
because I've yet to play a game where I've exclaimed 'Wow, what a great height map' (except Populous, but we'll get to that) and the pleasure of solving a maze isn't the same as the pain of having to play through one.
I've also seen a rise in recent suggestions and several implementations of Metroid-style procedural generation featuring gated lock-and-key puzzles to partition a map, on the assumption that being forced to traverse through a non-linear space looking for a key is some how interesting. This is putting the cart before the horse: Metroid (and Zelda) use this technique to force the player to explore an already interesting (and hand-designed) location, not because looking for a key is itself challenging. The lock-and-key puzzle is merely a dressed up fed ex quest where you're not told the location of the package you have to deliver (or worse, you stumble across the package without knowing its destination address).
When we talk about architecture in game play, we don't think of buildings and naves and antechambers: we refer to choke points, and cover, and objectives. The topology of the space is much more important than its aesthetic or fidelity. The most successful (and perhaps only successful) procedurally generated game spaces so far are all based on Rogue, with its simple room and corridor design.
With a room and corridor design we get four important features:
1. Corridors - which act as natural choke points at each end, and cover if you are in them
2. Convex shapes - spaces where you can see everything in the space from everywhere else
3. Concave shapes - spaces where some space is hidden from another (more cover)
4. Loops - which allow you a safe haven by traversing the loop to recover when chased by enemies of the same speed or slower
Elite, the other arguably successful procedurally generated game space, remains interesting because it is a procedural objective generator. Here you are searching for trade routes between high tech industrial and low tech agricultural worlds: the topology is interesting only because every edge is a potential goal.
Populous, Dwarf Fortress, Minecraft and Terraria all cheat procedural generation in two important ways: they allow you to modify the topology of the space and they encourage you to make interesting content in that space to which you become attached. An uninteresting dead end can be transformed into a useful corridor, or lit by a torch to mark that you've 'already been here' or mined for valuable ore. The procedural generation systems they use may make beautiful places, but it is the player's job to change them into interesting spaces.
It helps in the case of Minecraft and Terraria that much of the procedurally generated spaces mimic Rogue's room and corridor layout. Strategy games generally generate a mix of the Rogue-type (open areas, choke points defined by inaccessible terrain) and generation of objectives through resource scattering (call this Civilisation-type PCG).
Even with a room-and-corridor design, the architecture, or more correctly topology of a space is insufficient to lead to great procedurally generated games. As I discovered when working on Unangband dungeon generation, it is the contents of these generated spaces that is the most important part of procedural generation. And that is why it is so frustrating to see developer after developer get trapped in architecture, distracted by beautiful world building, and not concentrating from the start on the creating content.
And I'll be discussing content in part seven.
Edge Magazine recently featured an article, Building Worlds with a Single Click, which highlighted and praised two exciting new projects by independent developers: Project Frontier by Shamus Young and Procedural World by Miguel Cepero, both of which feature beautiful procedurally generated worlds.
The thing is, we've got very good at building procedural worlds - so good that virtually every example uses the same small underlying set of well understood systems: noise, L-system based architecture, Whittaker diagrams and so on that even a single programmer working in their spare time can implement. Just to pick a few featured in the World Building page on the PCG wiki: Making Worlds, Procedural Planets, Dungeon League, Polygon Map Generation. And of course, there's Infinity: the Quest for Earth, L.o.V.E. and Spore; all of which feature incredibly detailed environments created by incredibly talented and smart programmers.
And all these amazing worlds?
[Edit: Miguel Cepero has responded to this post, and quite rightly points out that the above statement is not a nice thing to say, specifically when his and Shamus Young's project should not be judged on this basis as they have not been released. I would like to apologise for making this generalisation, which the article in Edge magazine points out is the big challenge that all these projects face.]
Does almost all procedural generation amount to, as John Carmack puts it, is "a really crappy form of data compression"?
My procedural spider senses tingle as soon as I see a procedural generation system that uses one of the following two approaches:
1. Mazes (and by extension BSP-trees)
2. Height maps
because I've yet to play a game where I've exclaimed 'Wow, what a great height map' (except Populous, but we'll get to that) and the pleasure of solving a maze isn't the same as the pain of having to play through one.
I've also seen a rise in recent suggestions and several implementations of Metroid-style procedural generation featuring gated lock-and-key puzzles to partition a map, on the assumption that being forced to traverse through a non-linear space looking for a key is some how interesting. This is putting the cart before the horse: Metroid (and Zelda) use this technique to force the player to explore an already interesting (and hand-designed) location, not because looking for a key is itself challenging. The lock-and-key puzzle is merely a dressed up fed ex quest where you're not told the location of the package you have to deliver (or worse, you stumble across the package without knowing its destination address).
When we talk about architecture in game play, we don't think of buildings and naves and antechambers: we refer to choke points, and cover, and objectives. The topology of the space is much more important than its aesthetic or fidelity. The most successful (and perhaps only successful) procedurally generated game spaces so far are all based on Rogue, with its simple room and corridor design.
With a room and corridor design we get four important features:
1. Corridors - which act as natural choke points at each end, and cover if you are in them
2. Convex shapes - spaces where you can see everything in the space from everywhere else
3. Concave shapes - spaces where some space is hidden from another (more cover)
4. Loops - which allow you a safe haven by traversing the loop to recover when chased by enemies of the same speed or slower
Elite, the other arguably successful procedurally generated game space, remains interesting because it is a procedural objective generator. Here you are searching for trade routes between high tech industrial and low tech agricultural worlds: the topology is interesting only because every edge is a potential goal.
Populous, Dwarf Fortress, Minecraft and Terraria all cheat procedural generation in two important ways: they allow you to modify the topology of the space and they encourage you to make interesting content in that space to which you become attached. An uninteresting dead end can be transformed into a useful corridor, or lit by a torch to mark that you've 'already been here' or mined for valuable ore. The procedural generation systems they use may make beautiful places, but it is the player's job to change them into interesting spaces.
It helps in the case of Minecraft and Terraria that much of the procedurally generated spaces mimic Rogue's room and corridor layout. Strategy games generally generate a mix of the Rogue-type (open areas, choke points defined by inaccessible terrain) and generation of objectives through resource scattering (call this Civilisation-type PCG).
Even with a room-and-corridor design, the architecture, or more correctly topology of a space is insufficient to lead to great procedurally generated games. As I discovered when working on Unangband dungeon generation, it is the contents of these generated spaces that is the most important part of procedural generation. And that is why it is so frustrating to see developer after developer get trapped in architecture, distracted by beautiful world building, and not concentrating from the start on the creating content.
And I'll be discussing content in part seven.
Wednesday, 17 August 2011
Curation
I've been puttering about, updating parts of the PCG wiki and putting together a short survey to try to figure out why there's not more of a community involved in updating it (One observation: I was forgetting to approve membership requests. Sorry to anyone who applied and was waiting).
Coincidentally, I listened to a Moving Pixel podcast where the chaps from Critical Distance discuss the same problem I've been having: how to turn a list of interesting links into something with more structure and 'authority' (A word I'm wary of). At the moment, the PCG wiki is basically a big bunch of external links with a bit of structure, and I don't see myself having the time to do more than keep it vaguely up to date (Along with tricks like aggregating RSS feeds from various blog posts to make it look like it's being updated more frequently than it is).
[Edit to add: Craig Perko's Google plus comment on the same issue.]
So in one way, the wiki is no more useful than the Delicious procedural tag RSS feed.
And the wiki structure isn't quite right for what it needs to be. So I'm going to sketch out an idea and see if you have any suggestions as to whether anything else fits the bill.
Firstly, I need a tool, like Delicious, which does simple link aggregation, but in a way that is domain specific, so I and other wiki users can tag it with words like 'article', 'blog post' and so on, but also 'noise', 'maze', 'caves' which don't bring up every single 'blog post' in existence by someone using the same tool. Other than copy and paste, the wiki falls down here.
Then I need to be able to keep related links together on the same page. The way the Internet works at the moment, a blog post may spark follow up posts on Metafilter, reddit, various web forums and so on, which all make sense to group together, but will include their own original content.
Then it needs wiki style authoring over the top, along with discussion groups, rating systems similar to stack overflow and so on.
I can kind of hack this with the wiki currently, by having every 'external link' actually be another wiki page in front of the external link, but this is still missing Delicious style link tagging and is horribly clumsy.
This excludes all the problems with the current wiki (and wikis in general) having data handling (should year released = 1997 be metadata or tags?), dynamic templating and etc.
Coincidentally, I listened to a Moving Pixel podcast where the chaps from Critical Distance discuss the same problem I've been having: how to turn a list of interesting links into something with more structure and 'authority' (A word I'm wary of). At the moment, the PCG wiki is basically a big bunch of external links with a bit of structure, and I don't see myself having the time to do more than keep it vaguely up to date (Along with tricks like aggregating RSS feeds from various blog posts to make it look like it's being updated more frequently than it is).
[Edit to add: Craig Perko's Google plus comment on the same issue.]
So in one way, the wiki is no more useful than the Delicious procedural tag RSS feed.
And the wiki structure isn't quite right for what it needs to be. So I'm going to sketch out an idea and see if you have any suggestions as to whether anything else fits the bill.
Firstly, I need a tool, like Delicious, which does simple link aggregation, but in a way that is domain specific, so I and other wiki users can tag it with words like 'article', 'blog post' and so on, but also 'noise', 'maze', 'caves' which don't bring up every single 'blog post' in existence by someone using the same tool. Other than copy and paste, the wiki falls down here.
Then I need to be able to keep related links together on the same page. The way the Internet works at the moment, a blog post may spark follow up posts on Metafilter, reddit, various web forums and so on, which all make sense to group together, but will include their own original content.
Then it needs wiki style authoring over the top, along with discussion groups, rating systems similar to stack overflow and so on.
I can kind of hack this with the wiki currently, by having every 'external link' actually be another wiki page in front of the external link, but this is still missing Delicious style link tagging and is horribly clumsy.
This excludes all the problems with the current wiki (and wikis in general) having data handling (should year released = 1997 be metadata or tags?), dynamic templating and etc.
Monday, 15 August 2011
Party like its 2007
In some weird aberration, I appear to be playing (and enjoying) more games from 2007 than 2011. It isn't completely weird when you consider the Steam sales, but the ridiculous Australian pricing of many games has forced me to move to a different supplier (Thanks ozgameshop).
Not only have I completed Bioshock, but I stayed up way past any sensible time last night playing the original Crysis because I was having too much fun. Contrast this with the multiple evenings of game play where I've been stuck on completionist grind (Portal 2, Terraria, Brink - damn your RPG systems for ruining my FPS, the second half of Borderlands and especially the first Witcher - except for Chapter 3 which played refreshingly quickly). I was so worried this morning about the guilty pleasure of Crysis that I checked its score on Metacritic to validate my feelings - it has a better score (91) than any game from this year with the exception of Portal 2.
(In other 2007 game news: My Team Fortress 2 addiction has got to the point where I've gone into voluntary withdrawal until I get an Enforcer drop. Idling is the new methadone).
I'm at the point where I dread playing a game that orders me around with quests and the lure of a new shiny. I've opened Fallout 3 and got as far as the main menu multiple times without actually playing it. My list of games on Steam has started haunting me as a list of things I should feel guilty about not finishing.
I'm enjoying indie puzzlers (Spacechem, Frozen Synapse) in bite size pieces, but small nuggety levels feel too much like quests to me at the moment.
I'd rather have a tasty trail of North Korean bread crumbs.
Not only have I completed Bioshock, but I stayed up way past any sensible time last night playing the original Crysis because I was having too much fun. Contrast this with the multiple evenings of game play where I've been stuck on completionist grind (Portal 2, Terraria, Brink - damn your RPG systems for ruining my FPS, the second half of Borderlands and especially the first Witcher - except for Chapter 3 which played refreshingly quickly). I was so worried this morning about the guilty pleasure of Crysis that I checked its score on Metacritic to validate my feelings - it has a better score (91) than any game from this year with the exception of Portal 2.
(In other 2007 game news: My Team Fortress 2 addiction has got to the point where I've gone into voluntary withdrawal until I get an Enforcer drop. Idling is the new methadone).
I'm at the point where I dread playing a game that orders me around with quests and the lure of a new shiny. I've opened Fallout 3 and got as far as the main menu multiple times without actually playing it. My list of games on Steam has started haunting me as a list of things I should feel guilty about not finishing.
I'm enjoying indie puzzlers (Spacechem, Frozen Synapse) in bite size pieces, but small nuggety levels feel too much like quests to me at the moment.
I'd rather have a tasty trail of North Korean bread crumbs.
Saturday, 6 August 2011
Prototyping
If you want to rapidly prototype your roguelike UI, you might consider having a look at Ascii Flow.
Thursday, 4 August 2011
Old school
I'm starting to think about adding hirelings (aka henchmen) to Unangband, inspired in part by the number of old school D&D blogs which I'm reading. Unangband already has a relatively sophisticated friendly AI, which is used for your familiar, charmed and summoned monsters, monsters you bribe successfully or who surrender to you, as well as the several zones which feature a friendly army spawning alongside you (such as the Battle of Five Armies) - but most of these are specific to spell casters, so it'd be good to give non-spell casting players the opportunity to play the game with friendly monsters alongside them.
There are several issues I'll have to iron out first. The main one is I have to verify that the monster levelling code actually works: that is the adjectives that monsters get ('young, adult, mature, old') as they appear deeper in the dungeon correctly adjusts the monster power to fit the power curve for the depth the monster appears in the dungeon. At the moment, this is a bit of a hack and to clean it up will require some more large scale code changes which I'm a little hesitant in making, seeing as I've still not finished the last set of large scale changes required for items.
There's also the problem of moving your allies between levels, but that's mostly a technical problem and one I need to solve anyway.
The other issue is how do I naturally have non-spell casting characters have an easier time of recruiting and retaining hirelings and henchmen than spell casters? There's no point adding recruitable monsters (and in Angband terminology a monster is anyone who is not the player, so a Novice Priest is a monster) if spell casters have as easy a time with this as non-spell casters.
I suspect I'm going to end up with a hireling morale value - how cheap it is to hire, how loyal are people to you and how long do your henchmen stay with you - that is influenced by three factors: reward, respect and fear.
Reward is straight forward: how much loot (and experience) do you give to your hires?
Respect increases with how much danger you put yourself in, compared to your underlings. Going toe-to-toe in melee will generate the highest respect, which is the first way non-spell casting characters will have an easier time with henchmen and hirelings. But this only benefits melee specialists, not thrown weapons specialists or archers.
Fear inversely effects some interactions: if you are feared, people will obey you more readily, but you lose long term loyalty - which increases the cost of recruiting and reduces the length of the hire.
Fear is going to be slightly trickier to define, but given my requirements above, I'll base fear on the following metric:
It may make more sense to label this stat superstition - it encapsulates the kind of uncomfortable position most hirelings would find themselves in working for a wizard.
[Edit to add: Archers (and thieves) don't generate fear at all (since they don't use magic), which means that the reward contribution is not downgraded by the negative effects of fear. Essentially they are able to recruit without restriction as long as they generate rewards, where a spell caster has to be careful with their recruits because he/she risks alienating them through fear.]
There are several issues I'll have to iron out first. The main one is I have to verify that the monster levelling code actually works: that is the adjectives that monsters get ('young, adult, mature, old') as they appear deeper in the dungeon correctly adjusts the monster power to fit the power curve for the depth the monster appears in the dungeon. At the moment, this is a bit of a hack and to clean it up will require some more large scale code changes which I'm a little hesitant in making, seeing as I've still not finished the last set of large scale changes required for items.
There's also the problem of moving your allies between levels, but that's mostly a technical problem and one I need to solve anyway.
The other issue is how do I naturally have non-spell casting characters have an easier time of recruiting and retaining hirelings and henchmen than spell casters? There's no point adding recruitable monsters (and in Angband terminology a monster is anyone who is not the player, so a Novice Priest is a monster) if spell casters have as easy a time with this as non-spell casters.
I suspect I'm going to end up with a hireling morale value - how cheap it is to hire, how loyal are people to you and how long do your henchmen stay with you - that is influenced by three factors: reward, respect and fear.
Reward is straight forward: how much loot (and experience) do you give to your hires?
Respect increases with how much danger you put yourself in, compared to your underlings. Going toe-to-toe in melee will generate the highest respect, which is the first way non-spell casting characters will have an easier time with henchmen and hirelings. But this only benefits melee specialists, not thrown weapons specialists or archers.
Fear inversely effects some interactions: if you are feared, people will obey you more readily, but you lose long term loyalty - which increases the cost of recruiting and reduces the length of the hire.
Fear is going to be slightly trickier to define, but given my requirements above, I'll base fear on the following metric:
Fear is increased when you use ranged magical abilities, as long as the henchmen cannot use the ability themselves, and is not immune to the ability.So if you cast charm person a lot, you'll drive away henchmen who can be charmed by you; if you want to use a lot of fire magic, hire minions who are immune to fire, and so on. Summoning spells increase fear regardless.
It may make more sense to label this stat superstition - it encapsulates the kind of uncomfortable position most hirelings would find themselves in working for a wizard.
[Edit to add: Archers (and thieves) don't generate fear at all (since they don't use magic), which means that the reward contribution is not downgraded by the negative effects of fear. Essentially they are able to recruit without restriction as long as they generate rewards, where a spell caster has to be careful with their recruits because he/she risks alienating them through fear.]
Wednesday, 3 August 2011
I'm on Formspring
Since I'm in an experimental social networking phase at the moment, I'm now on Formspring. This follows a recommendation from Troy Goodfellow.
Feel free to ask me anything.
Feel free to ask me anything.
Monday, 1 August 2011
Drawbacks
I'm fascinated by the idea of stats which have no maxima.
By this I mean that any value along the stat range has advantages and disadvantages. I've done this ever so slightly for the Size stat in Unangband, where increasing Size lowers your Agility, but this is too easily overcome (by having high Strength) and to make it more significant would require a redesign of the whole class and stat system.
A clearer example of this is the Body Type characteristic in Brink. In that game, you can have either a character with high hit points and the widest selection of weapons, but moves slowly and unable to climb obstacles effectively (the Heavy body type) or a character with lower hit points, much more restricted weapons, but high speed and maximum movement choices (the Light body type) or one in between.
Now you can simulate a stat system with no maxima by having a fixed number of stat points you can allocate to various stats, and provide no way of increasing the number of stat points you have. There are three problems with this: two obvious and one subtle.
The first obvious problem is the fallacy of stat equivalence: that is, increasing your strength stat by one point is equal to increasing your intelligence by one. In a system with stats with no maxima, you have to explicitly balance the drawback with the advantage; in a system with a fixed pool of stat points, you loss the ability to have improvements on a bell curve or inverse bell curve, as people will inevitably min-max by dropping points from stats near the middle range to pump one or more stats into the interesting edges of the curve (or vice versa).
The second obvious problem is psychological: people are not good at moving numbers around multiple stats, but when you make explicit trade offs instead of implicit ones, they are much more able to make correct decisions instead of vascillating between multiple seemingly unimportant choices.
A more subtle problem is that you miss out on systems which have interesting but hard to define drawbacks: an example of which is the Luck stat. Having a high luck means you get the widest variation of dice rolls against you (good and bad), having a low luck means you get fixed results every time. Having a low luck and therefore low variation emphasises skill (think TF2 servers with no randcrits and no damage spread), having a high luck means you occasionally overcome overwhelming odds (and therefore have more chance of having fun), but also can perform below par.
Now the question I have, is it possible to design a system in which you have every player characteristic defined by stats with no maxima?
The first example I can think of is Belief. If you have high Belief, you have powerful spell casting abilities, but are also vulnerable to magic being used against you; if you have low Belief, you are highly resistant to magical effects applying against you, but are unable to use magical effects reliably.
Any suggestions for other stats which could operate this way?
By this I mean that any value along the stat range has advantages and disadvantages. I've done this ever so slightly for the Size stat in Unangband, where increasing Size lowers your Agility, but this is too easily overcome (by having high Strength) and to make it more significant would require a redesign of the whole class and stat system.
A clearer example of this is the Body Type characteristic in Brink. In that game, you can have either a character with high hit points and the widest selection of weapons, but moves slowly and unable to climb obstacles effectively (the Heavy body type) or a character with lower hit points, much more restricted weapons, but high speed and maximum movement choices (the Light body type) or one in between.
Now you can simulate a stat system with no maxima by having a fixed number of stat points you can allocate to various stats, and provide no way of increasing the number of stat points you have. There are three problems with this: two obvious and one subtle.
The first obvious problem is the fallacy of stat equivalence: that is, increasing your strength stat by one point is equal to increasing your intelligence by one. In a system with stats with no maxima, you have to explicitly balance the drawback with the advantage; in a system with a fixed pool of stat points, you loss the ability to have improvements on a bell curve or inverse bell curve, as people will inevitably min-max by dropping points from stats near the middle range to pump one or more stats into the interesting edges of the curve (or vice versa).
The second obvious problem is psychological: people are not good at moving numbers around multiple stats, but when you make explicit trade offs instead of implicit ones, they are much more able to make correct decisions instead of vascillating between multiple seemingly unimportant choices.
A more subtle problem is that you miss out on systems which have interesting but hard to define drawbacks: an example of which is the Luck stat. Having a high luck means you get the widest variation of dice rolls against you (good and bad), having a low luck means you get fixed results every time. Having a low luck and therefore low variation emphasises skill (think TF2 servers with no randcrits and no damage spread), having a high luck means you occasionally overcome overwhelming odds (and therefore have more chance of having fun), but also can perform below par.
Now the question I have, is it possible to design a system in which you have every player characteristic defined by stats with no maxima?
The first example I can think of is Belief. If you have high Belief, you have powerful spell casting abilities, but are also vulnerable to magic being used against you; if you have low Belief, you are highly resistant to magical effects applying against you, but are unable to use magical effects reliably.
Any suggestions for other stats which could operate this way?