• Register
Post news Report RSS Clothing, Characters, Inventory, Faces, Genetics, etc

A massive URRpdate this week on clothing and characters, on genetics, field of view, and lots of other goodness.

Posted by on

Clothes as Items, and Inventory Changes

Clothes have now been transported out of the file I use for working on the game’s graphics and added into the game itself, and turned into items (with a horrifyingly large number of variables – it took me much longer to integrate them than I expected). When you look at an item of clothing, it tells you nothing except the quality of the tailoring – “ornate”, “well-made” or “poorly made” – and what type of thing it is – “shirt”, “pair of trousers”, etc, and tells you nothing about the nation it is from, as that’s part of the learning/discovery process. Along side this implementation, the inventory system has been changed. Previously there were different keys for each action, so one would press ‘d’ to ‘drop’, ‘D’ to ‘drop several’, ‘t’ to throw’, and so forth; they’d then bring up your inventory, you’d select the item you wanted to perform the action with, and go ahead and do it. However, this meant you only saw the picture of the item when you pressed ‘i’ to simply look at your inventory, and that meant the images were (to an extent) being wasted. I’ve now changed it so that there are only two inventory functions: ‘i’ brings up your inventory, and ‘D’ allows you to drop many items at once (without looking at them). When you now press ‘i’, therefore, and choose an item, a line of text at the bottom of that item lists everything you can do with that item, so you always get to see the graphics, and the range of possibilities for each item is made a lot clearer (so things you can wear, or things you can use in some way, or eat, or whatever). I think this is a lot better, makes more use of the graphics, and tidies up the UI a little (given how many roguelikes use every damned letter on the keyboard). An example of a piece of clothing currently un-worn, and one being worn:


Character look-up

The look-up window for any character (player or NPC) has now been significantly changed and upgraded, and faces have also been moved out of the graphical-testing file and fully integrated into the game’s code. The first page currently shows the face of the NPC you’re looking at (or your own), and lists everything that person is currently wearing (which is visible; rings are “invisible” if they have gauntlets/gloves). The second page will soon show health, but I’m still working (yet again!) on thinking through how health is going to work, so we’ll have to see, and for now it has been removed (and will probably stay removed for 0.8 unless I finally figure out how health will work, even though I know how combat is going to work). So here’s a shot of me (without a first name, so the name up there is my family name), and this time I happened to be in the “scarification” civ. You’ll also notice I’ve made all eyes into a light grey instead of white! The reduced contrast is far less jarring.


Browsing clothes

The coolest thing about the new look-up? You can now hit Enter and browse through all the things a character is wearing, using the arrow keys. As you move around the “grid” of things the character has on them, each image then appears on the right-hand side (the first time the right side of the screen has ever been specially used!). For now, therefore, you can look over the upper- and lower-body garments, and boots, but I’ll be working on all non-armour garments in this release, meaning that we’ll be adding gloves, and probably cloaks too, but armour will come next time, and necklaces and rings will come… whenever. Either way, here are some nice illustrative screenshots of this! (With some placeholder first names and surnames…)




NPCs are now spawning

This speaks for itself, really, given the above screenshot. They don’t move, think, react, converse or do anything yet, but they are there, and the game can handle them and draw them correctly, and the player can ‘l’ook at them and browse what they’re wearing. My objective for this coming week before the IRDC is to really crunch and try to get crowd mechanics working to the point that NPCs will spawn and despawn out of the player’s line of sight. As for line of sight and field of view, there’s something cool on that point later down this entry…

Genetics, Culture, etc

I’m pleased to say (and one might extrapolate this from the integration of the facial images) that we’ve now got a model for genetics and cultures spreading around the globe. Genetically the game now chooses large chunks of land for eye and hair colours (they bleed out around the edge, but these screenshots show only the dominant colour in each region; equally, although these are very geometric and unsmooth, that doesn’t ultimately matter, since populations of NPCs in-game will always blend and travel). The first picture shows eye colour variation, the second hair colour, in a generated world:

As for how these work for individual NPCs, basically, each nation has a “core” set of values for their skin tones, eye colour, etc, and that’s based on what values are present in their capital city specifically. Equally, they can also spawn NPCs who might have been born hundreds of miles from the capital, but are still within the same nation. The further you get from a nation’s capital, therefore, the more and more people you’ll see who are born according to the demographics of that particular area, and the closer you get to the capital, the more you’ll see people who look like the people of that capital city. Cultural norms will be maintained however far you go – so people in the capital and a distant colony have the same hairstyles – but visual/genetic markers (eyes, skin, hair colour, etc) will vary as you move around. So if you have a capital city on the far, far east, and a colony of that nation on the far west, and in that colony you might expect 25% to “look like” they came from the capital in terms of eyes/skin/hair colour, most to look “native” to that colony in eyes/skin/hair etc, but they will be visually unified according to their hair styles, other cultural markers, beard styles, clothing, etc etc. So we basically have two layers – the “genetic” and the “cultural” – and these blend and intertwine as you move around the world. Also, different types of civilization have different levels of cultural variety – the open and well-traveled nomads have the most variation within a nation, the small tribal societies have the least, and the feudal civilizations are somewhere in the middle.

Field of View Optimization (at last!)

People have been asking for this for years, so I have finally put some time into optimizing the field of view algorithm, and now you can see basically everything on-screen at one time. Buildings will still have a reduced field of view, and it’ll reduce at night, too, but here’s a screenshot and a gif of wandering outside in the daytime:



Next Week

Well, the IRDC is in a week’s time, and I’m crunching like mad to get some kind of NPC pathfinding/crowd mechanic simulation going there. It’s going reasonably well, and I think I’ll have something good to show off, but I’ve been running into some fundamental design questions – can NPCs push past each other, for instance, if one occupies a tile the other wants to get past – which have surprisingly far-reaching algorithmic implications for how pathfinding and gameplay will actually play out in the longer run.

In the mean time, you can keep up to date on my devlog, Facebook page, or Twitter!

Post comment Comments
drthompson001
drthompson001 - - 67 comments

Outstanding work as always and great progress!!! I'm seriously losing sleep over this :D

Reply Good karma Bad karma+2 votes
UltimaRatioRegum Author
UltimaRatioRegum - - 307 comments

Ha, thanks! Hopefully will have another large (and even more gif-heavy) update coming this time next week...

Reply Good karma+2 votes
ethanethan
ethanethan - - 58 comments

i want it

Reply Good karma Bad karma+2 votes
UltimaRatioRegum Author
UltimaRatioRegum - - 307 comments

Soon (ish) you shall get it!

Reply Good karma+2 votes
l30sh00t
l30sh00t - - 5 comments

Make it so they can push but at a cost of something, say mobility, or stamina. This makes it so the gameplay strategy is one that will require the player to think in advance while also removing that funnel effect that it causes in tight spaces (although this might be something you would want? if so, you could modify the penalties to be based on the type of push, say, if the space if very tight and the only available spaces would be behind then, instead of pushing aside or forward, he would have to actually pull and as such lose more time then if he simply had to shove him aside). Hope that makes sense, I don't know, thank you for this amazing project and good luck. :D

Reply Good karma Bad karma+1 vote
UltimaRatioRegum Author
UltimaRatioRegum - - 307 comments

Hmm, interesting idea! And thanks, you're welcome :)

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: