• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

How to code breeding in game

W

WinterNexus

Guest
I am wanting to make a web browser breeding game, or at least a game with breeding mechanics. A example of the type of game I want to create would be lioden.

Basicly each character can have up to 10 markings in slots 1-10. There will be a list of markings made but each character can only have 1 type of marking per slot.

For this the Mother will be labled M and The father F.

M has White Spots in Slot 1 at 10%

F has Black Legs in Slot 1 at 80%

I breed M & F together. (Please note the % refers to the opacity of said marking).

The offspring will first roll between 1-4 generated offspring. Then the # of offsprig will have markings generated from there parents. To make this simpler M & F only have Slot 1 markings making slots 2-10 empty.

I want a algrathim that says either White Spots, Black Legs, or No Marking will apper in slot 1 when the two are bred together.

If a Marking (In this case White Spots or Black Legs) passes to the offspring the opacity will be between 1-100%. (Though I think thats how it works in the game). The new offspring now has one if the two markings in slot 1 (or no marking at all).

Another example of the breeding I am looking for is say both the M & F have White Spots in slot 1 then the offspring born will be more likley to have White Spots rather than no marking at all. Making the precentage of having a marking higher than no marking at all.

I hope this makes sense I can explan further if need be or mention other games that run similarly. I am new to programing so any information is appreciated. Thank you!
 
Top