Creature layout

The creature’s model has been redesigned to it a bit more interesting (hopefully) and also to make the physics behind its movement a bit more realistic.

The way it was before, with the creature jumping in the way that it did, the effect was as if the creature had been hit from below (a single upward impulse was applied to its body).

c1c2

some of the earlier designs

We can see that the creature is basically made out of circles, and on the first example there is also a trapezoid at the bottom. This trapezoid is much more dense than the other parts of the creature’s body and its purpose is to make the creature stand up like a tumbler toy.

Inspired by an idea given in the section Other Methods of the chapter Jumping on the iforce2d web tutorial (link), I decided to give the creature a hip connected to its main part and two feet connected to the hip.

nc1

new design

This way I was able to make it jump by stretching its legs really fast so that the ground’s resistance would cause the creature to be propelled into the air.

The reason it has two feet instead of one single platform is that in this way different stretching speeds can be applied to each leg, so that the creature can jump to the sides, and not only straight upwards.

The problem with having the creature jumping sideways is that it will easily fall over and not be able to jump properly any more. Here is where the function of the hip comes in. The hip is pinned to the main part (the big circle) and can rotate a limited amount of degrees in relation to it. By locking the rotation of the main part I was able to prevent the creature from falling while still preserving its ability to jump to the sides.

nc2

maximum rotation of the hip
(the creature doesn’t fall)  

Selecting multiple creatures and allowing mutation

The current version of the game allows the player to select more than one creature to be the parent of the next generation. The player also has the possibility of picking two creatures to mate, so that their offspring’s jumps will be determined by the Dna resulting from the crossover between both parents’ Dna.

These additions were accomplished through the implementation of and interface allowing the user to drag boxes containing the selected creature’s number to a panel on the right. If the user drags a box on top of another box already selected they will combine signalling that both selected creatures will mate when the next generation is created.

Screen Shot 2013-02-07 at 23.09.20

The player should still switch between creatures by using the number keys and create the new generation by pressing Enter.

Another addition to the current version is that the game now responds with a message congratulating the player in case some creature touches the rotating blue square.

This version still needs to have some bugs fixed, but it will be posted here soon.