Showing posts with label web application. Show all posts
Showing posts with label web application. Show all posts

Tuesday, December 19, 2006

Evaluation of Elephant Game

Problems with Code

For this project, my biggest problem with the coding was with Miss-labelled instances not matching up to the original code. In my game there's about 14 interactive instances which rely heavily on all the code matching the specific names of the instances. As my instances had quite long names; such as 'ellysnorkel_pic' for Purpo's snorkel, it came frustrating when I'd misspelled a single instance, I would have to search for the mistake through a lot of lines of code. Given the chance to do the project again, i would've simplified the names of these instances to reduce the chance of me making a typographic error. Also, I replaced code that requires you to monotonously repeat yourself (which would increase the chance of human error) like this:


function myPlay() {
_root.ellypic_pic.replay(_root.myindex);
_root.ellymuffs_pic.replay(_root.myindex);
_root.ellyphone_pic.replay(_root.myindex);
_root.ellybling_pic.replay(_root.myindex);
_root.ellybrolly_pic.replay(_root.myindex);
_root.ellyglasses_pic.replay(_root.myindex);
_root.ellyhat_pic.replay(_root.myindex);
_root.ellyscarf_pic.replay(_root.myindex);
_root.plane_pic.replay(_root.myindex);
_root.sun_pic.replay(_root.myindex);
_root.ellysnorkel_pic.replay(_root.myindex);
_root.myindex++;

if

(_root.myindex>=_root.ellypic_pic.no_pos() && _root.myindex>=_root.ellyscarf_pic.no_pos()
&& _root.myindex>=_root.ellymuffs_pic.no_pos()&&

etc...


with more simplified code like this:


function myPlay()
{
var finished:Boolean = true;

for (myObject in _root.positionObjects)

{
if (_root.positionObjects[myObject].replay(_root.myindex))
finished=false;
}

if (finished)
{
clearInterval(_root.myinterval);
}

else
{
_root.myindex=_root.myindex+1;
}
}

Problems with Design

My initial problems with designing Purpo elephant and his inventory stemmed from the fact that I hadn't really used Macromedia Flash before, and i found it difficult to draw anything realistic with the drawing tools included. I settled on the idea of making this game look very "cartoony" and simple, afterall, It is a game for kids, so it isn't really something that held the project back.
I based Purpo on another cartoon elephant by Jerry Cogan (which can be found at here). This gave me the basic shape for Purpo, and also gave me a guideline to the sizes I could use for his inventory of items.

Tuesday, December 12, 2006

Design Process and Evaluation of Purpo the Elephants Animation

Initial Ideas

My first idea was to have a series of animations attached to the objects in the inventory which would play when the elephant had said object placed on it. For example, should you place the umbrella on the elephant and press play, the program would play an animation of the umbrella protecting the elephant from rain. However, this wouldn’t have fulfilled the objective unless the animation played from the point it was placed, showing an example of storing information with action script.
The first step of my project was to design the basic components and apply action script code so that I could freely move the objects around the screen. I found a few good examples of this kind of Flash Movie on www.newgrounds.com such as the comedy game ‘Dress Osama’ (www.newgrounds.com/portal/view/38204) in which you can freely move around objects. I found this example game helpful because it shows good use of the simple click and drag function. I set about creating my elephant cartoon along with an inventory of items that the user would be able to append to the elephant. These are the items I designed:


Photobucket - Video and Image Hosting


After designing these on Macromedia Flash, I converted each of these pictures into ‘Move Clips’ and applied the following code to them in Action Script:


on(press) {
this.startDrag();
}
on(release) {
this.motion_x.push(_x)
this.motion_y.push(_y)
this.stopDrag();
}

This code allowed me to click on the items and drag them about the screen, making it free to create a number of ‘images’ for “Purpo the elephant”, for example:

This Picture shows “Purpo” along with the “Elly glasses”, “Elly bling”, “Elly phone and “Elly hat”. After creating an appropriately simple background on the stage on which this simple game can be implemented, I still needed to create a start screen which would explain the rules and then proceed to the main game page. I also needed to implement a code which would let the end user freely animate the objects in the inventory.
Photobucket - Video and Image Hosting


The “start screen” I created simply explains the rules in a fun way. I used the Kristen font (in Bold) for all the text in the game because it’s clear and easy to read, but also because it’s a fun text to look at, and the games target audience is primarily young children.

Thursday, December 07, 2006

Web Application

After many attempts at drawing a cartoon elephant, I'm finally happy with the one i've got. I currently have a purple elephant, an inventory of about 8 items, and a couple of backgrounds. I've programmed it so that all the items (including the elephant), except the backgrounds, can be moved freely around the page.

Here's the elephant:




Here's an example of the elephant with inventory items



In this picture, purpo the elephant is modelling the "elly phone", the "elly hat", some wonderful "elly bling" and the "elly shades".