Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5 6 7

Author Topic: Hybridisation: Mixing races.  (Read 10923 times)

GavJ

  • Bay Watcher
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #45 on: October 06, 2014, 12:55:15 am »

Perhaps I was unclear:

1) Load the raws when you fire up a save for everything that will be used commonly, like weapons and materials and blah blah. Store all this in RAM in an ongoing fashion.
2) For "extended archive" type of information you only rarely need, don't load it yet, but wait until it is relevant, then load it, and keep it in RAM until the period of relevance ends, then unload it. In the case of hybrids, this would be "for as long as a hybrid of that type is on the map."

This represents exactly one file IO event for an entire siege event that brings hybrids with it, for instance. Not a big deal. (This is assuming the data on the hybrids already is saved to disk. If not, it is even faster the first time, as you point out). If it becomes a noticeable blip, such as if sieges routinely bring 40 different hybrid species with them that carry way more info than we use now (e.g. genetics stuff) and you have to read megabytes of files all at once -- then still not a big deal, because since sieges are predictable ahead of time, the game can slowly load in smaller unnoticeable chunks in the week or two ahead of time, perhaps even waiting for opportunistic game pauses, etc.
« Last Edit: October 06, 2014, 12:57:41 am by GavJ »
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #46 on: October 06, 2014, 09:03:07 am »

We know that there is some scope for improvement in how raws are loaded and retained in memory.  This is what gives us all of the hilarity of the 'duplicated raws problem.'

That said, there are some realities and trends that bear on this issue of hundreds of thousands of generated castes:

  • Memory I/O is faster than disk I/O, and DF already has a bottleneck with memory I/O.
  • The amount of activity that occurs off-screen is only going to increase, for example the armies will actually traverse the world map on their way to your fort or your adventurer's location.
  • The game can't do squat with a unit unless its raws are accessed.  The hybrids in any army anywhere in the world will require raw reads
Now it's entirely possible to split the raws into "header" and "main" components, with the "header" stuff containing what's needed for army or other off-screen activities.  Under a 64-bit architecture, its probably possible to allocate each header plenty of elbow room in RAM for when its main raws are loaded, and then do some of the intelligent pre-fetching that GavJ described.

That'd be a really nice feature to have, but it's a lot of work and it would happen for the sake of bringing the off-screen world alive rather than bringing gnome-yeti hybrids.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #47 on: October 06, 2014, 01:50:35 pm »

Procedural/randomized offspring, whatever format it takes in the raws, is a prime candidate for the new ability to generate raws during world-gen/actual play as needed, rather than all of it before world-gen. That way, you only add in new creatures occasionally when the pairings actually happen and result in offspring, rather than a ton at the start that will mostly never be used.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

GavJ

  • Bay Watcher
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #48 on: October 06, 2014, 02:53:56 pm »

All of the difficulty here is in the algorithms for actually generating good, meaningful content for raws on the fly for new hybrids. And in deciding when to load and unload them intelligently, and making sure nothing is used prior to being initialized.

Merely separating raws into headers itself should take like 10 minutes. It's mechanically trivial, and algorithmically tricky.

Luckily though, algorithms are what the suggestions forum is all about! And we can help out on the most difficult part -- so if you wanted hybrids generated at runtime, how exactly would you choose their raws programmatically? Discuss.
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #49 on: October 06, 2014, 06:35:16 pm »

Pokémon style. Creature classes that determine that they can hybridize. [OFFSPRING_CLASS:HOMINID] and such. All creatures of similar classes will be able to interbreed. Bodies are a problem, but maybe that could just take after the mother or father or a token telling which ([OFFSPRING_ALWAYS_SIMILAR] or somesuch).

Chevaleresse

  • Bay Watcher
  • A knight, returned from a journey weary and long
    • View Profile
    • Patreon
Re: Hybridisation: Mixing races.
« Reply #50 on: October 06, 2014, 10:23:42 pm »

^^I like that. Also, how about a worldgen option to set number of hybrid varieties possible? The game could prioritize getting each race a hybrid with one other compatible race, then each compatible race, then just different kinds that already exist, i.e. you could have a short, skinny dwarf/elf hybrid and a truly massive tall, stout dwarf/elf hybrid after a certain point. Solves the issue of making a bajillion different hybrids while still allowing interesting combos and adding a way to fine-tune it to your preferences to boot. Hate inter-breeding? Set it to zero. Do you really want to see how many combinations of elf and goblin are possible? Turn the hybrid setting up.
Logged
GM of Trespassers V2.
If you like my work, consider becoming a patron. (Since apparently people think this is a requirement: no, my game(s) are free to play and always will be.

Demonic Gophers

  • Bay Watcher
    • View Profile
    • The Tunnels
Re: Hybridisation: Mixing races.
« Reply #51 on: October 11, 2014, 12:10:59 am »

How would procedural hybrid generation handle mules, for example?  Which are already in the game, although as far as I know they are magically generated from nowhere, as there's currently no mechanism for hybridization.  When Toady implements such a mechanism mules ought to keep the same characteristics they have now, and continue to be called mules instead of some generated name based on horses or donkeys.  I have nothing against the idea of procedurally generated hybrids, but I think that some system based directly on creature definitions in the raws is needed, both to cover real hybrids with established names and traits, and for greater modding flexibility.

The hybrid system ought to account for both inclination and ability.  One approach might use an ATTRACTION_CHANCE tag in the definitions for each potential parent and a HYBRID tag in the mother's definition.

ATTRACTION_CHANCE:CREATURE:CASTE:probability:probability with preference
-CREATURE, as one would expect, specifies the type of creature that is a possible subject of attraction
-CASTE would usually be ALL, but could specify a particular caste in some cases
-probability would be a percentage, determining the basic chance that an individual would find the subject creature potentially attractive
-probability with preference is a modified chance for individuals who have a preference for the subject creature.  Someone who "likes goblins for their terrifying features" is more likely to find their glowing red eyes interesting and exotic, rather than horrifying.
-ATTRACTION_CHANCE would respect orientation.  Potential romance would require both mutual attraction to the subject creature and compatible orientations.

HYBRID:FATHER:OUTCOME:ratio
-FATHER would be a creature ID, with or without caste specified
-OUTCOME could be a creature ID or NONE, to allow reduced fertility in hybridization.  If Toady also implemented a procedural hybrid system, OUTCOME could accept GENERATED.
-ratio would be a number determining which outcome occurs at any potential pregnancy, functioning like the POP_RATIO token for castes.

For a more complex ≡system≡, see JT's Token Wishlist.  Having to write up a creature entry for every hybrid would certainly mean more work for modders, especially in mods with a lot of intelligent creatures added, but it might be easier for Toady, and I would certainly prefer to have the option of defining specific hybrids that I want to be possible, with specific names and characteristics.
Logged
*Digs tunnel under thread.*
I also answer to Gophers and DG.
Quote from: Shades of Gray
*Says something inspiring and quote worthy.*
Opinions are great, they're like onions with pi.

GavJ

  • Bay Watcher
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #52 on: October 11, 2014, 12:24:22 am »

Quote
How would procedural hybrid generation handle mules, for example?

in raws:
[HYBRID:HORSE,DONKEY]

in code:
1) when raws are read, it takes note of that hybrid existing in the hybrids list.
2) When a new member is born, it checks, like it should for every new hybrid creature of any type "does this hybrid already exist / already generated?"
3) It will return "yes. It has. Continue using that existing info."
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

LMeire

  • Bay Watcher
  • Likes Troglodytes for their horradorability.
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #53 on: October 15, 2014, 04:08:13 pm »

I don't really see a problem with humanoids interbreeding with eachother to produce viable offspring; since, you know: it happened in real life already.
Logged
"☼Perfection☼ in the job puts pleasure in the work." - Uristotle

GoblinCookie

  • Bay Watcher
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #54 on: October 19, 2014, 10:31:38 am »

Procedural/randomized offspring, whatever format it takes in the raws, is a prime candidate for the new ability to generate raws during world-gen/actual play as needed, rather than all of it before world-gen. That way, you only add in new creatures occasionally when the pairings actually happen and result in offspring, rather than a ton at the start that will mostly never be used.

No; that is not the best way of doing it all.

I do think we should create every possible hybrid creature right at the start.  It would only take about a second at most for the computer to create a hybrid creature raw for about 100 basic creatures (that is about 10000 hybrids!).  It also works well in that it allows the player to add custom hybrids as well, plus things like mules in the unmodded game. 

This allows us to define whether the hybridisation can occur to start with, allowing it to otherwise save memory when it is at a premium later because it does not consider whether two creatures can reproduce or not until there is a hybrid file for it.

We do however still need to create new hybrids when we get to the point of having hybrids of hybrids.  Obviously we cannot simply create all possible hybrids-of-hybrids at the start because that is an infinite number.  But the computer needs to keep one step ahead of the action as it were. 

^^I like that. Also, how about a worldgen option to set number of hybrid varieties possible? The game could prioritize getting each race a hybrid with one other compatible race, then each compatible race, then just different kinds that already exist, i.e. you could have a short, skinny dwarf/elf hybrid and a truly massive tall, stout dwarf/elf hybrid after a certain point. Solves the issue of making a bajillion different hybrids while still allowing interesting combos and adding a way to fine-tune it to your preferences to boot. Hate inter-breeding? Set it to zero. Do you really want to see how many combinations of elf and goblin are possible? Turn the hybrid setting up.

There is only one dwarf/elf hybrid.  It has whatever traits are proceedurely generated for it based upon whatever is in the raw files for elf and dwarf.  Everything else is handled by normal genetics inheritance, so two hybrids reproduce exactly as a normal creature would.

If two hybrids breed then a third hybrid is created in the exact same manner as normal, using a hybrid of hybrid creature.  I like your idea about setting number of hybrids in the file and I think I know how it would work. 

By default we have a half-breed creature and then we have a quarter-breed creature.  That is setting 2 but you can set it to 3 and get octa-breeds (?) as well.

With the setting at 3, if an octa-breed was to breed with a half-breed then we would get a mixture of half-breeds, quarter-breeds and octa-breeds in equal proportion.  If a quarter-breed breeds with a half-breed with the setting on 2 then we get quarter-breeds and half-breeds in equal proportion. If we set the setting to 1, then half-breeds produce a mixture of half-breeds and pure-breeds rather than quarter-breeds.

If we set the setting to 0 then we get no hybrids, just random distribution of offspring of cross-racial unions into either racial camp.
Logged

Grubsauce

  • Escaped Lunatic
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #55 on: October 20, 2014, 10:09:43 pm »

I love this idea, but I think that the hybrids should be outcasts, considered abominations and wretches. It would add to the spice of the world, and create a formidable challenge to be as an adventurer.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #56 on: October 20, 2014, 10:28:23 pm »

I love this idea, but I think that the hybrids should be outcasts, considered abominations and wretches. It would add to the spice of the world, and create a formidable challenge to be as an adventurer.

Having anything be always considered anything is boring. It should probably be entity-based.

GoblinCookie

  • Bay Watcher
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #57 on: October 23, 2014, 06:45:23 am »

I love this idea, but I think that the hybrids should be outcasts, considered abominations and wretches. It would add to the spice of the world, and create a formidable challenge to be as an adventurer.

Why would that be?  It does not seem that the present population are in any way racist since they happily elevate minority race individuals to positions of supreme power and do not seem to have any issues about it; they care about entity not race.  Fact is that the Dwarf Fortress are clearly not racist and this is what makes the lack of mixing strange. 

Saying that we should introduce automatic racism against hybrids into the game is a dubious ideological statement because racism does not exist automatically as a result of anything but historically arose as a result of certain conditions that happened to occur in real-life. 

Racism in real-life is the result of slavery and colonialism that happened accidentally to now correspond with significant racial differences due to improved naval technology.  When someone takes over a settlement in the game, which they do rather seldom (preferring to kill some people, loot and leave) they simply establish a petty dictator that frequently just dies and is replaced by a local. 

Without a mechanism to create a colonial ruling elite we cannot realistically have the development of racism since the two are completely entwined. 
Logged

GavJ

  • Bay Watcher
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #58 on: October 23, 2014, 12:05:34 pm »

Quote
Racism in real-life is the result of slavery and colonialism that happened accidentally to now correspond with significant racial differences due to improved naval technology

This seems pretty dubious. I agree that the history is super relevant, but I don't think that's a NECESSARY condition for racism. It is definitely a trait of the human condition everywhere in the world that people favor their in groups versus out groups.

So if you grew up in a mixed society AND there were no history of race-relevant slavery or whatever then no, I don't think you'd be racist amongst those groups. However, if you grow up in a very homogenous community, then you would start to be at least a little more racist, just because it would now be lining up that your in group and your racial group are largely similar. I.e. somebody of another race definitely immediately can be identified as not from your hometown or probably your immediate region, so you should be suspicious of them as an out grouper. Not necessarily because of historical anything, but just because skin color and facial features are highly visible and cue you in to them being an outsider.

If you grew up in Times Square, then you would never have learned to rely on skin color or features, as visible as they may be, as an indicator of out-group, so you will be less likely to apply that as an adult. (UNLESS of course you live in a racially segregated bubble where for instance you see a lot of other races, but they are always just store vendors or delivery people or whatever, because of you living in an exclusive gated community in the middle of everything, etc.)
« Last Edit: October 23, 2014, 12:32:26 pm by GavJ »
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

GoblinCookie

  • Bay Watcher
    • View Profile
Re: Hybridisation: Mixing races.
« Reply #59 on: October 26, 2014, 09:20:55 am »

This seems pretty dubious. I agree that the history is super relevant, but I don't think that's a NECESSARY condition for racism. It is definitely a trait of the human condition everywhere in the world that people favor their in groups versus out groups.

Of course it is part of the human race but that isn't racism.  That is certainly how racists tend to look at the world, members of their own race are automatically in the in-group whether this is actually true or not so other races are the out-group.  Racists define in-group and out-group by race, non-racists do not. 

Racism did not exist at least to any significant extent prior to about the 17th Century because what defined the in-group/out-group was pretty much determined by religion, location and culture. The race relations of the game (no racism) are a more or less accurate depiction of actual medieval society as far as can be historically determined. 

If you want to have racism in the game, then you first have to introduce the possibility of the historical conditions in which racism emerged.  Otherwise you are saying that races inevitably clash by dint of some kind of inherant human nature, which is actually a racist idea.  I do not want Dwarf Fortress to make racist ideological statements. 

So if you grew up in a mixed society AND there were no history of race-relevant slavery or whatever then no, I don't think you'd be racist amongst those groups. However, if you grow up in a very homogenous community, then you would start to be at least a little more racist, just because it would now be lining up that your in group and your racial group are largely similar. I.e. somebody of another race definitely immediately can be identified as not from your hometown or probably your immediate region, so you should be suspicious of them as an out grouper. Not necessarily because of historical anything, but just because skin color and facial features are highly visible and cue you in to them being an outsider.

A genuinely homogenous culture with a long history of being such is actually completely non-racist. The growth of Racism requires not homogeny but a mixed community where race correlates with heirachical status.  This fact that status within the society corresponds to highly visible physical characteristics causes racism to develop.  The privilaged race holds the lesser races in contempt and  the 'lesser races' hate the privilaged race for oppressing them, creating in-groups/out-groups based upon race. 

That is the basis for why I say that naval technology caused racism. While nations had always conquered their weaker neighbors, the fact these neighbors tended not to have significant racial differences due to their geographical proximity prevented the racialisation of the heirachical relationships. The Roman Empire may have conquered most of Europe but it was geographically continuous and focused on the Mediterranean, Italian people do not look greatly different from the Spanish or Greeks or North-Africans. 

Those racial differences that did exist with the Empire (say between the above and Egyptians, Middle Easterners and Northern Europeans) are muted in their effect in that the Empire also controlled all the blending zones as well, people gradually become darker or lighter as you move in a certain direction rather than there being any cut-off points. 

It was only when improved naval technology allowed people to start conquering weaker people's that were a long way away without conquering any intermediate areas that we ended up with racism.  Such conquests correlated status with sharply defined racial differences and therefore racism began to flourish, if it was not simply invented. 

If you grew up in Times Square, then you would never have learned to rely on skin color or features, as visible as they may be, as an indicator of out-group, so you will be less likely to apply that as an adult. (UNLESS of course you live in a racially segregated bubble where for instance you see a lot of other races, but they are always just store vendors or delivery people or whatever, because of you living in an exclusive gated community in the middle of everything, etc.)

If everyone you have ever met has white skin and suddenly you meet someone with green skin then the only effect is: That's odd someone with green skin.  If a lot of people with green skin start appearing then it is no longer even odd, it is a matter of a shrug of the shoulders, green skin simply becomes a normal skin tone.  You have never developed the tendency to classify people by skin colour because no opportunity to develop it ever existed. 

Your exclusive gated community on the other hand is exactly how we get racism.  If all the people you meet that have green skin are found in subordinate roles then you develop a sense of racial identification in addition to a sense of racial superiority.  You start to think that white people are 'better' than green people (morally, intellectually, physically etc) and that is why your racial group are in charge. 

To get into game mechanics, in order to have racism we must first introduce a colonisation mechanic by which a conquered settlement is colonised by people from the core civilization.  As the settlement is normalised (it takes on normal positions and is converted into a liked settlement type) the settlers try and monopolise power, excluding members of the native population from having a shot at the new positions. 

If they suceed then the central government (the law-giver) has to decide whether to allow them to do this, that is exclude the key positions to members of their race.  If they are prevented from doing this then this hurts colonisation of the settlement while reducing racism points but if they are allowed to do this then the civilization gains racism points, which causes the whole civilization to suffer from racial conflicts as well as reducing the chance of leaders of other races coming to exist. 

If the natives are oppressed and there are still enough of them they may overthrow the settler's government, restoring the original government based upon the pattern of their former civilization. The central government may grant them autonomy, in which case they remain part of the civilization but internally function as part of their original entity and the civilization loses racism, or it can boot them out in which case they gain extra racism points and the settlement rejoins it's original civilization. 
Logged
Pages: 1 2 3 [4] 5 6 7