Digital Game Design Fall 2018-Period 4 Assignments

Upcoming Assignments RSS Feed

No upcoming assignments.

Past Assignments

Due:

Assignment

Writing Task: Marketing is a critical part of gaining popularity for a new video game. A well written press release will help to get your game into the media. Write a press release for your Pong, Platformer, or Tower Defense game that could be sent to videogame websites for potential promotion. The press release needs to include descriptions of your enrichment features that make your game unique. Details such as company name, pricing, and contact information can be fictitious. Details about the game itself must be accurate. (Assessment Rubric)
Review the following links for templates and examples of game press releases

 Submit the completed Press Release in Google Classroom

Common Core Writing Standards addressed in this assignment

2 Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes.
a. Introduce a topic and organize ideas, concepts, and information to make important connections and distinctions; include formatting (e.g., headings), graphics (e.g., figures, tables), and multimedia when useful to aiding comprehension.
b. Develop the topic with well-chosen, relevant, and sufficient facts, extended definitions, concrete details, quotations, or other information and examples appropriate to the audience’s knowledge of the topic.
d. Use precise language and domain-specific vocabulary to manage the complexity of the topic and convey a style appropriate to the discipline and context as well as to the expertise of likely readers.
3 Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience.
4 Use technology, including the Internet, to produce, publish, and update individual or shared writing products, taking advantage of technology’s capacity to link to other information and to display information flexibly and dynamically.

Due:

Assignment

Tower Defense Game Checkpoint 1: Enemy follows path


Introduction: The Tower Defense game that you will create is going to be based on some of the code from the platformer. Do not try to use an online tutorial to create this game. Create a new folder for the tower defense game and copy the platform game, the block.as file, and the enemy.as file to the new folder.

  • Delete all functions except the createLvl( ) function.
  • Delete all of the holders except the blockHolder and the enemyHolder.
  • Change the addChild statement for those holders by deleting the lvlHolder. part.
  • Delete all variables except for row, lvlCurrent, and lvlArray1.
  • Delete from createLvl() all of  the "if(lvlArray(i)" sections for creating anything except Block and Enemy objects. Change the number for Enemy to 6
  • Delete all symbols from the library and remove any objects from the stage.
Path Creation: We will use the level array to define the path for the enemies. Start and end your path at an edge of the screen. Do not position two turns next to each other. Have at least one straight segment between turns.
  • Edit lvlArray1 so that it is each line is 22 numbers long and there are 16 rows of numbers.
  • Use 0 values to define the path of the maze.
  • Use 1 values for the spaces that are not part of the path.
  • Use a 6 to place an enemy at the start of the path.
  • Change the stage color to White (ffffff) and the color of the block to Black (000000)
Preparing the path: To make the enemy follow the path, we need to create invisible markers (like the invismarkerholder in platform) to tell the enemy which way to turn. In this game, we need four different markers for turning up, down, left, and right.
  • Create upHolder, downHolder, leftHolder, and rightHolder and add them to the stage.
  • In CreateLvl() add code segments using numbers 2 through 5 to create invisible markers that are added to each of the four direction holders.
  • Place the appropriate numbers on the corners of your path based on the direction that the enemy needs to move.
               

Making the enemy follow the path:All of this step will be completed in the enemy.as file

  • In the enemy.as file, delete anything that references mcMain.
  • Remove the direction variable and create new variables for both x direction and y direction (like you did in pong).
  • Replace the invisMarkerHolder loop with four loops for the four directional holders making the appropriate changes for the direction variables using the values -1, 0, and 1.
  • Modify the hitTest to make the enemy stay on the path. Here is a model for the upHolder and downHolder loops:  if (hitTestObject(targetMarker) && this.x>= targetMarker.x && this.x<targetMarker.x+speed)

Due:

Assignment

Tower Defense Game Checkpoint 2: Turret shoots Enemy

  • Copy the turret.as and bullet.as files from the common folder
  • Temporarily use the createLvl function to place a turret on the stage (assign a number to a turret and then create a code block in createLvl to add a new Turret().
  • Add a public variable called 'health' to the enemy class
  • Initialize the health variable (set it equal to a number value) in the beginClass function
  • Create an if statement in the eFrame function of the Enemy.as file that will remove the enemy if the health is <= 0. Look at the Platformer Enemy file if you need  help with how to remove the enemy.
  • Look at the variables in the turret and bullet classes and see how you can modify the behaviors by changing the variables.

Due:

Assignment

Tower Defense Checkpoint 3: Waves of Enemies

We are going to use an array to hold the information about waves of enemies. It is similar to the level array. Add the following variables to the main .fla file

var currentEnemy:int = 0;//the current enemy that we're creating from the array
var enemyTime:int = 0;//how many frames have elapsed since the last enemy was created
var enemyLimit: int = 12;//how many frames are allowed before another enemy is created
var enemyArray:Array = new Array();//this array will tell the function when to create an enemy
var enemiesLeft:int //defines how many enemies are left on the field
enemyArray = [//defining the array
              [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],//1's will just represent an enemy to be created
               [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],//another row means another level
               [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
               ];

  • Next, add an enterFrame function that’ll create the enemies for us. The eFrame function calls a makeEnemies function that will actually create the enemies.


addEventListener(Event.ENTER_FRAME, eFrame);//adding an eFrame function

function eFrame(e:Event):void{
     makeEnemies();//we'll just make some enemies
  }

function makeEnemies():void{//this function will add enemies to the field
      if(enemyTime < enemyLimit){//if it isn't time to make them yet
          enemyTime ++;//then keep on waiting
      } else {//otherwise
var theCode:int = enemyArray[lvlCurrent-1][currentEnemy];//get the code from the array
          if(theCode == 1){//if it's set as 1
var newEnemy: Enemy = new Enemy();//then create a new enemy
              enemyHolder.addChild(newEnemy);//and add it to the enemyholder
          }
          currentEnemy ++;//move on to the next enemy
          enemyTime = 0;//and reset the time
      }
 

  • Add lines to the makeEnemies function right after the addChild line to set the x and y values of the new Enemy. Enter appropriate values to replace the 0 after the = sign on each line. The values for x and y will vary depending on the design of  your path array. The top left corner of the array is position 0,0. Add 25 to the x value for each column to the right where you will start your Enemy. Add 25 to the y value for each row down where you will start your Enemy.

newEnemy.x = 0;
newEnemy.y = 0;          

  • If you don't have an enemyHolder, make sure you add one as part of the create level function

var enemyHolder:Sprite = new Sprite();
addChild(enemyHolder);

  •  Add this code before the create level function to count the number of enemies in a wave

function countEnemies():void{
    for(var j:int=0;j<enemyArray[lvlCurrent-1].length;j++){
      if(enemyArray[lvlCurrent-1][j] == 1){
          enemiesLeft ++;
      }
  }
 }                 

  • Add a call to the beginning of the CreateLvl() function:

countEnemies();

 

  • We need to be able to start the next wave of enemies. In the eFrame function, add the following code after the call to makeEnemies(); Note the comments explaining what each line does.

if(enemiesLeft <= 0){
    lvlCurrent++; //moves to the next wave
    currentEnemy=0; //resets to the first enemy in the wave
    enemyTime=-120; //creates a 5 second delay before the next wave
    countEnemies(); //counts the number of enemies in the new wave
}

  • In the Enemy.as file, add the following line in the section where the enemy is removed if health <= 0

_root.enemiesLeft--; //subtracts one from the count of enemies

Due:

Assignment

Tower Defense Checkpoint 4: Adding Turrets at Runtime

  •  Here are the steps for adding turrets with a mouse click. The listener and function should be added to the main .fla file:


addEventListener(MouseEvent.MOUSE_UP, makeTurret);

function makeTurret(event:MouseEvent) {
      var turret:Turret = new Turret();//creating a variable to hold the Turret
      //changing the coordinates
      turret.x = event.target.x+12.5;
      turret.y = event.target.y+12.5;
      addChild(turret);
}

  •  Add the following code to your main .fla file to create a semi-transparent circle for showing the range of the turret.


var rangeCircle = new Shape();
rangeCircle.graphics.beginFill(0x006600,.5);
rangeCircle.graphics.drawCircle(12.5,12.5,100);
rangeCircle.graphics.endFill();

  • You will need to control where you can click to place a turret. Use an if statement like the one that follows to control the type of spaces that a turret can be entered on. The statement should control all of the code in the CreateTurret() function. You can even create special blocks to limit the places where turrets can be placed.


if (event.target is Block)

 

Due:

Assignment

Tower Defense Game Checkpoint 5: Economy and EndGame

  • Add an economy (points) to the game so that you gain points when you kill enemies and spend points when you build turrets.  You should not be able to build a turret if you do not have enough points.  There are no step be step directions for this because it is based on work you have done in previous projects.
  • Add Win and Lose endgame conditions with appropriate onscreen recognition of endgame. Win condition is the completion of all waves of enemies. Lose condition is one enemy completing the maze. You can determine this by either placing a goal object at the end of the maze and hit testing it or checking the x or y value of the enemy to see if it is outside the limits of the stage at the end of your path. Again, this is similar to previous work.

Due:

Assignment

Platform Game Core
 
Follow the instructions for the Platform Game Core Features in Google Classroom

Due:

Assignment

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:

Assignment

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:

Assignment

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:

Assignment

"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:

Assignment

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:

Assignment

Due:

Assignment

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:

Assignment

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:

Assignment

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

Due:

Assignment

Interactive Objects