1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

How to code breeding in game

Discussion in 'Game Design, Development And Publishing' started by WinterNexus, Aug 9, 2019.

  1. WinterNexus

    WinterNexus Member

    Aug 9, 2019
    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!

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice