Assignment: Although you should have some assets completed this week, your complete project 3 asset library is due next week. This consists of images, audio files, video clips.....anything you will need to begin the final project development. Note: You should begin working on the basic interactive elements of your game. Break down the functionality of your project into manageable bits and begin working on them. Although no interactivity is due for the project next week...waiting till the last minute to start scripting is a VERY bad idea.
Lab Description:
Learning and applying ActionScript to create games (even simple ones) can be a daunting and difficult process. When asked to create a game...students often state that they don't feel comfortable enough with the nuances of ActionScript to be building a complex application. This lab exercise is designed to give students exposure to ActionScripted game concepts (collision detection, scripted motion, etc...) without having to create an entire game.
The purpose of this lab is to be able to deconstruct and repair the ActionScript for two Flash games (one in AS 2.0, one in 3.0). By doing so, it is hoped you will become more experienced with the finer points of ActionScripting for games without having to create a game from scratch. As we proceed through the weeks, we will be creating simple gaming components that utlize many gaming concepts.
Note: When submitting, put all the lab files in a single folder named LastName_FirstInitial_Lab12
External Scripting and Debug Walkthough:
Using space rocks, we will walk through some of the general strategies for debugging applications, in addition to explaining how external scripting works in a simple manner.
Debugging tips:
trace(), use it often. No. More often than that. A lot of often.
comment out lines of code until you find the problem
Follow the logic closely ( start at the beginning, and work through each line of code to make sure its doing what it is supposed to be doing )
External Scripting:
A cleaner way to write code
Most advanced actionscript is done in this fashion
Is classed-based
Importing is essential
Remember to extend MovieClip for visual objects
Also remember to set linkage or base class in the libary/properties panels
Open the file and repair the ActionScript. You will note the comments have been removed, which should force you to figure out the code in order to make the necessary repairs. Once the game is fully repaired, it should play like the example below.
Note, make SURE you have located all errors. HInt: Look closely at the ball hitting the blocks.
Once finished, submit the file to the G drive for grading. Submit the .fla....NOT an .swf file.
Remember: Wait until you have completed the entire lab so that you may put all the lab files in a single folder named LastName_FirstInitial_Lab12
Rename the .fla file Lastname_Firstname_PaddleBall.fla.
Open both files and repair the ActionScript. Once again, the comments have been removed.
Comment your fixes.
Note, make SURE you have located all errors.
Once finished, submit the files to the G drive for grading. Note: Submit the .fla and .as file....NOT an .swf file.
Remember: Wait until you have completed the entire lab so that you may put all the lab files in a single folder named LastName_FirstInitial_Lab12
ActionScript 3.0: Space Rocks (a.k.a. Asteroids)
Although we haven't yet reviewed the SpaceRocks game as we did the Breakout game...you should be familiar enough with ActionScript 3.0 to make corrections to this simple application.
Deconstruct the ActionScript and make the appropriate corrections. The working game should function as the game below does.
When finished, rename the .fla file Lastname_Firstname_SpaceRocks.fla (do not rename the .as file) Submit both the .fla file and the .as file to the G drive for grading.
For questions or comments concerning the course or web site contact Ronald J. Glotzbach.