Mercenaries and Housing…

Just a short update this week, partly since it is only one week’s worth of development rather than two, and partly because I’m preparing for my PhD defence. But, nevertheless, things have been done. Before that, though, two things – firstly, your weekly reminder about the EU IRDC taking place at the UK National Videogame Arcade in Nottingham, which I am hosting. Come along! Secondly, I’m giving a talk on generating cultures and aesthetics at the Norwich Gaming Festival on Saturday 11th. Come along! Both are totally free to attend. I don’t have any other public talks planned in the near future (though nearly a dozen academic lectures at conferences in the next five months), but I’ll obviously let you all know when I do. It is possible I’ll be at this year’s GDC Europe, too. Anyway:

Mercenary Guilds

One of the last few buildings left to generate were mercenary guilds, which have now been implemented. These spawn in (most) city centers. Again, it is hard to make every building distinct, but for mercenary guilds I wanted the idea that one might be “browsing” for mercenaries – each room will be the home of a single person from the guild, who should differ significantly in abilities and equipment but still be roughly similar (I’m going to have guilds designed around a “theme”). Each room has its own randomly-chosen layout. The flooring is a square-tiled mix of wood (the brown) and stone (the grey) – it’s a small thing, but it’s hard to distinguish between all kinds of buildings when you’re only using ANSI! Which is to say: obviously you’re unlikely to go into a building with a sign outside without knowing what the building is, but I’m still trying to keep the interiors very distinct (or as distinct as possible). The woods for tables/chairs/beds are also cycled randomly for each chamber. The locked-door room will be the archives of that mercenary guild – lists of past contracts, etc, which will obviously be useful to your investigations – and may also contain a staircase down to a vault below, containing… well, who knows?

Guild1

Middle-Class Districts

I’ve redone middle-class district generation. Here’s an old example – this is, admittedly, a full release out of date (0.6’s middle class districts had a few smaller gardens, more trees/plants, etc), but you get the idea; much like an “upgraded” lower-class district, random housing patterns, and sometimes roads which end in nothing (or start and end in nothing). I had a few critical comments about middle-class districts after 0.6 and how hard they were to navigate and make sense of, so I decided to do something about them, and to just integrate them slightly more firmly into the rest of the city rather than feeling like a random add-on. So, here’s an old version:

Mid2

…and here are two new versions, for a “square”-aesthetic nation (with a religious building, a bank and a park), and a “circle”-aesthetic nation (with just a park)…

NewS

NewS

… and how it looks to explore and walk around:

NewS

Interrrr

Some things to point out. Firstly, there are now three types of houses (although all are treated alike in terms of what one might find inside and how the house itself generates): houses will walls and gates, houses with gardens, and houses with neither. I felt these needed a lot more variation, so they’ve got it. Secondly, you’ll notice the thickest roads are of different shapes, and these layouts – like so much else – relate to the aesthetic preferences of that nation. A nation with octagonal floor tiles and octagonal furniture will also have an octagonal layout in their middle-class districts (and so on for the other shapes). Thirdly, you’ll also note that all the plants (in this particular biome) are currently green; in some later version I’m going to add more variety to climate plants, add in a large range of unusual plants, and also add that to the ever-growing “clue” database (such that maybe certain plants only grow in certain nations, or are only cultivated by a few monasteries, etc?). I’m also going to have the colours of plants tethered loosely to climate, so that as you move around the world, you’ll see different “palettes” of plants, which will be a lot more interesting. Fourthly, the buildings are positioned at the intersections of the major roads – I wanted the middle-class district to look more like a true middle-ground between the rigidity and order of the upper-class districts and the randomness of the lower-class districts, and I think that by placing the special buildings more specifically, and updating the road system, but still having the district fairly tight and crowded, I’ve made it into a much better balance than it was before (since I think it used to look like a “slightly nicer lower class district” rather than something really in the center). Theaters have also been temporarily removed due to my uncertainty over, frankly, how the hell they are going to work, and that needs to be left until I have NPCs wandering around the place.

Unlike the mansions of last week, these are the exact opposite of handmade – almost nothing about the district, nor the buildings themselves, is handmade, and is almost entirely algorithmic. The games tries to place an appropriate number of rooms, and then path between them, and it allows situations where multiple rooms can lead onto one another rather than back into a central “hallway”. Here are some examples of some two-floor interiors for middle-class housing:

Midclass1

Midclass2

Midclass2

… and for some more unusual shapes:

M3

M4

Very happy with how these look now, and they’re the last housing type that needed finishing off. Everything from slums to the greater mansions can now be explored, and generate differently. Here’s a last shot, just because I really do like these doors:

Interrrr

All Houses

So, we can now take a shot at all dwellings, from the slums to the grandest of mansions. Here’s a large picture you should take a look at the full size of by clicking on it:

Spectrum

0.7 Release?

I accidentally reneged on my promise to never again promise release dates last week, and now I must pay for it. I am going to rescind all previous predictions and say: it’ll be out when it’s done. All my time not spent preparing for my PhD defence is spent on URR and there isn’t that much left to do, but it’s still going to be a very busy fortnight. I shall now once again swear to never make predictions of release dates again. Let us see how long that lasts…

Too Much to List in a Mere Title

A vast, immense, terrifying update this week. A huge amount has been done in this past fortnight: almost everything required for 0.7 is finished except for some remaining procedural graphics and the last two remaining building interior algorithms, which I’m currently putting together. My intention/hope/plan is to release 0.7 on April 4th. My thesis defence is coming up very soon and I’m preparing for that, so I don’t know if I’ll be able to perfectly hit this deadline or not. In the mean time, though, bask in the ridiculous amount of new building generation! Though first, I must draw everyone’s attention to this Rock Paper Shotgun piece on Dwarf Fortress, URR, and general procedural goodness, which I highly recommend checking out, and to this year’s European IRDC which I’m hosting at the National Videogame Arcade. Please sign up if you’re planning to attend! Now, onto the update.

Mansions, Part II

Firstly, I’ve finished the final set of mansions – the largest ones, found only in upper-class districts, and from which the player will begin their quest from 0.7 (or possibly 0.8) onwards (since the player is a lesser noble). Mansions of all sizes are among the more hand-made elements of the world; there are still many, many variations, but the algorithm which constructs them is more about piecing together and differentiating between a range of hand-made chunks, rather than the algorithmic placement of items, rooms, etc, but that’s just a necessity of the detail (and more importantly, logic/realism) I wanted from these: I tried several algorithms which just weren’t given me outcomes of the sort I wanted, so I’ve gone this way instead. There are ten shapes for the largest mansions; each shape has three different upper level layouts, three ground floor, and three basements, and each of these varies in turn according to colour scheme, table/chair placement, what room is used for what, and also another difference. If the mansion is the one the player starts in, the room in the middle of the ground floor below – containing the nine statues, in three sets of three – will contain nine things, be they paintings, statues, books, or something else, each of which will give you a single initial clue towards the nine items you need to uncover the locations of in the world. For this release, all nine are placeholder statues, but that room will be where you want to start.

Here’s an example of a ground floor and a top floor, with four bedrooms:

Low Massive

Low massive 2

… and another (you simply must enlarge this one and look at it full-screen, just look at the flooring! The architecture! I am almost appalled by just how satisfied I am by how these mansions look):

massive low 2 massive low 2a

… whilst the basements look much like they do for the smaller mansions, i.e. stone/wooden flooring (if servants’ quarters or slave quarters, respectively). On the upper floor, you will also be guaranteed to find one special item in all the upper bedrooms, which you may discover or be hinted towards by various means; however, although the player’s starting mansion will contain the nine initial clues (and other mansions won’t), it is other mansions which may contain special items in the chambers of the nobles in that family, whilst your “starting mansion” will not. Therefore, your starting mansion will get you going on the hunt, whilst other mansions – if you can find a way to gain access – may have things to aid you on your quest. You also see those empty rooms on the ground floor? A storage room, and an armoury, soon.

Officers’ Quarters

I’ve put in the generation algorithms for Officers’ Quarters, located in Military Districts in large cities. There will only ever be one per civilization, and will contain the highest-ranking military officials (and, next version, presumably a logically significant amount of protection); there’s always a decent number of 5×5 chambers, and then one larger chamber for the highest ranking military official in that army (whatever that may be). Here’s a reminder of how one of these buildings might look: flags and fountains for the nation in question will always be found outside, along with a reasonably ornate road pattern, and the OQ is generally either a “corner” shape, or a “trident” shape like the one below:

ThrrpptFor the interiors I decided to use the ornate floor type again here, but once more in a visually distinct way; Officers’ Quarters will always have a “strip” of ornate flooring in the middle, and use ornate flooring in the bedrooms of the actual officers, but then will use stone flooring (the “second tier” floor type for interiors) for the rest of the building. The game places one from a large number of possible patterns of tables/chairs, and then places one from a long list of patterns of pillars/walls on top (deleting any tables/chairs that need to be deleted in the process!), and voila – you have the ground floor. So here we have three possible lower floors from another civilization to the one above, and three upper floors, in one shape:

Officers GRound

OffUpper

The differences are small across a single “shape” of building, but across civilizations, building shapes, floor colours, we actually get a lot of variation, whilst (as ever) maintaining a clear visual style which denotes that these are Officers’ Quarters, and not anything else:

OQ many

As above, in 0.8 you’ll be able to find the highest-ranking military officials here, but it will naturally be a location which is closely guarded. I’ve also worked on the generation of armouries in military districts, but since these are very “practical” buildings (i.e. not ornate in any way), and since weapons and armour and the like are not yet generating, they are not especially interesting! Likewise for warehouses in market districts; done, but currently empty. What is interesting, however, is arenas:

Arenas

Arena interiors now generate for arenas in feudal nations. The arena consists of three components; an overall building shape, of which there are several varieties; a shape for the central “arena” section (the section within the grey symbols, which can be seen through) and the location of various candle stands which keep the entire arena constantly lit, regardless of where the player is located; and then a pattern of chairs (of which there are many) which is then placed in any remaining tiles. The initial “lobby” leads to open doors that lead to the chairs, and also a locked door (which in 0.8 will be guarded) towards an interior area where contestants will get ready, and where you will be admitted to if you intend to fight within the arena. I also made a very rare alteration here: all the chairs have a randomized wood colour (based on woods in that climate zone, of course!) rather than just picking a single wood colour for the entire building, which I do for every other interior. I like the effect it produces. I have also added the code (currently unused) to sometimes spawn arenas which might have certain… environmental hazards. Here’s an example of one I explored:

Anrea1

I thought this gif was especially neat: step through the arena, talk to those in charge, decide to throw yourself into the ring, step out, and suddenly the arena opens up, lit through day and night by candles, and surrounded by (in 0.8 onwards!) a host of NPCs keen to watch the combat…

Gif1

Also: want more gifs in future blog updates? I think you do, but let me know.

Galleries

Added gallery generation! These spawn in city centres and will always contain four procedurally-generated paintings (which will always contain tiny clues, cultural/historical information, etc). One issue was to distinguish this from the lower floors of Officers’ Quarters, so we can see four paintings (the white diamonds) and a pattern of chairs. I took the randomized chair colour idea from arenas and reapplied it here, and had the game place chairs in blocks or along diagonals at different distances from the walls. It’s very simple, but the main function of these buildings is simply to house paintings (and, in the future, relevant NPCs who can give you useful information) – they aren’t the most exciting, but they function. Painting generation coming soon.

Galleries

Embassies

I’ve now developed the interiors for embassies. I wanted to make these very close-knit and very dense, so the game generates a number of closely-linked offices, picks a layout for tables/chairs within them, then generates. The ambassador’s office (the room with the upward staircase) will always contain a few items of note from their home nation, and the ambassador’s quarters can be found up the stairs.

Emb1

Emb1

Emb1

Mints and Banks

The interiors of Mints and Banks are now generating! I once again found another variation on ornate/stone flooring: in this case ornate flooring runs around the exterior of the bank. The code is in place to spawn guards on each vault and a teller on the chairs/table in the middle, and will be used in 0.8. Here’s a bank as you will normally see it, with the vaults un-explored, and then the same bank after the player has (in later versions) found a way inside:

Banko

Mints, however, are rather more exciting now, though obviously also still lacking in actual, y’know, coinage. Whereas anyone will be able to enter banks, mints will obviously be under heavy guard, and some serious firepower or political might will be needed to gain entry. Here’s an example of a mint (with the same ornate-flooring-outline idea to aesthetically link them to banks) where none of the vaults have been opened:

Mint 1

…and here’s another one in another nation where the vaults (which will soon contain that sweet, sweet money) have all been opened:

Mint 2

The staircase in the middle leads down to an underground vault which will contain un-minted bars of gold/silver/whatever, and also probably some coin presses too. These areas will be much more lively come 0.8/0.9 once NPCs and trade are up and running (but also much harder to access!). I’ve also, lastly, temporarily removed currency exchanges from generating; I need to think very carefully about how those are going to work, and where they should be placed, and how that will interact with the player’s actions around the world, and how to avoid it becoming deeply annoying/grindy to switch currencies. I’m now thinking about a system where there are no currency exchange buildings, but rather individuals stationed at every city gate who can perform the service for you? I think that would be better.

Hunter-Gatherers

All the interiors for hunter-gatherer civilizations now generate, though there really isn’t much to see here yet. I won’t be really focusing on these for a release or two, most likely. All the flooring in these buildings is the same as that outside, e.g. taiga, tundra, tropical, etc. You can wander in and look at the lovely doors, though:

Hporay

Reliquaries, Incense Stands, Khachkars

This fortnight I’ve also created the procedurally-generated graphics for reliquaries. These are found in cathedrals only (i.e. only in one location per religion), and there will always be more reliquaries in a cathedral attached to a theocratic nation than one attached to any other kind of civilization. These all have a distinct symbol on the front which one might find elsewhere in the world. They’re quite ornate, and their graphics draw primarily on christian reliquary iconography, but also some sources from India, Japan, and Islamic art. They will naturally be locked by default, and – one assumes – well guarded, but will also contain things of either great use, or simply great value. Here are some examples:

Reliquaries

I also did the graphics for incense stands in cathedrals and religious buildings – these can spawn instead of things like vases, gongs, statues, fountains, etc, and are just another kind of variation. Happy with the algorithm that puts these together: it’s fairly basic, but I think it looks good, and they’re very distinctive.

Incense

I have also added some very, very rare graves to nomadic citadels where only the absolute elites are worthy of burial (the rest are presumably disposed of somewhere else in the desert). For now, all of these graves are Khachkars since I only have time to create one algorithm for those and not for other grave types, but in 0.8 each nomadic civilization will have a different form of burial (cairns, stele, various other ideas). Naturally, all the symbols on this Khachkar might be important…

Khack

Some General Screenshots

Here are some nice general screenshots, though they both happen to be in cathedrals. Enjoy!

Gerng Ofimig

Next Week

There’s only really the remaining graphics left to do now. Things like reliquaries, finishing off all the tables/chairs/beds variations, and the like. There are also a few minor bugs that have arisen in 0.7’s development which I need to fix (primarily one involving external fixed sources of light), and I’m not really sure how long that one will take. I’m pushing for a release on the 4th – there are still a hefty number of small bugs and improvements I want to sort out, and I want a couple of days of playtesting beforehand to ensure I release the best possible version. My PhD defence is in the week starting the 6th, so depending on preparation, outcome, blah blah, the release might end a little after that. Hard to say. Either way, though, 0.7 is in its final stages! Which means the final worldbuilding release will be out in the next few weeks. Hype.

Procedural Altar Generation

In keeping with my mission to push procedural generation away from the “classics” – monsters, dungeons, levels – and towards more “qualitative” concepts that have never been generated before in games (nations, cultures, societies…), URR (as regular readers know) contains a range of procedurally generated religions. These are not just a name and a belief, but are designed to be complex, interwoven and often competing systems that procedurally generate a deity or pantheon of deities; their beliefs and forms of worship; what, if anything, is banned in their religion; what festivals (if any) they perform; what agendas the clergy of this religion have; what other religions they might consider to be infidels; where in the world the religion is found; the religious symbol; their cosmogenic and eschatological beliefs; what heretical sects within that religion exist; and – the focus of this blog entry – their altars.

This blog entry is a detailed post about generating the ANSI (ish) graphics for the altars (or “shrines” in some cases) for all religions.

There are three “classes” of religion – monotheistic, polytheistic, and what I’ve termed in the game’s code as “spirits”. Feudal civilizations can have either monotheistic or polytheistic religions (but are slightly statistically biased towards monotheistic, because there is more procedural variation within that type) whilst “spirits” religions are used for hunter-gatherer civilizations, who have a range of animistic or shamanistic beliefs, totemism, ancestor worship, etc. Nomadic civilizations, reflecting their role as melting pots of varied cultures and beliefs from across the globe, never have an official state religion (inasmuch as there is even a clear concept of “the state” in these civilizations). Each of these three kinds of religion has a wide set of different possible altars or shrines, based upon a significant number of archetypes which each contain within them a massive amount of variation.

Monotheistic

Within monotheistic religions there are four possible archetypes for deities – to use the terms used in-game (though these are not seen by the player), religions can be “demonic”, “eldritch”, “egyptian”, or “general”. Each of these has its own algorithm for generating and selecting the depiction of the altars at which their devotees worship.

The first of these we’ll look at are what I’ve been calling the “egyptian” god type. These are gods that adhere to names of the sort “The ____-headed God” or “The ____-headed Deity”, and so forth. The heads of these deities, so to speak, are generated according to the climate within which that religion was first found. A religion founded in a cold, polar region might have a “bear-headed” god or a “wolf-headed” deity, whereas in the desert regions you may find those worshiping their “scorpion-headed” or “scarab-headed” equivalents. The altars, in turn, are generated with a central image, a colour, a selection of candles, and an altar shape. Here are two examples: on the left is the rather more ‘abstract’ symbol for a deer-headed god (with a particular randomly-chosen shape and colour), and on the right we have an altar for its bear-headed cousin. There’s over thirty different animals, a wide range of colours and shapes for the altars, and therefore a massive potential variation in the altars of the animal-headed gods.

Animal Altars

The second are the “eldritch” gods. These are loosely based on Lovecraftian ideas, but also upon some of the more unusual gods in real-world pantheons (though generally ones no longer actively worshiped, or at least not by large numbers) which are not just “a person” of some description, and either have an unusual depiction, or are entirely animalistic. For instance, Chinnamasta is a Hindu goddess who holds her own severed head in her hands; the Rainbow Serpent in aboriginal myth (though these gods in URR are somewhat less benevolent); Lei Gong in Chinese myth; the Gnostic god Abraxas, and a few inspirations from voodoo, central American myth (primarily Aztec), and some of the truly bizarre demons from christian demonology (especially ones like Buer). This gives rise to gods like Uur Quog, the White Wolf of the Pit and Guardian of the Gate; or Fallin’thopar, the Transient Vulture of the Mountains and Taker of Souls. Those who like their Lovecraft can clearly see the procedural naming convention here, even if the descriptions and depictions of these deities draw from elsewhere as well. Their altars have a wide range of designs, “inscriptions”/patterns upon the altars, colours, bases, and patterns upon the basic, again yielding several thousand possibilities, of which two examples can be seen here:

Eldr

The third are the “demonic” gods. These altars are the least procedurally-generated of the bunch, though still exhibit some variation in colour, and association with different forms of “demonic” gods. These are not gods which are worshipped secretly, or underground – these are clear, visible religions just like all the others in the game, but these deities are just not the most pleasant of sorts. In part my inspiration here was from the classic understanding one has of the “Old Testament” christian god – all fury, hatred, vengeance, wrath. I wanted to introduce some gods which were perhaps worshiped out of fear rather than out of the love and gentleness generally associated with the judeo-christian god in the present day, but at the same time deities who might have beliefs associated with them that state that although these deities are brutal and bloody, they are perhaps fair, or just, or expect a lot from their worshipers, or might give their worshipers great power in return for their loyalty:

Demonos

The last class of monotheistic god is the “general” god, though that hides the significant level of variation within those gods, and their altars. In this case an altar for these other gods – such as the Cold King of the Moon, or the Lord of the Tall Grasses – consists of two components. The bottom half is a block of stone, wood or other material, over which is draped a cloth (all procedurally generated) which bears the symbol of that religion and some other general decorative patterns down the side. On top of that is placed one of roughly forty different items, ranging from candelabra to bowls, statues to bones, and plants to statues of various animals. Here are some examples of this last type, which generally makes up around 60-70% of monotheistic religions in a game world, whilst the rest are of the above “rarer” types.

Raven

Polytheistic

Polytheistic religions also use three different altar archetypes, which are selected at random for each polytheistic religion. Around 80% of the time they will use the “general” altars described and shown above – a block of stone or carved wood, with a banner, and with a symbol either appropriate to some aspect of the deities or chosen at random from a much larger set of “general” religious symbols – but the other half of the time they will use altars that fall into another category. These are for gods of a pantheon centred around ‘elemental’ concepts or other groups like metals or stones (such as the Deities of the Five-Fold Firmament, or the Divines of the Six Elements). All those names are, of course, also procedurally generated from large and varied libraries of names/words. We’ve seen the “general” altars, so let’s look at these elemental ones.

I’m academically quite interested in alchemy, pre-modern interpretations of “elements”, and the interactions between the two, and this archetype draws on alchemical concepts and also a few of my own which are related, but not quite drawn directly from real-world history. There are several different “sets” of “elements” that might be chosen for a religion of this sort – they might be the traditional fire/water/earth/air/etc, or slightly more unusual. In the picture below, these are for two different elemental pantheons. The altar on the right has been generated for a pantheon of five gods, in this case gods of the sun, the moon, the earth, comets, and stars; the right pantheon has seven gods, in this case gods of gold, silver, bronze, platinum, tin, copper, and iron. As above, these are rare “religion types” and will not crop up often, in keeping with good procedural generation where all possibilities are not equally weighted. As with all the other altars here, there will be clues towards these altars scattered around the world, and the nature of the altars will be referenced in a thousand different places and integrated into the world’s cultural fabric.

Eldr

Gameplay

As with everything in the game, these are designed to be integrated into the clues and hints the player picks up. Perhaps the player will be suggested that a priest who worships at the altar of the three candles is harbouring a secret, and only one altar has three candles at the top? Similarly, if you come across an unknown altar, the experienced player should be able to make a reasonable guess about what kind of deity it “belongs” to, and if they have uncovered a range of deities that are worshiped but haven’t encountered their altars, they should be able to piece together this kind of information. Equally, as with all the other graphics in the game, these graphics are designed not just to aid in the kind of discovery/exploration/information gameplay that really interests me, but also just to aid in constructing a densely detailed procedurally-generated world. Several people have said they think URR stands already as the most detailed proc-gen world ever crafted; although I appreciate the appreciation (as it were), I think that’s a little premature, but the details in the interior of buildings (such as altars) this release (March, hopefully) should certainly move URR much closer to meriting such praise.

In Conclusion

What I’ve shown here is only the slightest fraction of the religious altars that might be generated in a single game world of Ultima Ratio Regum. The majority are the “standard” archetype, which gives far more impact to the discovery of one of the more unusual ones. The five different altar types all draw on very different traditions, either aesthetically, thematically or both, and offer similarity within an archetype whilst still remaining highly distinct, and having enough noteworthy features to allow their descriptions or nature to be disseminated by information throughout the game world. Lastly, if you liked this entry, please share it on your social media outlet of choice! To conclude, here’s an in-game screenshot of the player exploring a (procedurally generated) church, and finding the altar, and giving it a look (this being one of the ones shown in the examples above, in this case for a demonic deity called the King of the Spire):

Kingofspire

And, a Reminder:

International Roguelike Development Conference (Europe)

I’m hosting this year’s IRDC! I’m trying something a little different this year and I invite everyone to come along. You can read about it here on this website, on Reddit, or on Roguetemple, and please get in touch if you’re planning on coming along! The more the merrier, and this year’s will be something really different and, hopefully, something really awesome.

Fortress Citadels, Jails, Mansions, Candles, Barrels

International Roguelike Development Conference (Europe)

I’ve set up the venue, the time, the dates, and the format, of this year’s IRDC! I’m trying something a little different this year and I invite everyone to come along. You can read about it here on this website, on Reddit, or on Roguetemple, and please get in touch if you’re planning on coming along! The more the merrier, and this year’s will be something really different and, hopefully, something really awesome.

URR Development

The past two weeks I haven’t been able to get as much coding done as anticipated  – partly from spending a lot of time travelling, partly from some truly baffling real-life events, and partly from other commitments – but I’ve been turning my attention to the other civilizations in the world of URR (primarily the nomads, but I’ve also put together some early work on hunter-gatherer building interiors) and also the generation for some of the other buildings in cities, like mansions and jails. So, here we go:

Mansions

Manors come in four sizes – small, medium, large, and “massive” (one of which the player will begin in, as a lesser noble). The images below show one medium and three large (the massive are not yet finished). The smallest manors can be found in upper class districts, potentially sometimes in middle-class districts once I rewrite middle-class district generation (but there would only be one in the district), and in the future will also be found in towns if the civilization has the Vassalage policy (I’m continuing to work on making the variation from policy choices more and more explicit). The medium size, then, can only be found around the edges in upper-class districts, where the “second tier” of families live (I might call these “lesser houses”?); the next size up can be found in upper-class districts only, where they are also for lesser houses, but those with real aspirations to becoming a major family in that nation; and the largest can only be found in upper-class districts; each district contains three, which house the most important families in that nation, one of which will be the ruling family. Manors contain living and dining rooms, at least one “special” thing – which might be a portrait, an ancient book, a valuable piece of armour, and the like, and which will likely be mentioned in books and other NPCs as a valuable family heirloom – and also store rooms, and quarters for servants (or, if the nation is a slaving nation, that room will be less pleasant and for slaves). The storage room is the only current “empty” room on the  pictures below, simply because I haven’t yet implemented the various item types that will soon spawn there.

You’ll also notice a little visual difference in the floor – since all of these buildings have the “ornate flooring” terrain type as their default, I decided I wanted this to be very visually clear and explicit, and I really like how this looks. Cathedrals also had the same floor type, but I found they would be slightly too visually busy if they were displayed in the same way since cathedrals generally have more stuff, so I decided to only make this change here. Personally, I think they look bloody gorgeous. Be sure to click on them to really appreciate the colouring used in these! In the first picture, the floors are the upper floor, the ground floor, and the cellar, in that order from left -> right.

Small222

manorrrr

manorrrr

Anotherman

Citadels

In the centre of every nomadic fortress is a “citadel”, a last retreat for that nomadic people in case of disaster, war, and so forth (within which the nomadic rulers will dwell, along with various other unusual and rare rooms). I wanted to model these on a lot of palaces from northern Africa and southern Spain, so they have a certain “oasis” feel to them as well as being places of fortification; one will often find extensive gardens within the walls of the fortress, and within these gardens you’ll find things which spawn nowhere else on the map – intriguing stone stele, nomadic graveyards (a rare thing indeed), and if in the “capital” fortress of the nomadic nation, you’ll find some other intriguing stuff on the upper floor, according to the policies the “government” of that particular nomadic people pursue. I tried to make these citadels quite “oasis-like” – they have open areas, trees, and fountains and water, and with some interior/exterior areas, and with appropriate areas that the game can use to place slaves, servants, weapons, guards, etc, in future releases. There are two different floor types here – both are “ornate” floors, but they are displayed differently; which do people prefer for citadels? I’m definitely going to keep the “minimalist” ornate flooring for cathedrals, though.

Starfortground

Arrgrh

I’ve also put in the code for the game to create gates inside the fortress, which will then form balconies you can walk over on the higher floors, although I haven’t yet got around to generating the upper floors:

Two Floors

Jails

The first picture is from one jail “shape” showing how the stairs link, and then the other two show the player actually wandering around two variations of the “sideways pyramid” jail archetype, and in the latter case, I didn’t explore many of the cells (which, after this release, will of course be locked and require the jailer’s key) but just opened up a couple. As you can see, each floor is always similar, but with a slightly different layout of pillars, corridors, etc, and the empty room on the ground floor will be the jailer’s office:

Jail 3 Jail1 Jail2

Barrels, Candles, Miscellany

Also just threw together some of the new lookup graphics required for this release. Have a procedurally-generated ale barrel, and candle stands:

Barrel Candles

What’s Next?

Well, next week we’ll probably have a very in-depth and detailed entry about altar generation, the one I mentioned a little while ago. As for this release, I’ve definitely crossed the 50% point in these past two fortnights. By the update in a fortnight’s time, I’ll also have the massive mansions done, and most of the remainder of this release (I hope). I’m still aiming to release 0.7 in March. It’s… a stretch, as I have two academic papers I need to finish and submit this month, as well as beginning the preparation for my thesis defense, but it’s the target. Meanwhile, go and sign up to this year’s European IRDC and help us bring roguelikes to a wider audience than ever before!

Score Rush World Record

A week ago I managed to get the world record in the superb XBLA danmaku game “Score Rush” by Xona Games. The previous record was set several years ago by a Japanese player (for those who don’t know, Japanese players in shmups are equivalent to Korean players in Starcraft, European players in FPS games, or US players in fighting games) and whilst the record was immensely high, I was convinced it was beatable. The game has six difficulties, each of which unlocks after you beat the previous difficulty. At the time he was the only person to ever beat the fifth difficulty, “Insane”, with a score of 1,070,612,083. I became the second person to beat this difficulty after several months of serious pursuit of the record, but with a lower score. After several more completions of Insane but unable to beat this score (for his completion was extremely optimal), I decided it might be easier to become the only person to ever beat the highest difficulty, rather than beating this second-highest difficulty with an even more optimal score. So after a few more months I have now become the only person on the planet to ever beat “Godlike” difficulty, doing so with a score of 1,272,316,741. Technically Score Rush can be a multiplayer game, but nobody has ever beaten Godlike with four players playing simultaneously, let alone with one. I recorded the video, which can be watched below; the rest of this entry is going to an analysis of the record, the design of some of the bosses/minibosses in the game, and some ideas for what record I’m intending to pursue next.

PLAY IT AT 1080P!

The rules are extremely simple. Being closer to enemies does more damage; more damage means a quicker kill, and a quicker kill means more points. Only the tiny number of pixels in the centre of the player’s ship can be hit, the rest is just to make it clearer on screen where it actually is. You have three lives, and three “bombs”, which clear the entire screen. If you collect a lot of powerups you can acquire “smart bombs”, which clear a small number of bullets around the player; when the screen shakes, upon killing a boss or a large enemy, you have a brief moment (approx 1 second) of invincibility. So, without further ado:

The Second Boss (2:20 in video)

Init

The second boss of the game is the first real challenge. Its initial pattern is not too challenging, but as you do more damage to it the boss gains what I call a bullet spam attack – it unleashes a burst of untargeted bullets. In early playing of the game I thought this attack had a double fixed timing – I thought it would always do the attack at a certain point in the fight, and it would always conclude at a certain point in the fight. The trigger for starting and finishing this difficult phase were both, I thought, fixed. The bullets also come from two parts of the boss, making it especially challenging to keep in one’s head the trajectories for two different bursts of bullets with an identical colour.

Init

However, the more I played it became apparent that the AI of this boss, although simple, could be exploited so that it would do this attack at a point where it was as easy as possible to dodge, maximizing my chance of survival. I discovered that after a certain amount of damage has been done to the boss, the boss “flashes” white for a split second. Once you do a little more damage it will then do the bullet spam, and finish this attack once a certain amount of extra damage has been done. Once the attack has concluded there is then a very small damage lull (perhaps 2-5%?) until it then does the attack again. The boss moves back and forth across the top of the arena, so I realized that after the flash and after doing a little more damage, I could wait until the boss was on the far right of the screen and position myself on the far left of the screen before triggering the attack. This meant the two bursts of bullets would be travelling in roughly the same direction when they reached me…

B2

… which makes them far easier to avoid by keeping to the edge. Those fired from the left of the boss will be moving slightly “down” whilst those from the right will be moving slightly more “left”, but they will basically be rushing towards you from the same general direction. My survival rate on this boss climbed from around fifty or sixty percent to the high nineties, and a death to this phase became a rare occurrence. In turn, due to how weapon power works in the game, avoiding an early death meant that my ship would be stronger for the remainder of the game, and that (obviously) I had an extra life to throw away in the challenging later parts of the game. It also become clear that bosses moved onto new phases from the damage done like in other shmups, even if a health bar wasn’t obvious, and this information could be used to my advantage.

The Nightmare Attack (10:00 in video)

I reached a point where I was rarely dying in the first half of the game (although, ironically, my only death in the world record was actually very early in the run and as you’ll see in the video, I almost restarted because of it!), but one particular phase on one particular boss was killing me over half the time, crippling my world records attempts. This is because when you die your weapon strength is severely reduced, and you are no longer able to use “smart bombs” until you regain full weapon strength, and the section after this boss (which is discussed below) is borderline impossible on the higher difficulties without the ability to use smart bombs, not to mention the aid of the full-strength main weapon for your ship. This boss, Boss D, has three attack phases. The first is shown below – it is challenging, but with some attention to the pattern isn’t too difficult to dodge:

Init

Its second phase is oddly trivial and doesn’t need to be discussed here, but the third phase is a nightmare. It is easily as difficult as any attack of the final boss or the penultimate boss, and although the boss does not do this attack until it is very low on health, it is immensely challenging to survive for long enough until the boss explodes and clears the screen of bullets. Here is a screenshot of the attack:

Init

This attack is highly difficult for several reasons. Firstly due to the sheer volume of bullets, but primarily due to the problems the red bullets cause. Unless they are being fired from the other side of the screen they are sufficiently close together than they almost form a wall, and this blocks off major parts of the screen at once. At the same time, they form “lines”, cutting off the space you have to evade them. I also actually found that very rarely my eyes would for a split-second confuse the red of the bullets and the red of my ship – it would only be for a few frames of the game, but when I was near to those red bullets anyway, it would be enough, and I’ll die from a momentarily lapse in focus from the volume of similar-looking-red-things on screen.

I therefore decided it would normally be acceptable to use a single “bomb” on this phase – show in the bottom-right-hand side of the screen – which clears the screen of bullets. However, as time went by, I found that a similar tactic to the second boss, i.e. waiting until the boss is on one side of the screen, triggering its final phase, and then moving up and down across the other side of the screen, made this attack doable, and in the record video I do not die to this phase nor actually need to use a bomb, though it remains immensely challenging.

The Other Nightmare (11:45 in video)

Even if you survive that nightmare phase, a second nightmare waits immediately after. This is a huge selection of powerful non-boss enemies, some of whom have screen-filling bullet patterns. There are two types of enemy, and it’s worth explaining how these both function before going any further. The first I call the “green B2″, for its resemblance to the stealth bomber of the same name. These fire a cloud of green bullets, and when on low health, fire out blue lines of bullets south-west and south-east of their position (though these later blue bullets are generally pretty irrelevant).

B1

The second enemy I haven’t come up with a name for, but these are much rarer blue enemies. I’d say about half of their total number appear at this point in the game. They have two attacks – they fire blue bullets straight down, and also a small chunk of orange bullets towards the player. They have significantly more health than the B2s (twice as much?) and, when they die, I think the screen shakes for less time, thereby giving you less invincibility, but I haven’t been able to confirm this suspicion. They are therefore basically a version of the green B2 which is “worse for the player” – they have a similarly powerful attack, but they have twice the health, and yield less invincibility.

B1

Between the previous boss and Boss C (the boss before the penultimate boss, as the alphabet “counts down” in Score Rush) a horde of these enemies appear. I have never counted how many, but it is a very large number. The screen becomes filled with bullets no matter how quickly you can murder them, and this is where the screenshake became so important.

Init

In bullet hells there is something known as “U Streaming” – this means moving around the bottom of the screen in the shake of the letter “U”, as this is a highly effective way to dodge particularly thick patterns of bullet. You move along the bottom of the screen as slowly as you can for the aimed bullets to pass by you, then you dash up the side of the screen. This causes the enemies on the other side of the screen, firing aimed bullets, to shift their aim upwards – this will then yield a small but crucial gap in the bottom corner of the screen “underneath” the curve of the U that you can dash through and do the same pattern again in the other direction. It’s hard to describe, but I do it very often in the video. In this part of the game, I had to combine U streaming and using the invincibility each time an enemy was destroyed to have any real chance of survival (and the CPU slowdown from the insane mass of bullets helped a lot). You’ll see me moving back and forth on the screen and cutting across masses of bullets each time I kill an enemy which I know will give me temporary invincibility. The U streaming isn’t perfect, but it’s the only way through. Although I know from talking to the developers the invincibility was only added during screen-shake in order to avoid annoying deaths – “the screen was shaking so I couldn’t see what I was doing!” it is actually essential to the higher difficulties. Although a tool-assisted playthrough of the game could, I do not believe a human could complete the highest difficulty/difficulties without using this screenshake, and this area is the first one where the density of bullets is simply too high to survive without every tool at your disposal. There is also another rationale called “the infinity loop” or “infinity streaming” where you move in the pattern of an infinity symbol laid horizontally across the screen, but this is less useful in Score Rush than other bullet hell games.

The Circles (14:00 in video)

After surviving boss C, we move onto a really interesting enemy, which I shall call the red circles (fascinating name, I know). These fire a circle of bullets aimed at your position. The circle originates on points around their diameter but they are all aimed at a single point, which is where the player is. This results in an interesting bullet pattern which varies depending on how close to the red circle the player is, as shown in the diagram below:

Firing

If the player is positioned below the arrow when this enemy fires, its bullets will follow this pattern. The closer they get to their target they will clump up, then become akin to a line, and then open out again the further they get from the player’s original location before despawning once they move off screen. I think this is an interesting pattern, and one I haven’t seen in many other games – the bullets from an enemy don’t generally “change” their orientation to one another mid-flight, though a few shmups do use bullets which spawn bullets of their own (Blue Wish Resurrection, another game I intend to pursue the record in, does this). Once you get past Boss C, a number of these spawn on both sides of the top of the screen, along with a special enemy in the centre that fires out lines of bullets which are aimed towards you, but only track slowly. In my view this is one of the most interesting combined patterns in the game, though it is hard to fully understand it in screenshot form:

B2

This area encourages you to think about the bullets coming at you differently to much of the rest of the game. Much like some of the bosses who fire “clumps” of bullets which effectively take up a portion of the screen rather than a single, point this area feels like the bullets are abstracted into two parts – the lines from the central enemy, and the closing/line/expanding groups of bullets from the circles. You can see some of the clumps from the red circles around this screenshot – some are clumped, some have formed into lines, whilst others have expanded after missing their initial target. You’ll also note that I try to stay around the middle of the screen in this part in order to encourage the red circle bullets to clump up early – a line is much easier to dodge than a circular cloud, and one can mentally consider it to be “one object” with rather more ease in this hectic part of the game. This phase requires moving back and forth within the lines transcribed by the central enemy (the large red circle in the middle/left of this screenshot) and avoiding the thick groups of bullets created by the smaller red circles, and then cutting back across the streams when the circles are reduced to lines.

The Penultimate Boss (15:25 in video)

If you survive the red circles, you make it to Boss B, the penultimate boss of the game. This boss is highly challenging – its first phase is difficult, its second phase is difficult, its third phase (happily) is a cakewalk, but the fourth phase is akin to the bullet spam attack on the first boss, except… vastly more difficult. The phase here I want to talk about is primarily the first phase, for it is by far the most interesting pattern. In this phase the boss fires two main types of bullet – the blue “rhombus” chunks of bullets in the picture below, and also turrets which fire two lines of yellow bullets with a slight gap between them.

B2

After a few moments this creates an interesting pattern, visible at the bottom-right of that screenshot – the blue chunks are vertical lines of bullet whilst the yellow, even though they are fired as lines directly at the player, are each fired at a slight angle relate to the player, causing them to “rotate” on their axis the lower those lines of bullets get down the screen, resulting in them eventually turning into horizontal lines. This is reinforced because the sheer volume of bullets means that an optimal strategy for this boss is continually moving back and forth in order to get the bullets to spread out a little more; however, this constant movement results in far more horizontal lines of yellow bullets than moving slowly from side to side would otherwise create. The interaction of these blue and yellow bullets is somewhat tricky to describe, but I think watching the video presents it well – you can see them combining to block off certain areas or produce challenging lines (and sometimes right-angles and chevrons) that move across the screen, even though the bullets that make those up are fired separately. This first phase of this boss really uses the screen in an interesting way by producing two types of bullet pattern, one of which is changed based on the player’s movement, and requiring a slightly different form of movement to other bosses as temporarily “line” structures appear and disappear on the screen as you fight the boss.

Lastbomb

This, meanwhile, is a screenshot of the final phase of this boss, which is the other contender for the hardest attack in the game. I normally survive this phase without losing a life or bomb, though in this instance I used a bomb – I did have an escape route from the situation where I chose to bomb, but with two lives and three bombs left at this point, this was by far the best run I’d ever had, and I didn’t see any point in taking an unnecessary risk at this point.

Killing The Final Boss (19:20 in video)

Fial

The final boss is pretty tough and two things of note. Firstly, it is the only boss that actually moves in any real way. Other bosses technically drift slightly from left to right, but this boss moves a lot around the map. At first I thought it was random movement, but upon close investigation, I discovered its pattern is not random, though I think it is designed to appear random in the hope that keeping track of the bullets and avoiding its patterns won’t leave the player with enough time to notice it always moves the same way. It follows the same pattern each time – after spawning on the middle left of the screen, it then moves in the following sequence: middle left, top right, middle, top left, middle, top right, middle left, middle right, top left, middle, top right, middle right, top, middle, top left, top, top right, top, and then back to the middle. If you have not defeated it by the end of this sequence (on the higher difficulties there is no way you can kill it fast enough), the boss will then just remain in the middle of the screen and slowly drift up and down between the central thirty percent of the visible area.

Init

Discovering that this sequence was fixed proved to be a huge advantage. Many of the bosses attacks are made significantly more challenging by the fact it moves so rapidly around the screen; very difficult patterns of bullets can be created if the boss decides to move during particular attacks. Many of the bosses bullet patterns, when combined with its movement, can produce lines of attacks that are tricky to dodge and can easily push the player into a corner if you don’t know which way the boss is going to move. Memorizing the early parts of this pattern allowed me to always position myself in such a way that the next move the boss made would have a low chance of causing too much difficulty – if I knew the boss would dart to the right next, I would position myself on the middle of the left side of the screen so that I couldn’t end up stuck in a corner.

Lastbomb

As you fight the boss it changes its attack patterns several times, but one I’ve always rather liked is the pattern shown in the screenshot above. It fires chevrons of light blue bullets with a few small streams of yellow bullets. What makes this interesting, however, is that your dodging of one burst of yellow bullets affects what the next stream of yellow bullets look likes. This phase actively encourages you towards making smaller, more precise dodges, because the yellow bullets are aimed. If you’re making huge dodges, the next wave of yellow bullets will be fired over a wide distance because they are aimed towards the player’s location when they fire. Some bosses therefore encourage wild dodges and lots of movements around the screen, whilst other bosses like this one encourage smaller and more precise dodging. I appreciate the difference, and it’s quite interesting when one first figures out that you need to deliberately dodge one wave of yellow bullets carefully, so that the next wave of yellow bullets is as easy to dodge as possible. In this case I reached the final boss with two lives and a bomb left, by far the strongest I’ve ever got there on this difficulty, and completed it without losing a life or needing to use a bomb (though had I used the bomb “aggressively”, i.e. to deal extra damage, I could have stacked up a couple million extra points).

Conclusion and Future Records

So there you go – I’m now a danmaku world champion. I don’t anticipate this beating beaten in a long time, if ever. The previous WR has stood for over a year, and despite the very significant sales of the game, I feel confident nobody else is going to trump it any time soon. I’ve been the only person putting up scores recently, and whilst I’m hoping this post will achieve some popularity, I’m confident in that record sticking, especially considering how bloody difficult that highest difficulty is to complete. The reason I put so much time into it is, partly, what I discussed in my past entry about playing poker. Twice now I’ve been within a heartbeat of reaching “the big time” in a game – first competitive Counterstrike when I was younger, and then poker in my early 20s. Although in neither case I “gave up” because the game itself was too hard, I have felt as if my days of high-level gaming competition were over. I needed to get this to prove to myself that’s not the case. I was tempted to quit a few times, but it had become some kind of psychological requirement for me to actually get this record.

Now I’ve got one, I’ve decided I’m going to pursue some other bullet hell world records. I think “Danmaku Unlimited 2″ and “Blue Wish Resurrection” are both very viable possibilities, and potentially “Cho Ren Sha 68k”, though I think that one will be the most challenging of the bunch. Competitive multiplayer gaming doesn’t really interest any more but competitive singleplayer gaming really does, and since speedrunning isn’t really my thing, it’s going to have to be high scores. So: I’m going to be taking a break from bullet hells for a little while to relax, code URR and get some more academic papers published, but once I’m done with the break and back to playing, watch this space, my friends – for the only thing better than being a danmaku world champion, is being a multiple danmaku world champion.