søndag 25. oktober 2009

Case 6 – Making the World


Case 6 - Designing the world by ~SveinE89 on deviantART

In this case we were supposed to design our backgrounds and other characters in the game. The storyline and contents of the game were also to be defined.

I’m going to start my game with a small intro, showing a person working on his PC and then suddenly it gets infected by a monster-virus. His only hope is Nortrom MacFree, the antivirus-man. You will be controlling the hero inside the computer, where he is faced with a lot of dangers. I’m thinking of having two types of enemies; Virus (a green, yucky, annoying creature that will be following our hero around) and Trojan Horses (a more mechanic creature patrolling a given path).

Throughout the level our hero will be collecting energy-orbs. These orbs will be used at the end when he reaches “the mother-virus”. He will use the orbs to charge his virus-demolishing-gun. This sequence I’m going to make as an animation, like the intro.

I created a background that looks like the insides of a computer, well a broken computer that is. This virus infection was so powerful that the computer actually got damaged physically. When I’m going to implement this background into the game, the hero will always be centered and the “camera” will follow him when he moves back and forth, moving the background accordingly. I’ve also designed a couple of platforms/grounds that I’m going to use in the game.

Picture of the entire background below:

mandag 19. oktober 2009

Case 5 - Jump and fall


Case 5 - Jump and ground by ~SveinE89 on deviantART

In this week's case our objective would be to create a jumping motion, and a ground that the character wouldn't fall straight through.

In the previous case I had already created a jumping function, using a guide i found at www.mrsunstudios.com, but now I had to look at it from another point of view. In this case we had to implement gravity to our character. And as most of us know, gravity is a force that pulls us down. In the actionscript-world, that meant that I had to move the character down, along the y-axis, every frame. So when I told the character to move up with my jump-function, the gravity then pulls him down again.

And as in real life, if there weren't any kind of ground below us, we would just keep on falling. In our group meeting on Monday, we were also introduced to the while-loops. I used this in the function that happens every frame, and used the hitTestPoint option to check if the character was hitting the ground I made. So whenever the character hit the ground, it was pushed up. With that while-loop and the gravity working together, the character could move around the ground without falling through.

torsdag 8. oktober 2009

Case 4 - Pushing the keys


Nortrom MacFree left and right by ~SveinE89 on deviantART

In this week’s case our task was to move our character to the left and right, much like our last case, but this time using the keyboard. And when the character is not moving (when you aren’t using the keyboard) he should be in his idle position.

As mentioned this was kind of similar to our last case, but with a few new challenges, such as learning about keyboard events in ActionScript. I decided to start on a new script instead of continuing on the one from case 3. The reason is that you learn a lot more if you physically write in the new script, in comparison to just copy-pasting or editing something that you’ve written earlier or someone else has written.

I used the Learning ActionScript 3.0 book, found tutorials on the web, and got help from classmates to solve this case. After a while, when I managed to move the character and change the animation, I tried to find out how to make him jump. I managed to make him jump, but had some trouble with the animation so I decided to put that on ice for a while.

Finally I added a background to make the whole thing a bit more alive(This is not the final background Im going to use in the game).