Page 2 of 2

Re: Question on breeding script

Posted: Thu Apr 08, 2010 10:58 pm
by Xen
Do you know what? I was thinking of that very same method just today and wondered whether it would be possible. And you have just answered it.
I'm going to keep things fairly small until I have more of an understanding of programming in general, it's very easy to want it all right now, but I have learn't to be patient, keep it simple and start small. I guess if and when I decided to expand, I could and should by then have the knowledge to do it a more efficient way if needed.
I think this will be my next challenge -puts on gladiator helmet-. Will let you know how I get on....if I don't survive my life savings are in the white teddy on top of my wardrobe!
Thanks for all your invaluable advice and willingness to help - you guys rock :D

Re: Question on breeding script

Posted: Thu Apr 08, 2010 11:12 pm
by Jackolantern
Glad to help out :)

It is definitely a good, simple method to stand-in for the image displaying until a later time when you may want to expand the game and swap it out with a more professional solution. And in the meantime, it doesn't require a ton of code that would be difficult to track down when/if you do decide to change the method later :)

Re: Question on breeding script

Posted: Thu Apr 08, 2010 11:27 pm
by Xen
Very true.
I shall give it a whirl and post some pics/code if and when I conquer it! No when I conquer it :mrgreen:

Re: Question on breeding script

Posted: Fri Apr 09, 2010 1:22 am
by Torniquet
@jack

you dont need to worry about window resizing with absolute divs if they are embeded inside a relative positioned div, as all the absolution points work from the sides of the relative div..

Code: Select all

<div style="position:relative">
  <div style="position:absolute; left:0px; top:0px;">
  </div>
</div>
that will position the absolute div from the top left corner of the relative div rather than the window. So even if the window is resized it will remain referenced from the relative div rather than being in wierd ass places.

just a fyi if anyone wansnt aware of this :)

Re: Question on breeding script

Posted: Fri Apr 09, 2010 3:52 am
by Jackolantern
Aren't there still problems with absolute positions on mobile devices and limited dimensions displays?

EDIT: Also, and this appears to be the greater fear with AP objects, there could be browser differences. While it doesn't really matter if it is a couple of pixels different for most page layouts, it could cause strange results when trying to fit a piece of armor pixel-perfect to a character.

I don't know. It could be worth trying out, but you would need to make sure to have a battalion of browsers to check it out in. I know there is some tool that basically allows you to install multiple versions of IE as well so you can test on IE6 and IE7, which would really be required if you use AP divs and want to support older versions of IE.

Re: Question on breeding script

Posted: Wed Apr 14, 2010 8:06 am
by Age of Fable
A system based on the actual laws of genetics (recessive and dominant traits, some characteristics are government by multiple genes etc) would be interesting, and you might be able to sell it to schools.

Re: Question on breeding script

Posted: Thu Apr 15, 2010 12:31 am
by Xen
Age of Fable wrote:A system based on the actual laws of genetics (recessive and dominant traits, some characteristics are government by multiple genes etc) would be interesting, and you might be able to sell it to schools.
Good idea, although I am dealing with fantasy here, so instead of greys, browns and blacks, I have greens, purples, reds and blues! Not sure schools would go for that :lol: Plus it makes it tricky when trying to use "real" genetics due to the base colouring - although it would be possible. I am working on the idea of dominant and recessive genes anyway, something along these lines.

The dilution gene is responsible for lightening the Equids coat colour or mane and tail colour. For example;

D+ stallion & D+ mare = D+ foal, 100% chance of dilution.
D+ stallion & D- mare = D+ or D- foal, 50% chance of dilution.
D- stallion & D- mare = D- foal, 0% chance of dilution.
The dilution gene will be inherited as a recessive gene so if you breed two D+ Equids they'll have a double setup of the D gene and therefore you're guaranteed a D+ foal. If you breed one D+ to a D- you will have a 50% of the foal being a D carrier. These will look normal but can pass on the gene to their offspring if bred to a D+ or a D carrier.


I haven't yet scratched the surface of genetics, but having studied it as part of my degree, I'm pretty much aware of how complex it can be and for now, I think it would be best from a coding point of view to keep it simple, until I have more knowledge or find a coder that knows his beans about this type of thing.