Tuesday, September 4, 2007

Project 2 Finished!

Side Scrolling

Final .swf

With the 11th hour fast approaching, I went and saw Dan for advice on how to fix the hit test issue. Dan worked out that the problem was the code I had written simply told the main movie clip to go to the hit movie clip, and as a result, for as long as the hit test was true, the main movie was continuously being redirected to the start of this hit movie clip, rather than being directed to it once, and then have it play. Dan showed me how to fix this by setting up a counter which, when the hit test was triggered, would start increasing until it reached 40 (the length of the hit movie clip) and the revert back to zero, and this counter was used to directly cycle through the frames of the hit movie clip when activated. Simple eh? I then made it so this would only happen if the duck key was not being pressed, a little bit more tweaking to do with the area of the hit test (so it is only activated when the block comes in contact with the monkeys head, rather than the start of the monkeys movie clip, which is back by his tail) and it worked almost perfectly (if the monkey is walking backwards when he gets hit there are issues, but i didn't really have time left to fix this)

I also added a basic preloader as i noticed the size was getting pretty big, and when the .swf loaded in the browser, it do so a layer at a time, which looked pretty awful.

Apart from a few changes not really worth mentioning that pretty much wraps up this environment. I'm really happy with how it worked out. It would of been cool to add some sound effects like footsteps and impact noises but time didnt allow it.

Isometric Environment

Final.swf

The isometric environment was a bit of a mixed bag to be honest, after not reading the brief properly initially (My own fault) and as a result only starting it about half way through the assignment, and then with less than a week to go working out that my current approach was pretty unfeasible, and having to basically start from scratch, this environment didn't get as much time as the side scrolling, isn't nearly as polished. I still couldn't get the character walk animation to stop playing once the key is no longer being pressed, and the scrolling isn't perfect. Although i feel I have managed to modify it pretty heavily form the original tutorial i based it on.

Overall I really enjoyed this assignment though, and learned heaps.

No comments: