West Ranch High School

Skip to main content
Main Menu Toggle

Assignments

Upcoming Assignments RSS Feed

Due:

Platform Game Core
Use the instruction documents in Google Classroom to complete the Core Features of the Platform Game

Past Assignments

Due:

Pong Game Assignment (Enrichment): Add at least 5 unique enrichment features to your game. At least 3 of the enrichment features need to be a change in gameplay. Up to 2 of the enrichment features can be visual changes. Unique enrichments require different programming logic or design processes to count. In Google Classroom, complete the Pong Enrichment Proposal form with an implementation plan before you start your enrichments. Complete the implementation report section after you have finished. 15 points

Due:

Pong Game Assignment (Core): Create a version of the classic arcade game Pong. Core elements include moving ball, moving paddles, hitTestObject for bouncing ball off of paddles and walls, score keeping and display, restarting the game after goal, end game. (35 Points)

  • Create objects for the paddles and the ball. Be sure to give them unique instance names.
  • Moving the paddles: Use the Keyboard Control Code to move the paddles up and down
  • Bouncing off of the paddle: To make the ball change direction try this approach:
    • Create a variable called xDirection and assign it the value 1
      var xDirection=1;
    • Make the ball movement line use the xDirection variable
      ball.x += 5 * xDirection
    • When you hitTest the paddle, change xDirection to -1
  • Moving the ball on an angle requires change in the y value of the ball. Use the same approach as with x.
  • Bouncing off of the borders of the play area: This can be done by creating walls and using the same approach as the paddles. Top and bottom walls will change the yDirection. Left and right walls (behind the paddles) will change the xDirection.
  • Changing angle when bouncing off of the paddle
    • Reposition the reference point of the paddle to the center of the paddle
    • When you hitTest the paddle, compare the y coordinates of the ball and the paddle and modify the value of yDirection. The num value in the following code line will reduce the amount of angle created. Replace num with a value that creates an appropriate amount of bounce.
      yDirection=(ball.y-paddle.y)/num
  • Scores: You will need to variables to track the scores and two dynamic text boxes to display the score values.
  • Reset after score: Each time a point is scored, you will need to update the score and reset the location of the ball to an appropriate starting location. The ball can either start moving immediately or wait for a keypress to begin again.
  • EndGame: How many points are needed to win? Check the scores each frame to see if you have a winner. What is going to happen when the game ends?. The game should stop and you could display a message indicating the winner

Due:

"Find the Target" game: This game is similar to the "snake" type game but without the growing tail component. Modify the file from the Keyboard Control Exercise to add a "target" object that the controlled symbol has to hit. Include a text box to display a score. Start with 1000 points in the score box. Each frame, subtract a point from the score. Use hit testing to determine if the symbol has hit the target. When the hitTestObject occurs, add points to the displayed score. When the target is hit, move the target to a randomly selected location on the stage. Implement an end game for losing when you run out of points and winning at a specific point level. (20 points)
 
Notes on scorekeeping and endgame
  • Scorekeeping Variables- in order to keep track of information like a score, we need to create a variable to hold the data. The drag and match project created a variable called "hits" to do this. Look at that code as a reference. You can choose the name of your variable (score, points, etc.)
  • Display the score- Use a dynamic text box to display the score. Change the "anti-alias" setting for the text box to "Use Device Fonts". A line like scorebox.text = score placed in your ENTER_FRAME function will update the score every frame. (remember that the function called by ENTER_FRAME is your repeating loop that happens every frame)
  • Changing the score- score=score+10 is a line that will add 10 points to the score variable. It can also be written: score+=10score++ and score-- are shortcuts for adding or subtracting one from a variable. You need to determine the correct location in your code to change the score.
  • End Game- To end the game you need to test the value of score (or whatever you named it). This will use and "if" statement such as if(score <= 0) { } to determine if the value of score has dropped to zero (or less). Inside the braces, you can add code to display a message in a textbox. You can stop the game by removing the ENTER_FRAME event listener. Copy the addEventListener line for ENTER_FRAME and paste it inside the braces for your end game if statement. Change addEventListener to removeEventListener.

Due:

Game Review

Write a review of a game using the concepts in Costikyan's article. The game can be physical or digital. Describe the game. Address how and how well the game fulfills each of the components of Costikyan's definition of a game. Turn in the game review through Google Classroom.

Scoring Rubric

  • 5: All components discussed with insightful commentary on how and how well the components were met
  • 4: All components discussed with commentary on how and how well the components were met
  • 3: All components discussed with commentary on how or how well the components were met
  • 2: At least 3 components discussed
  • 1: Fewer than 3 components discussed

Due:

Due:

Hit Test Object Tutorial-Use the link below for instructions on making an object move on its own and detecting collisions with other objects. The images are not showing in the tutorial so use the following guidelines for the objects. The rectangle is positioned on the right side of the stage about 100 pixels wide and fill most of the height of the stage. The circle is positioned on the left side of the stage.

After completing the tutorial, fill out the worksheet in Google Classroom

 http://www.ilike2flash.com/2009/06/simple-hit-test-in-actionscript-3.html

Due:

Keyboard Control: Follow the tutorial linked below. When you finish part 1, follow the link at the bottom of the page for part 2 that will give you a better approach for Keyboard Control. We will use the part 2 approach for all keyboard related projects.

Keyboard Control Tutorial

Due:

Complete the "I Have No Words" Assignment in Google Classroom

Due:

Drag and Drop Tutorial: http://edutechwiki.unige.ch/en/Flash_drag_and_drop_tutorial

Complete through part 4: Drag and match learning application - dumb version. You can use whatever images you want in part 4. Pay attention to the textField use in part 3. When you have completed the tutorial, complete the worksheet in Google Classroom

Due:

Syllabus Verification Form - This form must be returned with parent signature. 20 points by due date. 15 points if late

Due:

Interactive Objects