Speaking at ProcJam 2014

Just a quick one this week. I’m an invited speaker for a series of talks on the first day of the Procedural Generation Game Jam happening this year, headed up by Michael Cook!

This day of talks is on the 8th of November and the current plan is to have it streamed on Twitch. Tickets are going to be available soon, so if any of you live in London or can make it down, come along! You can read more about the game jam here, and the tumblr blog for updates is here. The jam is a week-long and there are seven or eight speakers lined up; one of the other speakers who hasn’t yet been announced will also be very familiar to those of you who follow your roguelikes…

The working title for my presentation is “Managing Size, Scope and Scale in Procedural Generation” – I’m going to talk a bit about how to manage a project of URR’s size in regards to two main themes. Firstly, the programming side – what kind of data structures can you use to handle all these different scales of information, from the histories of entire civilizations down to what items people have in their homes? How can you have the game link everything together from a battle between two civilizations, to who fought in it, to what weapons they used, where they were buried, where you might find that weapon, and what meaning others might attribute to it? The second half of my talk is going to be about this same issue but from an artistic/creative standpoint – what’s the value of having a game which holds data at all these scales, and what kind of interesting gameplay mechanics can you create with it?

In other news, still aiming for next month for beginning full-time development. New obstacles are arising as ever, but we’ll see how it goes, and PhD-finishing-work is proceeding at a damned good pace now. More updates as and when…

A Story about Losing

Until I began working on my doctorate and coding URR I was intending to play online poker for a living for the rest of my life. A surprising number of people do this – no clear statistics exist, but based on my three years of playing the game semi-professionally and the research I did into making the “jump” to pro, I would guess there are perhaps around fifty thousand people around the world, in-person and online, tournament and cash game, who play the game as their primary source of income, and earn enough to “make a living” from it. When I quit, I was making enough to survive on full-time – not enough to fly off to Vegas every year and play in the World Series, not by a long margin, but grinding enough to get by. Along with roguelikes, poker was my first experience of playing something where there was something “at stake” every time you play – not the three minutes of a Counterstrike game or the rankings of a 1v1 competitive ladder, but many many hours of focus and concentration, effort, study, and (in poker’s case), money. The experience informed my contemporary opinions about game design, the value of roguelikes (and other games with an “arcade mentality” such as shmups), and the importance of being able to lose. This is thus the story of the most crushing defeat I suffered in poker, why after that hand – now three years ago – I haven’t played a single hand of poker since then, and also the benefits (and risks) of taking play a little more seriously than normal.

I started playing poker around my eighteenth birthday. I’d been playing it a lot in person and was the strongest player among my friends (though in hindsight I was a very poor player, but none of us had any idea what we were doing). I’d seen poker played on TV, and (in what has become a cliched story) thought this could be an interesting way to earn some money, and potentially a living. I started playing; I was awful, and lost my initial deposit to a poker site ($200, I think). I deposited again, and played fractionally better, though again in hindsight I recognize I got very, very lucky over the course of several weeks here which biased the young me to thinking he had some idea what he was doing. As time went by I continued to just about break even and started joining strategy forums, watching poker videos, discussing the game with players better than me (i.e. the majority of the planet). I got better, and started to profit, and profit more, and move up stakes. Once I was into my second year of university I was making enough that, without the degree consuming some of my time, I could easily make a living from the game. I thus decided that once I finished my degree I was just going to do that. Making a living from a game seemed like the absolute dream – yes, poker was sometimes frustrating, upsetting, infuriating and tedious, but it was also the deepest game I’ve ever played, challenging, enticing, and fascinating.

There are basically two types of poker game – cash games and tournament games. I was always a tournament player. The sense of building towards a conclusion, of “winning” a tournament rather than simply leaving the table with more money, and the structure of a tournament and the specific strategy concerns that needed all appealed to me. However, tournaments are notoriously “swingy” – the prize pools for tournaments are crammed into the top 1/2/3-place prizes, meaning that the graph of the average tournament player looks something like this:


Lots of tiny losses from paying the entry fees to play tournaments, and a few big wins (this is the graph from one of my side accounts). To mitigate this, I normally played tournaments of around 300-500 players. I found that was a sufficiently large field that the prizes were significant and worth actually competing for, but that the field wasn’t so absurdly large that you could play brilliantly for months or even years without a big score. This was the kind of game I made a consistent profit from, of the sort shown in the above graphs – 99/100 tournaments would go nowhere, but that tournament I made it to the end of would yield the serious income (for comparison, eSports tournaments are generally structured the same way, and I assume physical sports are too, though I have no idea if that’s the case).

All poker players above a certain level have specialisms. Some are great heads-up players (two player matches), some are great at sit-n-gos (small one-table tournaments), some at different games (holdem, stud, PLO, draw, whatever), and so forth. My specialism quickly became “final tables” – the point where there are only 9 or 6 people left in the tournament (depending on the structure) and all the remaining players are put on one table to play down to a winner. I had roughly a 25% winrate on final tables – this might seem low, but that’s actually a pretty insane record. Most people consider 20%+ on final tables to be a very, very solid result, but there was something about the structure and psychology of the final table that always played well with me. Other players suddenly become easy to exploit, easy to see if they were playing for the win or playing to creep up the pay ladder, and if I made it to the final table I always knew I had a fantastic shot of taking the entire thing down.

One day at the end of my final year of my degree I decided to play a bigger tournament than normal, not knowing this would be the last poker tournament I ever played. If I recall correctly there were around 6000 players, vastly larger than normal. I just fancied doing this tournament for fun, mostly, not for profit – I wasn’t seriously expecting to cash (finish in the top 10%), but I just wanted to see how a huge tournament played vs tournaments of the size I was more used to. I started this tournament at around 12am UK time.

…Twelve hours later, the 6000 players were down to 30, and I was 3rd in chips. It had been transformed from a silly passing diversion into, potentially, the most profitable tournament of my life. If I reached the final table I was guaranteed to make from that one tournament more than I would in several months; if I won, I’d make roughly as much as I’d made in the last three years combined, and basically a full year’s living wage. In one day. It was insane… the feeling of being so late in such a big tournament, with so much on the line, was like nothing I’d experienced before, even when final-tabling and winning smaller tournaments. However, there was a catch. If I went out of the tournament in 30th place, say, due to the top-heavy structure of tournaments I’d make a pittance, barely worth the time investment of the twelve hours. The extreme dichotomy between 9/6000, say, and 30/6000 was striking (as was the gap between 1/6000 and 9/6000). But I had a lot of chips, I was playing the best poker of my life, winning risky hands where I needed to, and on track to hit the final table, where I knew I had the best shot of almost anyone there.

Then… came the hand.

If you play a lot of poker (I played roughly 1,500,000 hands across my career), you get bored of “bad beat stories”. These are tales where the teller made a good play but someone else got lucky and won. There’s nothing more tedious to listen to if you’re a semi-pro/pro, as these happen a million times a day, and it is these players we profit from. Those who make mistakes, and rely on luck to win, are those that in the long-term will lose, infuriating as losing from time to time to these players may be. So I’m not going to whine about a “bad beat” here or bore everyone with the details – the fact I played a hand for all my chips, got my money in way ahead and lost, wasn’t the point. That happens a hundred times a day. But I remember the chips flying towards my opponent, the popup informing me I was out of the tournament, and the instant and almost epiphanic realization that I was never going to play poker again.

It wasn’t that I’d taken my shot and missed. I’d taken my shot, it had been perfectly on target, and some bastard had stepped in front and taken the bullet. The emotional investment I’d built up in the tournament entirely subconsciously hit me harder than I can describe. I remember I just stared blankly at the screen for about ten minutes then wandered into the living room of the house I was sharing, where I informed the person there (who I am once more moving in with next year as part of my full-time development year) about what had happened. That I’d (as it felt to me at the time) been on course to making a year’s income in one night, and I’d made the right play, and busted out of the biggest tournament I’d ever played. I then got a coat and went for a midnight walk for about three hours, trying to process what had just happened – how close I’d been to such an insane win, and that it had been taken from me.

I realized, as I wandered, that it takes two things to play poker for a living. One of those is the skill at the game – that I had. Even today I’m confident I could teach someone to play the game for a living. But the other, which I’d never truly appreciated until this night, but something like emotional stability, or ability to take losses and just move on. As I walked I came to understand that I didn’t have this – this loss was just too painful. It wasn’t the loss of money, or loss of time, but the loss of potential, the loss of what might-have-been. It was as if, to paraphrase an Iain Banks line of dialogue, I’d been cheated out of a birthright. The tournament was mine to win and it had been taken from me, just as if my internet had cut out, or the power had gone, or I’d suddenly been rushed to hospital. It’s hard to describe the feeling of playing a game perfectly, or near-perfectly, until you’ve experienced it, but I had it that night. It felt as if everyone else was playing with their cards face up and I just couldn’t make mistakes. I think anyone who’s played any game at a high level must have experienced this once or twice; the feeling of being so perfectly in tune with the game that you just can’t make mistakes. Again, in hindsight, this feeling of invincibility from the level I was playing contributed to the crushing weight of the unjust defeat. I no longer had it in me to play a game that could do this to me. The bad beat didn’t bother me intellectually, but the way it made me feel did, and I just didn’t think I could run the risk of feeling so dire ever again.


I returned home eventually and logged onto all my accounts on all the different websites and withdrew every dollar I had. Since that day I don’t think I’ve played the game once. Whilst trying to process how this had made me feel, I realized I needed a new career path and settled on academia. In hindsight, I also realize that there was something very William-Gibson-esque about the entire situation. An algorithm in a server somewhere in Florida had spat out a number; that number had resulted in an entirely virtual card falling; and the falling of that card had fundamentally, instantly and irreversibly altered the career path of a young man in England. The deeply weird global interconnectivity of the thing would have probably struck me more deeply at the time were it not for the emotional impact, but at the time I was too busy trying to come to terms with what had happened.

As time has gone by, though, I have developed something akin to a kind of pride in what happened, though pride is perhaps not the best word. I came to realize that the only reason something like that was able to happen was because of two things, the first of which was my skill at the game. I was able to play in such a huge tournament and push through to the absolute end, and even though I lost the fatal hand, the play I made was the statistically correct one. I was only there because I played perhaps the best poker of my life that day…

…but also because, in a way, I had opened myself up to be hurt by something like this. Not just the money but the time and the emotional impact were all things I had, knowingly or not, put on the line. I’d put all of myself into the game and allowed the game to do what it would with me. I’d had to transform a game, a thing of “play”, into something I cared about enough that it could have this impact on me. And as time has gone by, I realize that this has always been the case in whatever games I’ve taken seriously. Poker may be the most extreme example, but the same is the case in EVE Online (which I played for several years), where losing a ship can mean losing hours, days or weeks of money and work; the same case in roguelikes; the same case now where I’m pursuing bullet hell world records and the feeling I get every time I just fall short. But I’m putting myself out there – I put everything I have into these games. Maybe I will sometimes fall short, either through my own lack of skill or the cruelties of random number generators, but at least then I fail pushing my own limits as a twitch-reflex gamer or gaming tactician. If you can’t have a crushing defeat, so the wisdom goes, you can never know the true feeling of victory. I was denied it that day but I’ve had it in other games since, and I know before too long I’ll have a world record (or two) to put up on this blog.

To conclude, I’m reminded of one of my favourite quotes from Johan Huizinga. As painful (and surreal) as this experience was, this quote helped remind me that when one plays at any kind of serious level, you have to accept the possibility of loss, severe loss, and in the final reckoning this is really what play is. And that the only reason I was able to experience this kind of crushing event was because I’d managed to learn and study a game to a high enough level that enough was at stake for such a thing to happen, and put enough of myself into the game that something could hit me this hard. In hindsight I really have no regrets. The ride, ultimately, was worth it.

“There is something at stake” – the essence of play is contained in that phrase. 

– Johan Huizinga

Fortresses Finished!

In the little bits of time I’ve been able to find to code at the moment, I’ve managed to just about finish off all the different fortress archetypes. There are twelve in total – each nomadic civilization decides on one at worldgen that it will use for their desert encampments, and then each is subsequently generated according to the chosen algorithm. They each also handle rivers going through them in different ways – some loop rivers around them, some have rivers go through them, and there’s a fair bit of code handling the placement of bridges and entrances to ensure that no matter your angle of entering the fortress, and the position of the fortress on/off a river, you can always access the entire thing. Some are large, some are small; most have all their components within the walls, but some have spread out beyond the walls; some are well-defended, some less so. The white %s are placeholders for market stalls which I haven’t yet created the terrain type for, and the large “oval” buildings are barracks, the smaller circular buildings in military districts being buildings where you may find particular NPCs of military value.

Here are some examples. Bear in mind that these images don’t show the changes in height, but rather give you an overall plan of how these areas are laid out. The algorithms shown here are the “Concentric Square”, “Circle Lines”, “Star Fort” and “Cross” variations. They’re tremendous to walk around – even without NPCs (two versions away!) one can already tell what they’ll be like once they’re populated.



Now, for a general update. Editing my PhD thesis for submission is going well. The first third of it is bordering on submission-ready and I’m now working on the middle third. I’ll be moving house to “start” the full-time development year around the first week of October, give or take, but I suspect I won’t be submitting my thesis until some time around the middle of October. So, for the next month-and-a-bit we’ll be focusing on non-URR entries with a few short updates like this one, then my current prediction is starting my full-time development year some time in October. Once we do, we’ll switch back to full and detailed weekly blog updates, regular Facebook/Twitter updates and the rest of it. AND 0.6 WILL BE COMING, as the first step to totally finishing the worldbuilding block within a year of going full-time. Once that officially starts, I might even put up some kind of “one year countdown” on the blog to remind me how many days I have left to finish the worldbuilding. It’s going to be awesome, internet friends. Next time: an entry I’ve been working on for the best part of a year with some thoughts about AI…

The Value of Maps

In Alpha Centauri (and previous Civilization games) you are able to trade maps between players. These maps are effectively a list of tiles that the other player has already discovered; once the trade is complete, your map is updated and all those tiles become visible and roll back from the fog of war. Although normally a matter of trade, in AC a “Defensive Pact” with another player yields regular updates – in this instance acquiring a map from another player becomes more like a gradual incremental uncovering of the map, rather than a one-off discovery of their land and any exploration they’ve carried out. Regardless of the method, though, you are able to transfer information between players about the world, and I’ve recently been wondering about how these games try to quantify the value of these maps, and what this means for buying/selling/trading maps in URR in the future.


When you trade with other players in AC you have a range of things you can trade. You can decide to exchange money, technologies, votes on the planetary council – and, potentially, your world map. The world map of you or the other players is an item just like any other. You can offer to trade your world map for two technologies, say, or see if they’ll agree to give you their world map for five hundred credits. Something that has always intrigued me is that this is the only case where player information – the location of their cities, disposition of their forces, etc – is traded on the same screen as in-game resources such as money or technologies. The world map doesn’t speed up your technologies or allow you to purchase more items, but it does give the player, not the army you play as, important information. It is as if you give the AI some in-game items and in exchange they give you a hint, or a tip, or a clue towards solving a puzzle.

This raises the fundamental question of this post – how can we value a map? Can we try to quantify the kind of information given by a map? In Civ/AC games, to the best of my knowledge, the value of the map is determined according to how many tiles have been discovered. The more tiles, the more valuable the AI considers the map to be, and thus the more they will demand in exchange. Naturally, one could consider a dozen other metrics – perhaps a map that shows a lot of coastline should be valued higher, given the strength of naval warfare in almost all Civ games to date? Perhaps the value of trading the map should be modified by international relations; trading a map to an enemy should, presumably, cause the AI to demand much more than giving a map to a trusted friend?

Equally, though, this still requires the map to be quantified. One thing I think that impacts the value of this map is something that cannot be defined within the game’s code, and this is the skill and knowledge of the player. I would suggest the more skilled the player, the greater advantage they will be able to gain from acquiring a map of enemy territory. The more they understand about the game’s mechanics, the more useful the map is. Consider two players: for one player, the map might only have the value of telling them where on the map the enemy empire is, and they just charge their units into the breach; a second player, on the other hand, may take the time to figure out where they can attack from, how best to move their units in, chokepoints, which cities are weakest, etc. The more the player knows the potential value of what they’re looking at, the more value that map obviously has, but the computer can’t account for this.


The default AC map – for an advanced player, playing on this map makes the world predictable, and negates the value of map data to an extent.

On one level, therefore, the value of the map depends on the skill of the player. This is obviously true to anything in a game to an extent – an item will be of more use to a player who really knows what to do with it – but I think it is particularly relevant with a map. The map doesn’t support your character or your faction, just the player, and that makes it a rather unique trading item.

So what does this mean for URR? I’ve a long-standing fascination with old maps and I’d like to reflect this in the game; if you’re in Civ A and buying maps for Civ B, the distance between the two will affect the accuracy of the maps. Some maps will be spot on, some maps will be somewhat less so. Most maps will have an accurate representation of who lives in those lands, but perhaps some maps will speak of entirely fictional lands, or rulers who’ve never existed, or lands where strange creatures roam?


A map supposedly of Prester John’s “abyssinian” empire, i.e. roughly about modern-day Ethiopia.

You’ll probably be able to purchase maps in stores in 0.8 or 0.9 once NPCs and conversations and whatnot are implemented. My current intentions are:

– A range of different types of map. You might be able to buy maps for districts, for cities, or for nations or chunks of land. The different scales will be reflected in the prices of the map, and the proximity to where you are buying the map for; you can presumably buy maps for City X when you’re close to City X, but distant nations are unlikely to sell them (unless the trader happens to have found such a map). I may also add some unusual types of “map” that show you a full road, for example, or highlight a mountain pass or a naval trade route, but we’ll see.

– Their value will vary (which brings us back to the questions posed by Alpha Centauri). Naturally this is one of those things that requires playtesting, but the larger map = higher cost is a logical opening point, and different price ranges for world, city and district maps. I will also be implicitly assuming that the player is aware of the value of maps and pricing them accordingly; the strategy layer implemented in a few versions which will focus around navigating your way around the world will be greatly assisted by maps, and this makes their value significant.

– You will not inherently know WHERE a map fits into your world map. By this I mean if you get a 7×7 map of land, you don’t know exactly where that land fits into your world map. Maybe the trader tells you that land lies to the west, but how far to the west? And are they even right? There’s thus a tiny “minigame” (for lack of a better word) in recognizing when you stray onto land that is depicted on a map you have, and it also allows for an interesting class trait (once these are implemented) – the Cartographer class will automatically know where on their world map an acquired map item should be located, which is in keeping with my desire for classes to give you one unique and significant ability that isn’t to do with combat, stats, etc.

– As above, some maps might be inaccurate. The more distant a map you buy, the more likely it is that some falsehoods will have crept in. Given the emphasis of the game’s themes on truth/fact/reality/falsehood etc, I think this will be interesting, and lend an added impact to discovering the world – is this what I thought it would be? How certain can I be of the nations that lie in the undiscovered shroud of the world map?

I’m very much looking forward to making maps; I think they’ll be very interesting in terms of both gameplay and the kind of procedural graphics I have in mind for generating them. Their future implementation is what got me first thinking about how to try and quantify the value of something like a map in a game, and it’s certainly possible I’ll wind up rethinking this before maps are implemented. Until next time, internet friends.