A big URRpdate this week, as we hit around 80% completion on the scheduling and pathfinding for all the world’s important NPCs, and also add some smaller additions like banners, drawbridge chains, and finishing off the upper floors of castles. At this point you can now track NPCs leaving their home and going INSIDE buildings – and this again works regardless of what the player does, where the player is, what maps/buildings have thus far been spawned, etc. This is, to put it mildly, a landmark moment. It works completely for guards in mints, and banks (though I have yet to test arenas and archives, but those are the first tasks I’ll be working on checking this coming week). It’s always hard to tell how much code written to deal with Situation A will actually also apply to Situation B until you give it a shot, when the Situations in question are so complex and have so many variables, but I think this code should be entirely transferable. I hope.
So, it’s time for some gifs! Various gifs here of guards leaving districts, entering districts, entering buildings, leaving buildings, exchanging guard duty with others, etc. Guards now work correctly for all outside guards, and almost all inside guards work correctly, and any and every weird combination of movement across the map and the player’s actions also, as far as I can tell, work perfectly.
However, all of this has given rise to a very amusing bug. So, consider this: the world map is split into map grids, each of which is 200×200 tiles when spawned but naturally starts unspawned, and each map grid might contain a range of buildings. When the world is generated I can check exactly what buildings will be in each district, but naturally in most cases I don’t know exactly where each one will be placed – since that would entail spawning the entire map, on the human rather than world scale, at world gen! Which would be absurd and take probably the best part of an hour or something, possibly more (I’ve never tried it and don’t intend to).
Now, consider this. The player is in Map Grid A. In Map Grid B is a guard, who is due to leave their house and move into Map Grid A, to relieve another guard on guard duty. Map Grid B has never been spawned. How long, therefore, should this first action – moving from B to A – take? No matter how any map grid spawns, moving from any point of a map grid to an appropriate edge can never take more than 200 turns, and therefore all movement of this sort, in unspawned areas, takes 200 turns. Were it spawned, it might “actually” take 20 turns or 190, but we have no idea what the correct number would be until spawned, and since it hasn’t been spawned, I play it safe and assume 200.
With me so far? Splendid. Now, let’s say that the guard leaves their (unspawned and nonexistent) home at turn 1000, and therefore is due to leave Map Grid B and enter Map Grid A at 1200. Now, the player is sat in Map Grid A. If the player waits until turn 1190, and then enters Map Grid B, it will then spawn all the buildings and have the NPC do 190 turns of their action. However, what if this building is near the edge to Map Grid A? Let’s say they get there with 90 turns left. Ordinarily, they would go through, and then take 90 turns on the other side… but that would mean if the player immediately went back through, from the player’s perspective, upon returning to Map Grid B, it would appear as if in two turns an NPC had just appeared and teleported ninety tiles up the map grid! Therefore, if an NPC is just about to cross grids, and the player is about to enter that grid, it takes them to an earlier step in their movement so that the player, just entering Map Grid A, sees the NPC for a few turns before they go into Map Grid B. However, what this means, is that if the player keeps hopping back and forth, the NPC keeps getting pushed back and never actually moves through until the player goes somewhere else! It’s very silly. I’m not sure how to fix it yet, though it probably needs some kind of counter that notes if the NPC has already been pushed back once in its current district, and resets after moving to a new grid. But still: it’s an interesting example of the complexity of the system, and some of the weird situations that arise, and how I’ve tried fixing them.
To further illustrate this point, here are some examples of the scenarios that can arise:
Player is in a map grid and an NPC moves into that map grid, and should physically spawn.
Player moves into a map grid, and all stationary NPCs outside buildings (e.g. guards) must spawn.
Player moves into a map grid and another important NPC is moving in that map grid, and must spawn in the right place, an appropriate way along their schedule according to the timing of their schedule.
The player follows an NPC into a new grid, and the NPC should be x turns away from the edge of the grid once they are spawned, despite having been unspawned after leaving the player’s grid.
NPC enters unspawned building, player stays in grid, things must happen in building that doesn’t exist.
Player is in grid with unspawned building and NPCs within that unspawned building need to leave.
Player is in grid, NPC enters building, player leaves, NPC must be handle its behaviour in unspawned building and unspawned grid.
As above, but player enters building first, leaving a spawned but unloaded building in a spawned but unloaded grid.
Player enters building part-way through NPCs doing behaviours within it, causing it to spawn for the first time, and they should all be at the right part of their schedules…
Basically, consider every variable of 1) the player’s action, 2) spawned grids, 3) spawned buildings, and 4) important NPCs moving through all these, and I cannot begin to describe all the variations. Naturally in many cases a piece of code I wrote to resolve Scenario #14 also worked for Scenario #26, and so forth, but in many cases it didn’t and a massive amount of code had to be written to handle every possible variation and permutation. But I think a large part of it is now done.
What is says on the tin, really.
Dare I hope… AI pathfinding/scheduling… finished?!?!?!?!
I was hoping for a large scheduling/AI update this week, and although significant progress has been made, the game’s code is currently quite unstable and uncooperative for the taking of screenshots, and replete with bug-tracking code that slows the game down to a crawl and makes taking nice gifs quite challenging. So, rather than doing a scheduling-and-other-things update this week and the same next week, I’m going to do a brief other-stuff update this week, and a much larger scheduling update next week with a massive volume of screenshots. Aside from the improvements to scheduling, two small other things have been done this week – banner graphics, and the upper floors of castles. That’s all for this brief post, I’m afraid, but we’ll make up for it next week with a massive and more tech-focused AI entry.
I’ve generated the graphics for banners, which are somewhat like flags except they can only be found inside castes, and probably inside mansions and manors as well once I get around to adding them in. In castles, in vassalage nations, you will always find a corridor lined with the banners of all the lesser houses in that nation. Here are some examples (the frills at the bottom of course vary with civilization preference shape) – these are quite simple, but I’m very content with how they look, and that’s another one I can tick off the list of the last remaining graphics for 0.8. With that said, they might be just a little dark, so I may lighten them just a tad.
Castle Upper Floors
I returned to the upper floors for castles and made some major changes, almost entirely in order to just make them less boring, as they were looking rather uninteresting beforehand and a bit too hand-made. The system used here is again (like castle basements for slave quarters, dungeons, etc) quite similar to the algorithm used in crypts to connect areas and draw corridors, and so forth, but this one is rather more fluid. It places all the important rooms first, including a harem if appropriate (the new dark red icons you see there are the reclining couches we talked about last time, and their colour varies according to the coat of arms of the house to whom they belong), and then ensures they can all path back to the up staircase that brings you to that level. This first stage results in something that looks like this:
If the castle is smaller and there’s a garden in the centre of the castle, you get something like this, since it’s rather harder to generate appropriately – but I actually rather like it! You’ll note that in this case the harem is not placed directly adjacent to the master bedroom, since in many cases that wouldn’t fit, but is instead positioned at a distance with a corridor that then paths in to the main sequence of bedrooms. This gif nicely illustrates the gap in the centre for the octagonal garden in the middle, then the player goes upstairs, and you can see the rooms loop around the middle bedroom.
I’m content with how these look – as ever, it’s hard to make upper floors fascinating when there are only so many ways to draw a bedroom, but they’re distinctive, they get the job done, and leave plenty of room for me to potentially add other things in the future, if anything useful presents itself. So now here’s a little gif using wizard/admin mode, to look at the three layers, from top, to middle, to bottom, to middle, to top. Note also that the corner towers where guards and soldiers live are present on both the ground and upper floor, but the overall shape of the castle is irrelevant underground.
And lastly (I just added this at the last second before posting this entry), here’s an upper floor for a democratic civilization that doesn’t have an ornate throneroom on the ground floor, but rather a bedroom with two sections – one for general governance and receiving relevant people, and a secondary part for the elected ruler to sleep in. Like ground-floor throne rooms, they vary heavily based on ideology, but in this picture you can see it in the top-left corner of the circular castle, and the middle of the “cross”-ular castle, both of which have harems attached (although roughly 1/3 nations will have those, I temporarily activated them for all nations just to help me test the room-placing algorithm).
Oh, all right – one brief AI thing. The best thing I’ve seen all week is this debug screenshot, where guards were coming in and out of a mint from all directions and timings and data structures, and sure enough, they all showed up on time (displayed here as the white tiles) and every single guard was there, no matter what the player had been doing and what parts of the game world were spawned and loaded, spawned and unloaded, or unspawned and unloaded. The most beautiful image I’ve ever set eyes upon.
Moving closer to all this AI work being finished! I cannot wait to be done with all this and be able to watch all the important NPCs going about their days. Once all of this is done, and all the current minor bugs (~a dozen) are fixed, I’m actually going to take a week or so off from URR development. Honestly, the extended crunch to getting this AI stuff finished has been really tough and lengthy, and once it’s done, I’m going to recharge a little bit before I start work on dialect generation and the conversation system (though I will probably continue brainstorming those aspects in the interim). I have a particular game I’ve been desperate to play for a long time, and having finally acquired (second-hand) the console required, I’m actually going to give myself a little time off to play the thing. Don’t worry, blog posts will of course continue! But I do feel a little burnt out for the first time ever, and I just have to have a little coding rest once this huge block is finished, so chances are next week will be “AI is almost finished”, the week after will be “AI is completely finished!!”, the week after will be something else, and maybe even the week after that, and I know this will push back 0.8 a tiny bit further but I just really need a bit of a break. Once that’s all done, though, we’ll start thinking about dialect generation. See you in a week for a big AI update!
First, sorry about the late update this week! I had a ton I wanted to get finished for this update, and I came close, but needed some of an extra evening to actually get it all done, hence the late Monday post (next week we’ll be back to the usual weekend stuff). This week we have a fairly major update again – more work on scheduling, pathfinding, and so forth – and a bunch of minor updates on various things that needed finishing or improving before 0.8’s release. Scheduling and pathfinding for important NPCs is coming along well, but is still not finished, owing only to the immense difficulty of the task (pretty much all my spare time is currently going into this) – but I’ve pushed well past the 50% mark now, probably to around 75%, and with a really concerted push this week we should be almost completely finished by next week’s blog post. So: this entry is going to update you all on that big task, alongside a bunch of other smaller things…
Fancy coming to work with me for 9 weeks?
Are you a student? Fancy coming to work with me on procedural generation for a few months? Now’s your chance! We’re looking for two people to come and join myself and Dr Sam Devlin and Dr Gareth Beale on a nine-week project for the “YCCSA Summer School” to examine methods for setting rules and subsequently generating a particular category of building – those that have strict and explicit social rules to their layouts and their use by different categories of human actors. For example, this could include religious buildings, hospitals, police stations, prisons, airports, military bases, etc. The exact direction of the project can be altered to fit the right candidate, but that’s the basic outline now – generating architectures of buildings with clear social, not just architectural, requirements to their physical layouts. YCCSA is the York Centre for Complex Systems Analysis, and is a highly multidisciplinary research group that the three of us are all currently a part of.
As above, you must currently be a student, though you can be from any field and any country.We’re looking ideally for one computer scientist and one artist (2D or 3D are both fine), but that’s open to change if particularly good candidates from other backgrounds apply. You’ll be housed at the University of York in the UK for the nine weeks during which this should be your full-time occupation/work, and we’ll (i.e. you, me, Sam, Gareth, and the other person) meet up at least once a week to discuss the project. We may well collectively get a paper or conference submission out of the project at its conclusion, which would look extremely strong on any undergraduate CV if you plan to pursue further study. If you’re interested, feel free to ask some questions here, send me a message, etc, or pass this on to your friends if you aren’t eligible but you know someone who is. The competition is usually pretty fierce for the positions, though, so you’ll definitely need a strong CV to be successful. Deadline for submissions is March 17; hopefully we’ll get some applications from some roguelikers and produce something innovative and interesting! If for some reason you aren’t an undergraduate student this year but will be next year, I would expect similar opportunities to arise in 2017 and 2018 too, which I’ll announce as and when…
Now, onto the URRpdate proper:
I’d say I’m… 75% finished on AI scheduling and pathfinding for important NPCs? As far as I can tell, we’re now at the stage where:
All important NPCs spawn correctly in their houses and can be seen sleeping/behaving within those houses.
All important NPCs whose day jobs are OUTSIDE buildings – e.g. guards who guard outside a building, or gladiators, or merchants in open-air markets, and so forth – all now have perfectly working schedules and find their way to their jobs, irrespective of where the player is, what the player’s doing, etc.
What this means is that one can follow an NPC from sleeping in their bed all the way to walking half-way across the map, through exchanging their guard post with another guard, and then track that guard all the way back to their home in another district, and watch them go to bed. Although this might not seen all that tricky to code, the complexity emerges when one considers that due to the size and scale of the world map, it is of course chunked. Only the map grid the player is currently in is loaded, whilst the rest of the world is stored elsewhere in your save files. The same also applies to buildings, which are only actually generated when the player first steps inside, again to save on generation time and memory usage.
What this means is that there are many, many variations of scenario that can apply to something as seemingly simple as just having an NPC move across a map:
Their house has been spawned.
Their house hasn’t been spawned.
Their home district has been spawned.
Their home district hasn’t been spawned.
Each district between their home and their work has been spawned.
Each district between their home and their work hasn’t been spawned.
Their work district has been spawned.
Their work district hasn’t been spawned.
The player is in their home district.
The player is in a middle district between home and work.
The player is in their work district.
The player moves between districts whilst the NPC is moving, thereby spawning and despawning areas of the map whilst the NPC is trying to move through those areas!
Therefore, the NPC might enter unspawned areas, enter spawned areas, leave unspawned areas, leave spawned areas, and must have their schedule consistent as they move between these different areas, whilst always making sure that if the player “looks in” on them at any time in their schedule, they are doing the right thing, just as the player might enter/leave spawned/unspawned areas with NPCs going about their thing.
This has necessitated four major systems – we have a list of “potential NPCs” who have yet to be spawned and who have thus far moved entirely in the abstract, a list of “abstract NPCs” who HAVE been spawned but have since been de-spawned due to the player moving away from the map grid they’re in, active “creatures” on the map grid the player is currently on, and abstract “building” creatures for creatures who have been spawned, but are now in a building, but the BUILDING hasn’t been spawned. All NPCs are thereby shuffled between each of these four categories, each of which can be accessed or acted upon in various ways according to the player’s location and the status(es) of the NPCs within them. This is by far the least complex system I was able to come up with for handling all of this, and it’s actually coming together now! You can track people all across different districts irrespective of your movement and their movement, and they always turn up in the right places at the right times. The remaining AI stuff is all to do with handling NPCs whose schedules take them indoors (for their work, not their homes), of whom monks are going to be the most challenging, though I don’t anticipate TOO much difficulty for the others…
Clothing has now been transferred out of my graphics-testing python file and implemented into the game proper. Everyone in nomadic and tribal nations now therefore wears all the appropriate clothing, which like all other clothing can be examined. This means all four major clothing types for this release – feudal, religious, nomadic, tribal – have been implemented, at all ranks from the lowest peasant to the highest ruler, leaving only armour to be generated in a later release (probably the next release, 0.9).
Vassalage nations now split their land up into counties, or regions, or districts, or duchies, or whatever the nation calls them. Each is roughly centered upon a town, and therefore “owned” by the lord, count, viscount, duke, or whatever the nation calls them, that controls that town (and thus mansions spawn in those towns to house these important people, and town halls do not generate as these nations would not have mayors for their towns). I’ll be doing a little more with this system later, but for the time being, here are some example maps of the vassalage-y nations and the counties they created (shown by arbitary colour differences, though when you view them in-game, you get colours of the house in question that rules the area). I’m happy with the kind of size these regions are, and it’ll add another nice bit of variation to a couple of nations each time. There are still a couple of minor peculiar bugs to work out here, but it should be resolved soon:
Castle basements have now been finished as well, and can contain slave quarters, and a torture chamber or dungeon, and potentially… other stuff as well? They often have two parts and two down stairs, if for example the nation keeps slaves and there is a dungeon or torture chamber, as those would be accessed from separate staircases (though I just need to make a mental note to ensure that the AI can figure that out!). Here is an example, going from the slave quarters, back into the main body of the castle, and then down the other staircase into the dungeon (which is much nicer than jails, since these dungeons are for important prisoners). Upper floors are being changed a little, but I should be able to show them off next week.
Jailers now have bedrooms which are underneath the jail, rather than having them sometimes leave and return and so forth. This was a slightly strange solution, but I decided it was a solution I was happiest with rather than having jailers leave and return in the morning (leaving prisoners alone would seem strange) or having jailers who take many shifts (I didn’t like this and wanted to emphasize that jails *belonged* to the jailers on some level), so there is now only one jailer who sleeps in a “secure” chamber below the jail. These bedrooms are minimalist and simple so they aren’t really worth showing, but suffice to say that that’s where they now appear.
Although the appropriate NPCs will not actually exist in this release – they join a list of NPCs like inquisitors and explorers who will be added in 0.9 – there is now space in castles and mansions for the rulers/lords to have a harem, of either sex/both sexes (depending on cultural practices, accepted norms, and the orientation/age of the ruler). Harems contain reclining couches, which are a new form of furniture I very quickly set up a really cool generation algorithm for, and I really like how these look. Right now these couches only appear in these areas, although I might change that in the future. The couches themselves are, of course, both coloured and patterned according to the family whose mansion you find them in, or the ruling house if they’re found in a castle, so here are some examples of reclining couches with the coat of arms that would have them next to them, whilst the shapes emblazoned on them are dependent on the civilization to which they belong, in this case three “lesser” houses in a vassalage nation and one major house:
This week I’m still working on scheduling/pathfinding, and will be focusing on getting all the scheduling around castles working, and then moving onto those who need to schedule their way into, and around, buildings, and then those who spend their entire schedule within certain buildings (such as certain categories of priests). If the progress on scheduling seems slow, please let me assure you it isn’t, and basically 100% of my spare time is on URR development at the moment – it’s just a huge, complex, and challenging task. But I’m definitely well past half-way and I can see how it’s all going to (finally) come together, even if there’s still quite a bit of ground to cover. See you in seven days!
For the last fortnight I’ve been working extremely hard on AI pathfinding and scheduling. It has been massively challenging – after two days searching for the conclusion to a single bug, only to discover that it was a single word misspelled in the 5000+ lines of AI behaviour code, something broke within me, and I need to take a break from the damned thing! So, for the last couple of days I’ve gone back to clothes and churned out all the remaining clothing for 0.8, and I feel intellectually rested enough to return to facing AI in the coming week. But back to clothing: nomads now have generated clothing, and tribal nations do as well, and these therefore now accompany the feudal clothing and the religious clothing styles that we have seen before. This entry will therefore talk about the nomadic clothing generation, the tribal clothing generation, and also small additions to feudal clothing to handle both lower-class and rulership-class variations in those clothing styles. With this done, almost all the graphics required for 0.8 are done, and it’s still just the pathfinding/scheduling stuff for important NPCs that needs finishing (as I say, I’m working hard on this in all my spare time at the moment, but it’s a huge task and by far the most intellectually challenging thing I’ve ever coded, without doubt).Anyway:
For nomadic clothing I wanted something fairly practical and rough-and-ready, but still visually interesting and distinctive, and something “modular”. The feudal clothing is less modular, in many ways, as there are clear archetypes that clothing will appear as a subset of, whereas for nomadic clothing I wanted to design it from the get-go to have more combinations – which is viable (unlike feudal) because it is a little less ornate, more pragmatic, and because you’ll simply see less of it in the average game, so you don’t have to “force in” quite as much variation in a single world generation. Each clothing generation selects three colour schemes, consisting of a plain colour (generally white, grey, some kind of pale brown), a pair of rich colours based on the flag of that nation (e.g. pink and purple, red and orange, blue and cyan, etc) and then a lighter version of the combination of those two colours (so a violet and red flag might wind up with a pale magenta as the third colour). Nomadic clothing is similar to the “robe” archetypes for feudal clothing, i.e. it takes up both the upper- and lower-body clothing slots when worn (unlike tribal clothing, as below) and consists of five layers – clothing shape, pattern shape, pattern pattern (you’ll get what I mean when you look at them), strap locations, and strap pattern, all combined with the various colour sets as described above. Here are some examples with illustrative flags that might be associated with the same nations, so you can see the colour-scheme similarity:
I’m really happy with how these came out! As you can see there, rather than two ranks – “normal” and “ruler” – that we have in the tribal clothes you’ll see below, there are three ranks here, each rank gaining an extra stripe. I actually really like this system as another visual way to denote rank within a single civilization. So, for example, normal people in a nomadic civilization get one stripe, people like merchants or caravan leaders or the ruler’s family and the like get two, whilst the ruler will be the only person to get three stripes. You’ll also notice the background fabric of these is simpler than the tribal clothing below; as above, I felt nomads should be a little more utilitarian than tribal people, and I thought the large blocks of colour on some of the nomadic designs actually worked really well, so I decided that I didn’t need to add in any more detail in that regard. Also, nomadic boots – quite a bit simpler than feudal ones, but distinctive and a little more colourful (as the clolthing styles of many real-world nomadic peoples often are), so I’m pleased with how these look (also, feudal ones tend to be more vertical whilst these flare out at the top more, which for some reason makes complete sense to me for nomadic footwear). The little buckle shape reflects the shape preference of the nomadic nation.
Tribal clothing proved extremely challenging. From the get-go I’ve tried to emphasize relativism in URR, a lack of technological determinism, and so forth, but it is tricky to create “tribal” clothing styles that are intriguing and interesting, without them appearing “primitive”, but still acknowledging that a tiny (or at least, small) tribal nation will not have the technologies of their colossal feudal neighbour, for example. I also, of course, needed them to look very different from feudal and religious clothing, whilst still having enough variety that the clothing of one “tribe” will look nothing like another. After a lot of thought and several full days of trial and error, I’m very happy with the system I came up with. When I was doing the research for these styles I tried to find as many styles of dress used by ancient people that didn’t necessary look “primitive”, and that looked nice and varied. I looked for things like ancient Mesoamerican dress, ancient Egyptian clothing styles, and so forth, whilst accessories (necklaces, bracelets, etc) will appear in later releases. In the end I wound up with ten total possible “styles”, and three rankings of the technological sophistication of the tribal nation. For those with the greatest tailors you get something like the “high” one below – a thick background colour and lines running down it; for those with middling clothing technology (if there is such a thing) get a pale background with a coloured pattern and running lines, whilst “low” technology clothing has no lines and pale/dark pattern. You’ll also note the pattern becomes less dense each time – there are no tiles between the pattern in the left-most, a one-tile gap in the middle, and a two-til gap on the right. I also, of course, had to think about leadership signifiers. Just like religions use silver and gold thread to denote high rank (abbots, inquisitors, archivists, etc) and the highest possible rank (popes etc), and feudal nations will use gold thread for their rulers (see below), there are various signifiers of a leadership position in these clothes. They either have a number of patterned “discs” hanging on their front; a pattern down the middle of their clothing; or a bar that rests in the centre of their torso (the patterns on all of these also, of course, vary).
And here we have various lower-body permutations, which will be similar in colour and graphics to the above set (the colour is always dependent on the flag of the tribal nation in question, as with nomadic clothes). These were far, far trickier to create than the upper-body tribal garments (although that was also the case for feudal clothing) but I’m happy with what I’ve come up with, most of which are (broadly speaking) kinds of skirts/gowns. As above, the most technologically advanced tribal nations have their colours inverted for someone that looks much richer, whilst each rank creates background double-line patterns that get denser as you go up in technical ability. As with the upper body clothing, there are equivalent variations for lower-body, so when you view a Chieftain, for example, both their upper- and lower-body clothes will be very distinctive with the appropriate leadership signifier. Naturally in all of these pictures any shape could be of any technical level – to reiterate,the high/mid/low distinction only applies to the detail and complexity of the background pattern on the piece of clothing.
I also in the process of creating these figured out how I actually want tribal nations to function in the game, at long last! More on this much later when I get around to it, but suffice to say the existing tribal nations are very un-varied, and adhere to very comparable “technological levels”, and it would be far more interesting to create nations that might resemble the Mayans, or Babylonians, or Hittites, or Aztecs, or ancient Egyptians, and so forth. I’d like to expand “tribal” nations to mean more than just what we would now call tribal nations, but rather to encompass civilizations that are smaller and more self-contained and inward-looking, but vary vastly more than those currently spawning in the current version. Either way, this is a future project, but I’ve already had some very interesting ideas for how this could work. Oh, yes, and as for shoes, tribes either go barefoot or have some fairly simple sandal-type shoes, which I haven’t got around to making yet, but I’ll throw those together on a spare day sometime before release.
Class and Clothing
I’ve returned to the highest and lowest class statuses for standard feudal clothing. I didn’t want to create a special clothing set just for rulers because the player will so rarely ever encounter them (although rulers do get unique crowns and unique thrones!), but I wanted something to mark out “ruler clothing” from “upper class clothing”, so I’ve gone with a similar model to the “pope clothing” of adding a special colour of highlights to upper class clothes. Therefore, “ruler clothing” now looks like this, with some nice gold/orange/white trim which varies depending on the other colours of the clothing (however, if the ruler is of a theocracy and therefore also a pope/godking/archcleric/whatever, they default to the religious clothing). Examples:
Meanwhile, lower-class clothing wasn’t looking particularly impressive and needed a significant overhaul, since there is only so much brown one can look at. I tried to build up a decent library of “standard” colours that wouldn’t require any kind of serious wealth – whites, greys, browns, etc – and then I’ve tried to actually make them interesting (though I admit, this was tricky). Here are some instances of lower-class clothing types with the upper/middle equivalents for the same nation next to them:
There is still one final thing to do for the lowest-class clothing, which is to make certain archetypes even less ornate (though you can see that the buttons are smaller, the belts less patterned, etc), because the 1st and 2nd on that list, for example, are still a bit too snazzy. Although, with that said, I don’t want to make the most common kind of clothing too uninteresting to look at, so there’s a balance to be found between realism and variety. I’ve also made the variety of colours possible for lower-class clothing significantly greater than it originally was, and hopefully you can see that in the left-most column. I’ll update this image later in the week once I reduce the complexity of some of the designs!
Final Clothing Thoughts
I’m extremely pleased with how different all four forms of clothing are. I feel confident saying that although the styles within each vary very significantly, it’ll always be fairly apparent when looking at an unknown person’s clothing whether they are wearing feudal, nomadic, tribal or religious clothing (and the armour sets I intend to develop later this year will obviously be highly distinct again). Here’s a rather nice image of some compiled generated clothing which illustrates this point better than I can, and shows very nicely the massive range of clothing you can now find on all the people you meet in the world(s) of URR:
I’m very happy with how these are all looking, and with these finished all clothing except armour is done (though armour won’t appear until 0.9) so we’re done with clothing for now (at a later date I will also add gloves, necklaces, rings, crowns, etc – I am really looking forward to crown generation – but not for 0.8, and probably not 0.9). I’m now turning back to pathfinding and scheduling for the third week of work, and we’ll have a large update on this in a week’s time… hopefully with it completed, but we’ll see how it goes. The task remains massive, complex and challenging, and although I’m making progress, it’s a long way from done. If I don’t think enough scheduling and pathfinding is done by next week, I’ll probably post an interim update on some of the other small additions and changes I’ve been implementing into 0.8. Either way: see you then!
On the 20th of December last year (i.e. a few weeks ago) I picked up my second danmaku/bullet hell world record, this time in the excellent Steam game “Danmaku Unlimited 2”. This is the second WR I got in 2015 after the Xbox 360 game Score Rush, and didn’t take me quite as long, although learning the more complex scoring system (see below) and relearning how much a given controller movement relates to my ship’s movement (again, below) made this more challenging than I expected. My ability to “read” the screen and predict the flow of bullets was unchanged, but my ability to play was impacted to a much greater extent than I had anticipated by the slight differences between the two games. Either way: much like last time, I’ve written up a little analysis post for you all. I recognize clearly this is predominantly a roguelikes blog, and there isn’t exactly a massive amount of overlap between the two genres, but danmaku games often do some very interesting things with space (just as the best RLs do) and always have enough detail to merit a close analysis. For those of you who aren’t keen danmaku, though – not to worry, next week we’ll be back with a major URRpdate, either about AI (finished?) or clothing (finished???) as we move towards starting the dialect generation and the conversation system towards the end of January. Otherwise: enjoy! Here’s the video – the previous record was 1.6 trillion and the video is 1.9 trillion…
…and here’s the analysis:
Controller Movement and Ship Movement
The first challenge was adapting to a new input system. In Score Rush, you could push the control stick any amount and your ship would move at an appropriate speed – the slightest touch would make your ship inch across the screen whilst pushing it as far as the stick goes resulted in far speedier traversal of the game space. The other difference lay in the potential movements, and again, Score Rush has a far greater range of allowed movements than DU2 – you can move at any angle the controller recognizes (I believe the 360 controller does, indeed, recognize 360 different angles, but perhaps somebody can correct me on this?). By contrast, DU2 allowed you to move in only the eight compass directions. To visualize this, therefore, imagine the ship is in the middle of these circles, and the red areas show both the directions the ships can move in, and the speeds they can move, where a red area closer to the edge is faster, and nearer the middle is slower:
This, although it might seem subtle, required a significant re-learning on my part of the movement within the game. You can only move in eight directions, and either you don’t move, or you move at full speed; this necessitated a less fluid form of movement and a form of movement based move on “tapping” the controller rather than gently pushing the controller. Honestly, I think I prefer the Score Rush style of movement, though I did get used to the DU2 movement in the end. It was nevertheless surprising how incredibly different it felt to control two apparently similar games!
Firstly, this game has a scoring system which is vastly more complex than that of my previous world record game, Score Rush, and this took me a little while to fully figure out. There are three counters – “TM”, which goes up based on (I think) the number of gold stars you collect in a level, and only resets to 0 after a death; “Grazed”, which lists the number of bullets you’ve been grazed by without being killed by them, and gives you a bonus to every ship you kill, and increases your trance gauge (more on this shortly), but resets to 0 after a single hit,; and the largest multiplier, which I’ll just call “X”, and is reset automatically on each level and is increased by killing enemies up-close, collecting the diamonds they drop, and serves as a multiplier for that level (and might have some relation to the value of the gold stars?). Then there is the trance gauge – activating it when full transforms all bullets in your vicinity into diamonds (for improving that level’s “X” multiplier) and causes your extra points earned from grazing to skyrocket, and the bullets from destroyed enemies to turn into gold stars – which, as above, contribute to your overall “TM” multiplier. Confused about what the optimal way to play this is? Me too. I found this a fairly puzzling system, but some experimentation suggested that the best way forward was to quickly stack up a lot of grazing on the first level when you can’t score highly anyway (because your TM is low), and then otherwise to close distance with enemies extremely quickly, never use a trance too early in a level, and only activate the trance when you’re absolutely surrounded by bullets, in order to optimize the number of extra diamonds you get. What this means is that at the start of each level I tend to focus on killing close-up (for “X”) and sometimes grazing (to build up a trance), and then later in the level I use the trance ability every chance I get. It’s possible that there is a slightly more efficient method, but a) I haven’t found it and b) my world record is more than 2.5x the previous world record, so I’m not too concerned.
Second Boss, Second Attack (6:02)
The first truly challenging attack in the game is the second attack launched by the boss of the second level, which is (in my view) a significant step up in difficulty from the rest of the level, and is harder than any attack of the third boss a level later! This attack fires out rapid circles of very closely-placed circular bullets, interspersed with thick blocks of diamond bullets and bursts of larger (and smaller) red bullets whose behaviour seems harder to predict (though I think it is nevertheless deterministic). This attack requires the player to nip between closely-packed lines of rapidly-moving bullets which also ensuring that the large wedges don’t get caught, and it’s surprising how much of the screen this attack “takes up” – nevertheless, I think this is a really good attack, although one that could have been made even better (and tougher!) had the large wedges of bullets been more varied in their trajectories. As you’ll see in the video, it isn’t too tricky if one remains near the middle of the screen for the second half and makes sure to move quickly.
Third Level, Opening (7:35)
The next challenging section comes about two-thirds of the way through the third level. A large set of ships spawn that quickly fill the level up with bullets, or fire bullets in a spinning pattern extremely quickly, or fire large “blocks” of bullets that unfold themselves towards the enemy. Although it perhaps might not look it in the video, this was one of the first major roadblocks I encountered to getting the world record until I was able to find a strategy for navigating it all; and even then this resulted in a death a decent amount of the time. A very tough opening, and much harder than the rest of the level, due primarily to the massive volume of bullets, the speed of some of the bullets, and the amount of the play area removed by some of the attacks. A good bit of the video, though!
Fourth Boss, Most Attacks (16:33)
The fourth boss is really tough, particularly due to the attack below, which is incredibly challenging. We have a massive range of lines of red diamonds being fired from the boss, pairs of large purple bullets being aimed towards the player, and these large purple bullets then fire out smaller, pink bullets. This attack is quite clever, however, because what would ordinarily be the tactic, i.e. taking it slowly, becomes impossible when you have the large purple bullets being aimed at you; it forces you to move quickly around the stage and makes it much more challenging than it would otherwise be, since you can only look so far ahead. Even whilst attempting the record I would estimate I lost at least a quarter of all my attempts on this exact attack – it’s just that tough (though happily in the record playthrough, it comes off without a hitch!).
Fifth Level, Fleet (18:20)
Immediately after the opening on the fifth level comes a very interesting section – the player navigates through a fleet of massive ships, interspersed with various smaller ships, that fire in all kinds of directions and cut across the screen either diagonally, or top to bottom. This is one of the most complicated parts of the game and, unless one is very careful and very efficient, the player will be faced with a massive volume of bullets coming from almost every direction. The best strategy I found here was to use two “super charges” when dealing with the diagonal ships, and then attempt to do so as many times as possible in the second phase; nevertheless you’ll see me weaving very quickly between and through a lot of ships before we then get to the miniboss/midboss, which segues nicely into our next section…
Fifth Level, Midboss (19:45)
Whew. This is where things get really nasty. The first attack of this mid-boss is tough, but not impossible – lines of large red bullets with small gaps are fired out, with purple diamonds that cut back across the screen in the opposite direction from the red bullets. This needs a lot of quick thinking to keep track of the speed of the purple diamonds and see when (if at all) they’re going to intersect with the part of the red pattern you’re currently navigating.
This one took a little working out, but tracking right-to-left like I do in the video proved to be the best way to deal with it. At the end things can get a little confusing with the additional streams of red diamonds that emerge afterwards clashing with the remnants of this first attack, but it’s not ordinarily too much of a problem. However, this midboss then unleashes by far its more deadly attack – this incredibly fast burst of bullets:
This one took a lot of figuring out. I find it too fast to actually dodge on the fly, particularly since the bullets aren’t coming straight down the screen, and they’re diamonds instead of circles – those might seem like small things, but they’re very significant at this level. To deal with this attack I first experimented with the validity of hiding in one of the corners, but they always got hit; then I tried to find a bunch of other “safe spots” but I couldn’t find a single location on the map that a bullet never went through during its attack (I’m sure they exist, but I didn’t feel like playing “hunt the pixel” any longer). Instead I found a two part strategy; to follow the inside track of the diamond bullets until twelve have gone past me (in the video at 19:59 you’ll see what I mean), and then hug the right-hand side of those bullets, wait until the final moment, and then move up; that dodges all the shots without having to move too much, as some of these bullets are frankly too fast (and coming at too unusual an angle) to dodge on response/reaction with any kind of regularity.
Fifth Boss, Sixth Attack (24:44)
The “final” boss has some tough attacks, and some less tough attacks, but one of the toughest (and most creative) is the one below. The boss fires a ring of bullets around the player, reducing the play space the player can move in to less than 50% of the usual room, and then fires large purple bullets at the player. These leave trails, and the trails then turn into diamonds, set at 90 degrees from the direction of the trail, that then start moving. The result of this fairly complex description is being trapped in a tiny area with a large number of bullets coming at you at fairly high speed from all kinds of directions! Again, in this playthrough I don’t take a single hit here (though I do super charge at one point to clear the screen out), but it’s a really fiendish and really interesting attack.
“True Last Boss”, Everything (25:50)
The “True Last Boss” or TLB appears after the “final boss” if one is playing on the highest difficulty and hasn’t needed a continue up to that point (both were the case on this record playthrough), and has three very nasty attacks. For the first, the thick lines of purple bullets, the player has only a few fractions of a second to sneak between them as they fire. For the second, the circles of pink bullets, they move in a confusing and visually painful pattern that required me to adopt a rather strange way of viewing the screen – it’s hard to describe, but once I learned to “zoom out” with my eyes and see the screen as a whole, weaving between these immensely fast bullets being possible. The third, the orange diamonds, are very hard to keep track of since the player has to circle rapidly and keep an eye on the trajectories of each set of bullets; like the others, this was hugely tricky at first, but I got the hang of it by the end by trying to move “forward” by one bullet each time a bullet goes past me (watch the video and this sentence will make more sense). Once this phase is finished, the TLB switches to one final attack, which is pretty crazy – I normally do it without taking a hit, and I confess to being slightly miffed by taking a hit in the world record playthrough, but such is life. I think this final attack is tremendous and really needs the player to split their attention between the regularity of the diamond bullets and the semi-unexpected trajectories of the circular bullets, as they come in from a different angle. A very tough attack, a fitting conclusion to the game, and a very visually striking minute.
So there we are! That’s my second world record, and hopefully the second of what will soon be a much larger money. However, this game has two game modes – the same game but two different scoring systems. This mode is called “Classic”, whilst the other is called “Burst”, and I will probably go after this record too. Having done all the work to learn the game and the movement system and so forth, it would seem rather peculiar not to even bother with the other game mode, since I should already be reasonably close to getting that record just from my general ability at the game. When I get the “Burst” world record, I won’t post another analysis entry, since the game is basically the same even if the scoring system is slightly different;however, if it takes too long, I’ll just move onto Blue Wish Resurrection a little bit earlier(screenshot below shamelessly lifted from Youtube)…
Right! That’s enough danmaku for now. Next week we’ll be back to URR, and I’ll see you all then. Hope you enjoyed the video!