Monday, 8 July 2019

Genetics Development - Day 7 - Genes to Family, Family to Variants than Variants to Game

This was my brilliant plan to fix the fly rendering in Minecraft from where we left it in day 6. I am essentially trying to assign the fly, upon birth, or spawn, a 'family' for each trait they have, and then use the family data each has to explicitly assign the variant and mark_variant flags that allow Minecraft to render the correct model and texture.

Only thing wrong with my brilliant plan, it doesn't work... yet... I can feel the solution is very close, there is something wrong in the way I have coded it causing it not to work, I am pretty sure the theory is correct. However I am stuck in a 'loop' of the genetics assigning only one 'birth event' and that birth event is the sex. Which assigns the correct family (which is nowhere 'in' the entity in external editors that I can find) and it gets the first layer of component groups, but this will not translate across into the second layer, and assign the variant and mark variant as expected.

I have spent a few hours looking carefully at the data the flies have in-game, and what I expect them to have, and it just doesn't align for some reason. So, I am going to try swapping the 'is family' test point for 'has component' and see if that changes things. If it doesn't work, it is because Minecraft doesn't support this 'double dip' through data and I will need to go back to the drawing board and test one of the other solutions from the previous post.

(some weeks later)

After swapping the 'is family' test for 'has component' there is no difference, however, what is interesting is the flies always get their sex component added, but never the other traits. I feel like I am very close, because it does seem to loop the data I want in, for only half of it, so now to try and work out why!!!

After a few (more) weeks of trying to nut this out, I am pretty sure I cannot get Minecraft to 'collate' multiple 'chromosomes' into the one birth event. At least I think that is the issue. It appears that it works in 'sequence' until it finds a birth event whose requirements are met, and then it stops looking at the other genetics.

It is really quite odd, because the entities 'get' the right chromosomes/genetics/alleles applied to them, but only get the 'tag' of the first birth event. Which means I can then not 'give them other tags' and render them appropriately based on their different genetics.

So, this leads me to be thinking about what it is I actually want to achieve. While having a completely mapped genetic inheritance pattern on the one entity is a really, really cool 'technical challenge' for me, is it really required to do the educational activities I want to do?

The simple answer is, no it certainly is not. If I can have as many custom entities as I want, then I can have different entities for each genetic trait we want to explore. This is 'normal' operating procedure in labs all over the world, they know exactly what genotype their breedstock is, and use the appropriate ones for the testing they want to do.

So why should I make Minecraft the exception? I am thinking that I should have multiple different 'fly types' and set up specific inheritance tests for students to explore. Again, this is normal, and supports students in understanding the inheritance pattern we want them to grasp, without causing undue confusion with multiple inheritance patterns impacting on the results. If we can give students specific genetic traits to explore, and interpret, then I am most certainly achieving the educational goals of this project, if not my own, possibly silly, technical goal of having a (mostly) 'true to life' genetic inheritance pattern all in the one entity.

So, there you have it, I have been mulling over this for ages, and thank you for your patience while I have been absent. I will have more to share on the 'why' I have been a bit quieter of late soon, but know that I am still here, working in the background. Thanks, as always, for reading, and if you have any comments, please feel free to leave them below or touch base on twitter @EduElfie.

No comments:

Post a Comment