Sunday 27 April 2014

Status Update III

It is with great pleasure that I officially declare the project complete! The final version is 5.7, a whole 15 variations up from the previous 4.2 status update! The in-between frames of her turning are now fully complete, her legs no longer disappear, making a smooth transition from standing still to the walking pose.


I have also implemented the code that enables the parallax to play once the character is within 25% of either side of the stage, which proved a lot easier than I initially anticipated! I used a similar code to the code that stops the parallax when she reaches the ends of the stage, but using co-ordinates, rather than physical objects.


The animations for JP's interactions are also complete, and play correctly when the Space bar is pressed in front of the plane, or the down key to start the fire! The fire plays a loop of frames once it has started, which continue on playing until the swf is restarted. The plane starts once JP reaches a certain frame of animation in front of the plane, as does the fire start, when she reaches a certain frame in that animation.



Overall, I am happy with how the project turned out. I learned the basics of Flash coding, and had some fun figuring out how to make use of the codes! One thing I would like to learn next is the implementing of sounds, I feel these would really bring the project to life. A theme in the background, the sound of the plane starting and failing, and of the footsteps in the sand would be the next thing to improve the project.

Here is the final .swf of the project :

https://www.dropbox.com/s/paa7ztq39n8pcvx/brendan_Walsh_Parallax_Scrolling_V5_7_final.swf

Sunday 6 April 2014

Status Update II

Since the first post, I have added in a lot more features into the flash project. I am up to version 4.2 now. Since the last update, I have added in a "hitTestObject" code that stops the character from walking too far to the left, or to the right. It took some brainstorming to come up with a method of doing so, and in the end, I used an if statement that tested if "hitobjectleft" was true or not. If it was false, the character is able to move in the left direction. If it was true, the character would stop, and revert to the standing forwards frame. I used the same code to stop the character, JP, going too far to the right.


The "hitTestObject" on the left was a Petrol Can.

I have also begun work on creating the extra animations for the character, such as jumping, turning, and the interactive object animations. The Jump animation is fully done, and is activated by pressing the "up" arrow key, which then cycles through the frames up the jump. I am considering adding in a small parallax upwards scroll to compliment the jump, but i'm not sure if it will work, or if I will just leave it as it is at the moment.


The key framing for the turn animation is still in progress.

Also since the last update, I have added in the first interactive event, which is the spinning up of the plane's propeller. This is activated, one time, once JP touches off the side of the plane. I drew out some frames of the propeller spinning, and then exploding off, and landing on the other side of the background, which stays there until the swf is restarted. I have yet to create the animation of JP starting the propeller spinning, which is what my next task is. The other interactive object I have in mind is the starting of the campfire that is seen on the foreground layer.

The Plane before JP interacts with it.

The Propeller spinning upon interaction with it.

By the end of the week I hope to have also implemented the ability to walk around the center 50% of the stage, and have the parallax begin on the right and left 25% of the stage. After this is done, the remaining things I have left to do on the project should just be the animation of events, and turning.

Here is a .swf of the project as it is at the moment:

https://www.dropbox.com/s/bgrnrx05fccyclb/brendan_Walsh_Parallax_Scrolling_V4_2.swf



Sunday 23 March 2014

Adventures in Egypt

As part of the second semester at College, we were assigned to create a character with a walk cycle, and have a Flash program that controls the character's movement, through the medium of Parallax scrolling, to give the impression that the character is moving in a three-dimensional space.


I began my Parallax scrolling project by importing each of my assets into the library of the project in Flash, and then saving it. These were the Background, and the character, JP. Next, I adjusted the position of each object on the stage, and distributed them to layers. I also added in a stage guide to help me, outlining the viewing area of the finished project. The next step was converting each object into an ActionScript class, and giving them all instance names. After this, I began to work on the code itself. I used many "if" statements and "keyboard Event Handlers" to move the stage left and right when the arrow keys are pressed. It is only very basic at the moment, though, I will need to add in the ability to walk around the center area of the stage until it reaches the 25% of either side, and then have the parallax scrolling begin.

This is my character:




 I also need to add in code that plays certain frames of the character itself, such as the turning, standing still, walking, etc. At the moment, it is playing through each of the frames of the character, which only looks okay when walking to the right. I have the basic code down now, so I can get to proper work during the week, and code in the bigger details.



The Environment:



My Character is named "J.P Lanners", and she is an 
explorer. I plan for her interactive objects to be the plane, as can be seen in the above picture, and a camp fire. She will be able to start the propeller of the Bi-Plane, and light the campfire. The tent on the right will be an object that can stop her from going too far that direction, and the plane will stop her from travelling too far left. Of course, these objects will be pushed out much further than the above picture, I just brought them together for the sake of the picture.


Here she is, in the environment: