space game quizzes

pull/146/head
Jen Looper 4 years ago
parent 76288299fa
commit 4c4b7459e0

@ -1486,56 +1486,44 @@
}, },
{ {
"id": 29, "id": 29,
"title": "Lesson 15 - Space Game: Pre-Lecture Quiz", "title": "Lesson 15 - Space Game - Introduction: Pre-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "JavaScript is an unpopular language for building games",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "false"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "Pub/Sub is a preferred pattern for managing the game's assets and flow",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "true"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "Object inheritance can be handled by either using classes or composition",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "true"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "false"
} }
] ]
} }
@ -1543,56 +1531,48 @@
}, },
{ {
"id": 30, "id": 30,
"title": "Lesson 15 - Space Game: Post-Lecture Quiz", "title": "Lesson 15 - Space Game - Introduction: Post-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "Classes rely on inheritance to ascribe to behaviors",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "true"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "Composition is the preferred design pattern for game objects",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "false"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "Pub/Sub stands for:",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "Publish/Subscribe",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "Print/Staple",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "Publish/Sanitize",
"isCorrect": "" "isCorrect": "false"
} }
] ]
} }
@ -1600,56 +1580,44 @@
}, },
{ {
"id": 31, "id": 31,
"title": "Lesson 16 - Space Game: Pre-Lecture Quiz", "title": "Lesson 16 - Space Game - Draw Hero and Monsters to Canvas: Pre-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "The Canvas element is what you use to draw on a screen",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "true"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "You can only draw simple geometric shapes using the Canvas API",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "false"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "The point 0,0 is in the bottom left",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "false"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "true"
} }
] ]
} }
@ -1657,56 +1625,48 @@
}, },
{ {
"id": 32, "id": 32,
"title": "Lesson 16 - Space Game: Post-Lecture Quiz", "title": "Lesson 16 - Space Game - Draw Hero and Monsters to Canvas: Post-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "You can perform drawing operations directly on the Canvas",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "false"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "You listen to the onload event to know when an image has loaded asynchronously",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "true"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "You draw images onto a screen with an operation called:",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "paintImage()",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "drawImage()",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "draw()",
"isCorrect": "" "isCorrect": "false"
} }
] ]
} }
@ -1714,56 +1674,48 @@
}, },
{ {
"id": 33, "id": 33,
"title": "Lesson 17 - Space Game: Pre-Lecture Quiz", "title": "Lesson 17 - Space Game - Adding Motion: Pre-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "Any object on the screen can receive keyboard events",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "true"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "You can use the same method to listen to key events and mouse events",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "false"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "To make things happen at a regular interval, you use what function?",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "setInterval()",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "setTimeout()",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "sleep()",
"isCorrect": "" "isCorrect": "false"
} }
] ]
} }
@ -1771,56 +1723,52 @@
}, },
{ {
"id": 34, "id": 34,
"title": "Lesson 17 - Space Game: Post-Lecture Quiz", "title": "Lesson 17 - Space Game - Adding Motion: Post-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "You always need to redraw the screen",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "false"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "What is a game loop?",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "A function that ensures the game can be restarted",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "A function that decided how fast the game should run",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "A function that is invoked at regular intervals and draws what the user should see",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "A good case for redrawing the screen is",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "A user interaction happened",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "Something has moved",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "Time has passed",
"isCorrect": "" "isCorrect": "false"
} }
] ]
} }
@ -1828,56 +1776,52 @@
}, },
{ {
"id": 35, "id": 35,
"title": "Lesson 18 - Space Game: Pre-Lecture Quiz", "title": "Lesson 18 - Space Game - Adding A Laser and Detecting Collisions: Pre-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "Collision detection is how we detect if two things have collided",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "true"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "How can we remove an item from the screen?",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "Call the garbage collector",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "Mark it as dead, only paint not dead objects next time we draw the screen",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "Place the item on a negative coordinate",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "A good way to simulate firing a laser in JavaScript is:",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "make a visual element respond to a key event",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "create animated gifs",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "make enemies blow up at intervals",
"isCorrect": "" "isCorrect": "false"
} }
] ]
} }
@ -1885,56 +1829,52 @@
}, },
{ {
"id": 36, "id": 36,
"title": "Lesson 18 - Space Game: Post-Lecture Quiz", "title": "Lesson 18 - Space Game - Adding A Laser and Detecting Collisions: Post-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "In collision detection you compare two",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "circles and whether they intersect",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "rectangles and whether they intersect",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "distances between two points",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "The reason for implementing a cooldown effect is because",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "Making the game harder as you can't repeatedly fire a laser to destroy enemies",
"isCorrect": "" "isCorrect": "false"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "JavaScript can only produce a certain number of events per time unit, so you need to limit them",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "Constants are identifiable in code because",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "they are written in capital letters",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "they have specific names",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "they are written in kebab-case like-this",
"isCorrect": "" "isCorrect": "false"
} }
] ]
} }
@ -1942,56 +1882,52 @@
}, },
{ {
"id": 37, "id": 37,
"title": "Lesson 19 - Space Game: Pre-Lecture Quiz", "title": "Lesson 19 - Space Game - Scoring and Lives: Pre-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "How do you draw text on a screen using the Canvas element?",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "Place text inside a div or span element",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "Call drawText() on the Canvas element",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "Call fillText() on the context object",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "Why do you have the concept of 'lives' in a game?",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "To show how much damage you can take",
"isCorrect": "" "isCorrect": "false"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "So that the game doesn't end straight away, but you have n number of chances before the game is over",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "Add color to text on Canvas using",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "fillColor",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "fillStyle",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "textAlign",
"isCorrect": "" "isCorrect": "false"
} }
] ]
} }
@ -1999,56 +1935,52 @@
}, },
{ {
"id": 38, "id": 38,
"title": "Lesson 19 - Space Game: Post-Lecture Quiz", "title": "Lesson 19 - Space Game - Scoring and Lives: Post-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "What's a fun way to show how many lives a player has left?",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "a number of ships",
"isCorrect": "" "isCorrect": "false"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "a points system",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "How do you center text in the middle of the screen using the Canvas element?",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "You use Flexbox",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "You instruct the text to be drawn at the x coordinate of the client window width/2",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "You set the textAlign property to the value center on the context object",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "In code, deduct a life like this:",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "this.life-",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "this.life--",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "this.life++",
"isCorrect": "" "isCorrect": "false"
} }
] ]
} }
@ -2056,56 +1988,52 @@
}, },
{ {
"id": 39, "id": 39,
"title": "Lesson 20 - Space Game: Pre-Lecture Quiz", "title": "Lesson 20 - Space Game - End and Restart: Pre-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "When is a good time to restart a game",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "when a player wins or loses",
"isCorrect": "" "isCorrect": "true"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "whenever",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "When should a game end",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "when an enemy ship is destroyed",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "when a hero ship is destroyed",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "when points are collected",
"isCorrect": "" "isCorrect": "false"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "A good way to add a level to your game is:",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "Increment the amount of points necessary to complete a given level",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "Add more players to the game",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "Add more graphics to the game",
"isCorrect": "" "isCorrect": "false"
} }
] ]
} }
@ -2113,56 +2041,52 @@
}, },
{ {
"id": 40, "id": 40,
"title": "Lesson 20 - Space Game: Post-Lecture Quiz", "title": "Lesson 20 - Space Game - End and Restart: Post-Lecture Quiz",
"quiz": [ "quiz": [
{ {
"questionText": "", "questionText": "What is a good pattern to use when a game end condition has been met?",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "Display a suitable message",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "Quit the game",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "Display a suitable message, offer the player to restart, and display what key to hit for that action",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "You should offer a restart only when the game has ended",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "true",
"isCorrect": "" "isCorrect": "false"
},
{
"answerText": "",
"isCorrect": ""
}, },
{ {
"answerText": "", "answerText": "false",
"isCorrect": "" "isCorrect": "true"
} }
] ]
}, },
{ {
"questionText": "", "questionText": "A good way to clear the EventEmitter when ending a game is:",
"answerOptions": [ "answerOptions": [
{ {
"answerText": "", "answerText": "clearing listeners",
"isCorrect": "" "isCorrect": "true"
}, },
{ {
"answerText": "", "answerText": "clearing the screen",
"isCorrect": "" "isCorrect": "false"
}, },
{ {
"answerText": "", "answerText": "closing the game window",
"isCorrect": "" "isCorrect": "false"
} }
] ]
} }

Loading…
Cancel
Save