Digital Game Design Spring 2016 (Period 2) Assignments
- Instructors
- Term
- 2015-16 School Year
- Department
- Practical Arts
- Description
-
Digital Game Design is a one semester course that explores basic computer programming concepts through the use of Adobe Flash and Game Design. This course will examine a variety of computer gaming concepts and introduce fundamental building blocks of computer programming in ActionScript.
Essential Question: How Does Design Impact the Gameplay?
Files
Upcoming Assignments
No upcoming assignments.
Past Assignments
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
- Add a public variable called 'health' to the enemy class
- 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. We can model multiple arrays after the multiple level arrays. 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. The values for x and y will vary depending on the design of your path array
newEnemy.x =
newEnemy.y =
- 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
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. You can even create special blocks to limit the places where turrets can be placed.
if (event.target is Block)
Due:
Assignment
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 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 Platformer 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
- http://www.indiegamegirl.com/press-release-template/
- http://www.indiegamegirl.com/press-release-example/#more-2514
- http://www.apptamin.com/blog/write-press-release-app-launch/
Common Core Writing Standards addressed in this assignment
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.
Due:
Assignment
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 and copy the platform game, the block.as file, and the enemy.as file to the new folder. Delete all functions except the createLvl method. 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 sections for creating anything except blocks. Delete all symbols from the library and remove any objects from the stage.
Maze Creation: 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 5 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.At this point you have a choice of placing the holders on the path or next to the path.
- On path (Best Option) is a little trickier to use, but has more flexibility as your game gets more involved. This is the preferred method.because it does not place any limitations on your path, but you have to work with the hit test to make sure that the enemy has made it all the way to the corner before turning. Here is an example of the changes in the hitTest to make the enemy stay on the path: if (hitTestObject(targetMarker) && this.x>= targetMarker.x && this.x<targetMarker.x+speed)
- Off path is a little easier to use, but has some limitations. You have to be careful with path design to make sure that you will not have two turns require that the invisible marker be placed in the same location.
Making the enemy follow the path: In the enemy.as file, we need to delete anything that references mcMain. Create new direction 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.
Due:
Assignment
Platform Game Enrichment Features - Create at least 5 enrichment features for your game. Two features must be visual involving the creation of custom symbols to replace the simple shapes used in the level creation. Three features must be gameplay enrichments. In the Google Classroom Word document, identify the 5 features with a description and implementation plan before you start and then the implementation report when the feature is finished.
Due:
Assignment
• Explanatory Notes Part 4
• Platform Tutorial Part 4
Platform Game Part 5
• Explanatory Notes Part 5
• Platform Tutorial Part 5
Platform Game Part 6
• Explanatory Notes Part 6
• Platform Tutorial Part 6
Due:
Assignment
• Explanatory Notes Part 2
• Platform Tutorial Part 2
Platform Part 3
• Explanatory Notes Part 3
• Platform Tutorial Part 3
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. In Google Classroom, identify the 5 features with an explanation of how you implemented each one. 15 points
Due:
Assignment
Platform Part 1
We will be using a tutorial from FlashGameTuts for the core elements of this project. My pages will provide some explanatory notes to remove some of the confusion and errors found in the tutorial as well as some questions to make sure that you understand each step as you complete it.
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)
- 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? What is going to happen when the game ends.
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
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
- Random Numbers Tutorial: http://www.ilike2flash.com/2009/08/generate-random-numbers-in-actionscript.html
- Random Numbers Exercise: Create a new flash animation with one button and three text boxes. When you click the button, the first box should show a random number from 1 to 100, the second box, a random number from 20 to 25, and the third box a random number from -15 to +20. (10 points)
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.
http://www.ilike2flash.com/2009/06/simple-hit-test-in-actionscript-3.html
Due:
Assignment
Due:
Assignment
- Test the Interactive Object Tutorial Flash File
- Interactive Object Tutorial: http://edutechwiki.unige.ch/en/ActionScript_3_interactive_objects_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.
Due:
Assignment
Student Portal - Log in to the Infinite Campus Student Portal. Login must use the students Portal account and occur on or after 1/8/16. 10 points by due date. 5 points if late.