Monday, December 3, 2018

a whole bunch of genetic nonsense

as someone who is completely obsessed with programming, of course i'm going to talk about the things i'm doing as i do them. here are the features i've added between the initial release and the creation of this blog:

-grassy floor
-unicorns, pegasi, and alicorns
-fear of alicorns
-basic variations in a fluffy's willingness to do deplorable shit
-reactions to a lot more than what fluffies reacted to in the original release
-completely new way of handling things that splatter on the floor, vastly increasing performance
-slight tweaks to ambient mood

right now, i'm giving fluffies genetics. in the current release, although fluffies can breed, appearances are completely random and in no way determined by the parents. that's going to change soon.


these five genes are the only ones that matter in the current setup, so they're the only ones i'm going to handle for now. they're all pretty standard...

alicorn genes, you ask? oh fuck, now it's headcanon time.

there's got to be some reason why alicorns are so rare. they probably would have been created anyway if fluffies had been completed, but this recessive version of the alicorn gene is a mutation, one that's usually fatal for both mother and child. when it expresses itself in what would have been a pegasus with a recessive unicorn gene, instead of a deformed blob, the result is an alicorn because genetics.

in terms of game stuff, the only stuff that matters, fluffies pregnant with a non-alicorn expressing this gene will die giving birth unless the foals are surgically removed.

now that that's out of the way, it's time to program this stuff in. right now, the fluffy script sets its appearance randomly, which is not how genetics work so instead, i'm going to make it set its appearance based on dominant genes. the integer values, such as the race gene, determine dominance through the smaller number. meanwhile, genes such as colors determine dominance through which number is closer to average, 128 in this case.

upon completion, my code is... less of a fucking monstrosity than i expected, but still pretty terrifying. along the way, i added expressed color values to the script that holds most fluffy variables, because those weren't there before. cutie marks are still completely random for reasons that would get my entire fluffyverse discredited if i revealed them right now.

but then that didn't work, so i had to reprogram the entire thing. after some more bullshit shenanigans involving giving each gene its own function to set it, my code works, and fluffies express genes for the first time ever. but right now, nothing is giving them any genes to express, so they all just kinda look like this.


spooky. now we need to add random genes back in. that can't go in the fluffy script itself, because the fluffies need to be able to have inherited genes inserted into them later, so instead, i'll put it in the "space to spawn fluffy" section of the script that handles player controls. after approximately one hour of senseless bullshit that's probably at least partially from how sleep-deprived i am right now...


hell yeah. the genes won't get passed down when they breed, and in fact, i know the code well enough to know that i'll just end up with more black ghost fluffies that will immediately glitch out of existence because of a tweak i made if i try to do any breeding during this time, but it's a start. inheritance is another story for another day. probably tomorrow.

1 comment:

  1. Fuck yes, I've been waiting for this for too long!

    ReplyDelete