Joe's Website



C/C++ Programs (Windows only)




EcoBalance
Download EcoBalance.zip

I wrote this game as I was learning C. It began as an experiment to try and randomly generate a world, and from there grew into my first attempt at using allegro (www.allegro.cc). The objective is to balance the worlds landscape, by destroying and building trees, water, goblins and elves. This also includes unfinished random name generation.

ecobalance game screenshot




Offspring Game

Download offspring game .zip

This game was written in response to the Experimental Gameplay Project (www.experimentalgameplay.com), however I did not get the chance to enter it. It is a very simple game, in which you are a fox that must eat all the rabbits. However the rabbits breed like rabbits.

offspring game screenshot




Music Generator

Download music generator .zip

This is my first (and probably last) attempt at creating a music generator. Unfortunately I dont know how to decode a midi file, so I was forced to convert some music to notepad form by hand. In this form, each note was represented by its letter (no sharps or flats), followed by a number to dictate how many half beats long the note is. When the program is run, it asks you to input the names of as many text files as you want (including the .txt extension). The program then counts the probabilities of each combination for 4 notes of different lengths coming up, and uses that to generate the music. The output is in the notepad form, which can then be played by the music player included in the download.
All the music is in 4:4, C, and contians only one octave.

musicgen screenshot




Genetic Algorithms

Download evolution .zip

This download contians two programs, both created using genetic algorithms, which use natural selection to solve problems. I first heard about Genetic Algorithms on www.ai-junkie.com, which has a good tutorial on them. Essentialy, you would code a number of mathematical expression, for example 9+12, as binary strings. Then the string that is closest to the solution is "fittest", and shares some of its binary string with the other strings. I wrote two of my own. The first takes an input, and then finds two numbers that add together to give the input. The scond program attempts to approximate PI as a fraction, with an 8 digit numerator, and 8 digit denominator. This program does no simplification of the fractions, so they will (probably) not be in their simplest form.

geneticone screenshot




Gravity

Download Gravity 3D .zip

This is my first attempt at coding a physical law (gravity) into a program. I also managed to make it 3D, which I coded from scratch. I used allegro (www.allegro.cc) to draw everything very simply (everything is proceduraly drawn). Left click and drag on an object to give it some momentum, right click at the top or the bottom of the screen to give it up and down momentum. The arrow keys move the camera. This was also my first program written entirely in C++.

gravity screenshot




Evolution

Download evolution .zip

This is a continuation from the Genetic Algorithms above. I wanted to see if I could make creatures evolve over time. I coded all the information about the creatures into a binary string, and manipulated that randomly when they mated. To create evolutionary pressures I split the creatures into herbivours and carnivours, and grass that replenishes. The blue C's are herbivours, red C's are carnivours, and the lighter the ground is the more grass is there. The populations (along with a few other statistics) are outputed into a .txt file in a format that can be copied into matlab. This became more about a study of population dynamics than evolution, as only a couple of the attributes seemed to be affected by the world.

geneticcreature screenshot





Phone: 07968718815
Email: joe@eyles.co.uk


Link to art page

Back to Eyles Website home page