Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411512 Posts in 69376 Topics- by 58430 Members - Latest Member: Jesse Webb

April 26, 2024, 08:54:54 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsDwarf Fortress meets The Outer Wilds? "Ultima Ratio Regum", v0.10.1 out Feb 2023
Pages: 1 ... 35 36 [37] 38 39 ... 53
Print
Author Topic: Dwarf Fortress meets The Outer Wilds? "Ultima Ratio Regum", v0.10.1 out Feb 2023  (Read 177712 times)
Ultima Ratio Regum
Level 7
**


Game Studies Lecturer, "Ultima Ratio Regum" person


View Profile WWW
« Reply #720 on: January 26, 2016, 02:29:29 AM »

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…

…but first…

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(https://www-users.cs.york.ac.uk/~devlin/) and Dr Gareth Beale(https://www.york.ac.uk/digital-heritage/members/gbeale/#research) on a nine-week project for the “YCCSA Summer School”(http://www.york.ac.uk/yccsa/activities/summerschool/) 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(http://www.york.ac.uk/media/yccsa/documents/summerschool/2016/Algorithmic%20Generation%20of%20Social%20Architecture.pdf) 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:

Scheduling

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 Implementation

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).





Counties

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

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.



Jail Bedrooms

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.

Harems

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:



What next?

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!
Logged

Mete
Level 0
**


View Profile
« Reply #721 on: January 26, 2016, 03:37:36 AM »

This world map is incredible, everything here looks amazing.
Logged
Ultima Ratio Regum
Level 7
**


Game Studies Lecturer, "Ultima Ratio Regum" person


View Profile WWW
« Reply #722 on: January 27, 2016, 12:50:05 PM »

This world map is incredible, everything here looks amazing.

Thanks! Smiley
Logged

BomberTREE
Level 9
****



View Profile
« Reply #723 on: January 30, 2016, 11:42:05 AM »

You're doing so freaking well, keep it up man!  Kiss
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #724 on: January 30, 2016, 08:58:07 PM »

I finally caught up with the article on unpredictability and other stuffs lol

I was wondering how my overloading theory (in loss of better words as now) would match your vision.

Basically unpredictability is looked through an analysis of structure of increasing "overload", all example are made using a progression structure as illustration:
- level 1 is "complication" ie how much effort or stimulation there is to a structure. Ex: a straight line is simple, a twisted line is complicated, none ask for significant mental load as it's only "go towards", but the twisted line ask for constant redirection (effort) to follow and at a certain level cannot be  fully grasp as there is too many twist. Such a structure though don't ask for memory and only point to point movement is needed, traversing the line is guarantee with this simple strategy. A labyrinth.

-level 2 is complexity, ie how much memory the structure ask for. A straight line ask for no memory, a branching path with dead end and only one correct path ask for memorizing the branch to not explore there anymore, the more dead end branch the more memory is needed to mark them, it's more complex. A maze.

- Level 3 is depth, ie how much anticipation is needed for dealing with the structure. With a simple line there is no anticipation needed, it's always forward, with a maze you only need to memorize and it is solved, but with depth memory isn't enough you must also predict the next outcomes as it can change, there is a behavior where rot learning alone is not enough. Depth is where "unpredictability" exist. The more anticipation is needed, the more depth there is. A system.

These class aren't mutually exclusive, it's easy to create "obfuscation" for example by combining the two primary level to mimic the third, as if the player's capacity is "overloaded" the structure became as good as unpredictable.


The thing with your classification is that unpredictability intersect with overloading interestingly:
- "randomness" with complication only lead to shallow experience as the nature of the experience (solve the same way) don't change only its shape, but with complexity it turn it into a new "exercise" of the same experience, with depth it create "fresh" experience altogether.
- "chance" makes complication more interesting by varying the stimulation of the  experience without fundamentally changing it, with complexity it create "surprise" but still keep the identity (unexpected branch), and with depth it might create "confusion" as the foundation of anticipation has been reset (new encounter to learn for example).
- "luck" is the more destructive, it remove control out of the player in complication negating the experience but keeping the constant stimulation (roller coaster or pachinko like), with complexity it move the player around unexpectedly (see snake and ladder), with depth it might feel unfair as you have no way to predict what will happen.

That was an interesting read and definitely help me precise shapes of gameplay and explain some nuance of PGC I had hard time verbalizing to other, very useful stuff.
Logged

Ultima Ratio Regum
Level 7
**


Game Studies Lecturer, "Ultima Ratio Regum" person


View Profile WWW
« Reply #725 on: January 31, 2016, 12:45:03 PM »

You're doing so freaking well, keep it up man!  Kiss

Thanks! AI is turning into a truly wretched slog, but it will be so good once it's all done...

UNPREDICTABILITY STUFF

^ this looks *really* interesting, I shall give it a proper look shortly, but I only have time tonight to stop off here, upload the blog post, and disappear again!

---

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.

Banners

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).



AI Stuff

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.



What next?

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!
Logged

Ultima Ratio Regum
Level 7
**


Game Studies Lecturer, "Ultima Ratio Regum" person


View Profile WWW
« Reply #726 on: February 02, 2016, 05:02:38 AM »

Meanwhile, emerging from recent discussions between myself and Darren Grey, a very important thread about the future of Roguelike Radio has just gone up - all feedback here/Reddit/elsewhere welcome! https://www.reddit.com/r/roguelikes/comments/43u2ju/the_future_of_roguelike_radio/
Logged

Ultima Ratio Regum
Level 7
**


Game Studies Lecturer, "Ultima Ratio Regum" person


View Profile WWW
« Reply #727 on: February 07, 2016, 03:06:02 PM »

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.

Scheduling

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.

Drawbridge Chains

What is says on the tin, really.



Next Week?

Dare I hope… AI pathfinding/scheduling… finished?!?!?!?!
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #728 on: February 07, 2016, 04:04:40 PM »

You don't use the 3x3 tiles buffer centered on the player tile position? In which you can do extra logic for the 8 tiles around to smooth those kind of scale with a kind of LOD spawning
Logged

Ultima Ratio Regum
Level 7
**


Game Studies Lecturer, "Ultima Ratio Regum" person


View Profile WWW
« Reply #729 on: February 09, 2016, 02:52:35 PM »

Na, I debated that, but it would take waaay more time to load, handle movements, etc - this method is harder on me, but better for the player-side of things, which is a worthwhile tradeoff Smiley. I shall also get to your unpredictability thoughts soon, I swear! I'm just snowed under with stuff to do at the mo.
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #730 on: February 09, 2016, 03:08:57 PM »

Don't worry look at the time I too to get to yours lol, I'm not sure what I put down make sense for anyone else than me though lol
Logged

Ultima Ratio Regum
Level 7
**


Game Studies Lecturer, "Ultima Ratio Regum" person


View Profile WWW
« Reply #731 on: February 14, 2016, 04:20:29 PM »

Another big one this week! Even though AI is still not finished, it feels as if things are moving quite a bit smoother now. It’s less like I’m adding in new code, and more like I’m just tweaking the code to make sure that each class of NPC in each situation (particularly more unusual ones like monasteries and castles) behave correctly. This is still going to take some time, but the major mind-numbing difficulty of the actual coding process is pretty much finished; now it’s just a mopping-up task to make sure tellers can use the code written for monks, soldiers use the code for guards, and so on and so forth, and that everything is suitably applicable to every scenario rather than the small subset of scenarios I originally used to get the system up and running (i.e. guards). As such, this week a lot of new NPCs have started working correctly in their schedules, and various amusing or peculiar bugs found along the way have been fixed. My rather bold goal last week of finishing AI entirely hasn’t been met (ha! I was so naive, and will never make such an absurd prediction again), but we’re still getting closer and closer, and it certainly emotionally feels like the home stretch… at long last. Sorry again for the late-evening update; there’s just so much to do that I find myself coding all day and then suddenly quickly typing the update post before I go to sleep…

Tellers

Tellers now go about their day correctly. The bank remains open all day for people to come in and sit down and wander around, and guards naturally keep guard all day but the teller is only there in the day time. I’ll probably change it at some point so that once the teller exits, ordinarily people won’t path into the bank, but for now that’s going to be how it works, since there are only so many tiny additions and minor things that 1/6000 players will notice, that I can implement in any given release. Here’s a teller packing up and deciding it’s time for a relaxing snooze:



And the same from outside:



And entering their home, with a rather jumpy gif due to the volume of de-bugging stuff happening in the background, but you can still see that the teller enters, realizes they need to find the stairs, finds them, goes up them, finds bed, goes to bed.



In the process of handling bank tellers I also discovered a weird bug where either priests could spawn in a middle-class map grid, or bank guards, but not both. This was a result of a silly “elif” where I should have written “if”, and this promptly got fixed!

Priests

Priests seem to be doing their thing correctly! Priests (and worshipers) doing their normal routine in the day time:



And then I left, came back at midnight, and sure enough found the priests sleeping in their cells:



And then, at the appropriate time, the priest awakes and starts doing her thing!



Merchants

Look at this merchant going into their shop first thing in the morning!



Truly magnificent.

Walking Through Walls

Found a funky glitch involving pathfinding through cities that wasn’t correctly taking account of where doors inside and outside the city actually went. Basically, in this city, an AI was trying to take this path:



Once I was in the grid below the one in the top-left, it couldn’t spawn properly since it was trying to spawn at a gate that didn’t exist. The path had been allowed because, sure enough, none of those map grids were blocked – i.e. were oceans or mountains or deserts – and a pathfinding map of the area basically looked all green, and didn’t take account of where gates are and are not! I tried to find an elegant solution to this problem, but failed, so I just changed the city pathfinding algorithm to consider any tile outside the city to be blocked (and I’ll think of a more elegant solution later, for when I want NPCs to move from city to city). So before, the pathfinding grid for these map grids looked like the one on the left, and it now looks like the one on the right, so city NPCs have to move always within a city, even if going out-and-in would be more efficient, because taking account of gates is too damned confusing.



Pleb Purge

I noticed a tiny weird bug where sometimes, upon entering a map grid in which the NPC needed to “catch up” to where they should be and would have been if the grid had previously existed, they would reach a tile away from their destination (e.g. a door to a building or gate to another district) and then just dance around the tile for a while. It took quite a while to figure out the issue, but the problem was that the game was spawning the random crowd NPCs *before* getting the important NPCs to catch up to their positions, and so there was a truly tiny chance (I probably encountered this in 2/200 game loads before I figured out the issue) that a random crowd NPC would be spawned on an important NPC’s target square, and prevent them from reaching it. Therefore, when you enter a grid, the game now ensures that a) there are no random NPCs standing in the exact tiles in front of gates to other districts, and b) that there are no random NPCs seated on the exact “endpoint” tiles of any important NPC. As such, from what I can tell, this weird little bug (which admittedly wasn’t a game-crashing bug, but still merited dealing with) has been resolved.

Other Bug

Also ffound one bug where certain important NPCs, upon leaving a building, wouldn’t change their internal x/y coordinates to an appropriate external set because they were looking for the wrong kind of door, which resulted in them leaving buildings and being magically transported on top of buildings, into lakes, into trees, etc. This no longer happens.

Next Week

Well, more AI stuff, of course. What else?!

LAST BUT NOT LEAST

Since AI stuff is proving so complex, I’ve decided not to move forward the release – I still think the conversation system is absolutely vital – but I’m going to put out a secret, intermediate release, to a small team of playtesters, to make sure that the pathfinding system all works correctly. Despite my best efforts, there’s no way I can really test every single possibility exhaustively. If you’re interested, leave me a comment! This won’t be until probably next month, and would require you to basically wander around the world, entering buildings, looking for NPCs, leaving buildings, entering other map grids, and just basically doing anything you can to upset their scheduling.
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #732 on: February 16, 2016, 03:56:12 PM »

Fun stuff, you could finish this game and then start a project that would compete with GTA right away (not in sales or production value), with modern engine many fancy stuff would be easier to implement than all those scheduling shenanigans! even gta don't bother!
Logged

Ultima Ratio Regum
Level 7
**


Game Studies Lecturer, "Ultima Ratio Regum" person


View Profile WWW
« Reply #733 on: February 18, 2016, 11:13:40 AM »

Pah, GTA. It has been a long time since that series gripped me Sad.
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #734 on: February 18, 2016, 02:37:20 PM »

Most fun I had with GTA in recent years was when it was called "Retro City Rampage"
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #735 on: February 18, 2016, 03:06:33 PM »

I was talking about the technical aspects
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #736 on: February 18, 2016, 04:16:02 PM »

I know, I just like being an old cranky bastard Tongue
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #737 on: February 18, 2016, 05:46:37 PM »

Logged

JobLeonard
Level 10
*****



View Profile
« Reply #738 on: February 19, 2016, 02:38:52 AM »

Mah Gorilla
Logged
Ultima Ratio Regum
Level 7
**


Game Studies Lecturer, "Ultima Ratio Regum" person


View Profile WWW
« Reply #739 on: February 21, 2016, 04:23:16 PM »

In light of the death of one of my literary/academic heroes, an Umberto-Eco-focused blog post discussing his work and its relevance to URR. Back to AI next week!

http://www.ultimaratioregum.co.uk/game/2016/02/22/umberto-eco-and-urr/
Logged

Pages: 1 ... 35 36 [37] 38 39 ... 53
Print
Jump to:  

Theme orange-lt created by panic