[Code] Breeding system + Color application

Being

Game Owner
Hey gang!

In my game, I'm hoping to have Mendelian type genetics (recessive alleles ect) that stretch back to the grandparents of the lineage and also include the potential for species specific mutations and hybrids.

I would like some code that automatically colors the species bases with a set palette, to make creating markings one newer species easier and faster. Like what Flight Rising has?

If anyone has knowledge on how to do either of these things, please post below! It would be great if you can include an estimate for how much this might cost and if you have any active examples of your systems working (IE: already published in a game) to share for me to have a squint at.

Thank you!

 
I believe @Hare has done something similar with her site. She might be able to give you an idea of how it works (or how she did it).

 
I'm happy to walk you through the concepts if you'd like. I have a system that does what you're looking for in my Pet Game Framework.

 
We have this on leporidae.org. I use PHP with Imagemagick and and a MySQL database. Feel free to message me if you need any info on how to implement it. 

When breeding, we get alleles from each parent and give 50/50 chance for offspring to inherit them.

For mutations, maybe add a random chance to mutate.

For displaying the color, we have an include file that orders alleles by dominance, that's where it determines expression. 

Imagemagick is easy to wrk with, so you do something like:

if (A gene expresses as black)

{

change the base layer to black

}

 
Last edited by a moderator:
Back
Top