T
thecolorthursday
Guest
I am trying to design a small game about flower breeding. I would have a set of gene variables, unique to each instance of a flower object, that would decide the shape and color of parts of the flower and transfer onto their children (with minor changes).
The gene variables are defined here, in the object flower_init after its creation:
instance_create(64, 64, flower);
lc = 0 //leaf colour
c = lc
l = 0 //leaf - leaves and stem
cc = l
b = 0 //bloom - center of flower
d = lc
bc = 0 //bloom colour
dd = lc
f = 0 //flower - flower petals and stuff
e = lc
fc = 0 //flower colour
ee = lc
instance_create(-5, -5, the_end);
instance_destroy();
Here is the flower object, where the variables are used:
depth = -420;
if lc == 0 {
lcl = $93e30a;
}
if lc == 1 {
lcl = $69e116;
}
if lc == 2 {
lcl = $2ece1b;
}
if lc == 3 {
lcl = $11b032;
}
if lc == 4 {
lcl = $138e4d;
}
if lc == 5 {
lcl = $138e89;
}
if lc == 6 {
lcl = $7c138e;
}
if lc == 7 {
lcl = $e32c1b;
}
if lc == 8 {
lcl = $e3a81b;
}
if lc == 9 {
lcl = $e0e31b;
}
if lc == 10 {
lcl = $b8ba62;
}
if lc == 11 {
lcl = $e0f0e5;
}
if lc == 12 {
lcl = $65786c;
}
if lc == 13 {
lcl = $111512;
}
if l == 0 {
leafshape = leaf0;
}
if l == 1 {
leafshape = leaf1;
}
if l == 2 {
leafshape = leaf2;
}
if l == 3 {
leafshape = leaf3;
}
if l == 4 {
leafshape = leaf4;
}
if l == 5 {
leafshape = leaf5;
}
if l == 6 {
leafshape = leaf6;
}
if l == 7 {
leafshape = leaf7;
}
if l == 8 {
leafshape = leaf8;
}
if l == 9 {
leafshape = leaf9;
}
draw_sprite_ext( leafshape, -1, self.x, self.y, 1, 1, 0, lcl, 1);
This is
The gene variables are defined here, in the object flower_init after its creation:
instance_create(64, 64, flower);
lc = 0 //leaf colour
c = lc
l = 0 //leaf - leaves and stem
cc = l
b = 0 //bloom - center of flower
d = lc
bc = 0 //bloom colour
dd = lc
f = 0 //flower - flower petals and stuff
e = lc
fc = 0 //flower colour
ee = lc
instance_create(-5, -5, the_end);
instance_destroy();
Here is the flower object, where the variables are used:
depth = -420;
if lc == 0 {
lcl = $93e30a;
}
if lc == 1 {
lcl = $69e116;
}
if lc == 2 {
lcl = $2ece1b;
}
if lc == 3 {
lcl = $11b032;
}
if lc == 4 {
lcl = $138e4d;
}
if lc == 5 {
lcl = $138e89;
}
if lc == 6 {
lcl = $7c138e;
}
if lc == 7 {
lcl = $e32c1b;
}
if lc == 8 {
lcl = $e3a81b;
}
if lc == 9 {
lcl = $e0e31b;
}
if lc == 10 {
lcl = $b8ba62;
}
if lc == 11 {
lcl = $e0f0e5;
}
if lc == 12 {
lcl = $65786c;
}
if lc == 13 {
lcl = $111512;
}
if l == 0 {
leafshape = leaf0;
}
if l == 1 {
leafshape = leaf1;
}
if l == 2 {
leafshape = leaf2;
}
if l == 3 {
leafshape = leaf3;
}
if l == 4 {
leafshape = leaf4;
}
if l == 5 {
leafshape = leaf5;
}
if l == 6 {
leafshape = leaf6;
}
if l == 7 {
leafshape = leaf7;
}
if l == 8 {
leafshape = leaf8;
}
if l == 9 {
leafshape = leaf9;
}
draw_sprite_ext( leafshape, -1, self.x, self.y, 1, 1, 0, lcl, 1);
This is