Monday 6 November 2006

Digital life and Evolution

A 4th year assignment I had where I had to make a 2D application

The title I was given Digital life and Evolution


Notes from my report:
  • Environment's design considerations
In this project, I had to consider the new design issues of working in 2D and keeping track of the items that would be drawn to the screen, also, where on the screen they should be placed and in relation to other items.
  • Methodology
The methodology for this work was primary one of experimentation. Over the weeks of this project it slowly evolved into its current stage.
  • Implementation
To implement this project, I first drew up a layout plan for how it should look and how the user would interact with the programme i.e. where hills would be drawn, how the courser would move, types of random patterns …etc.
When creating the growing plants, I used random number to influence the size and direction of them but I also needed to found where the next part of the plant should grow from. I got this by finding the midpoint of a line on the side it would grow from.
The stars that can be dropped in the sky are created by placing a dot where the courser is and randomly setting the brightness and speed of this rotation around the top centre of the screen. The change in brightness helps to create a feeling of depth.

The implementation for this work contained some key features:

I used separate files for each of the classes in other to make code navigation easier.
I created management class to better control the multiple instances of the class.
Array-list was added to allow for dynamic growth of the group of objects.
The key words “Height” and “Width” were used throughout the code to allow the graphics to adapt to changes in the setup size.
I added a screen help view (that can be selected by pressing the “h” button on the keyboard) to make navigate the environment more easily.

I also replaced the courser with a small floating rectangle which glows in a cycle and change size based on the speed of the mouse movement. This adds to help it amerce the user into the environment.
  • Screen shots
A view of the programme, when it first starts.
When the help screen is displayed.
The view after several star and plants, have been dropped.


... continue reading!