User prompt
Display 3 answer buttons on bottom left side of screen
User prompt
Reduce speed of ghost by 50%
User prompt
Move puzzle down 800 pixels
User prompt
Fix Bug: 'Can't find variable: chosenQuestion' in this line: 'for (var i = 0; i < chosenQuestion.answers.length; i++) {' Line Number: 41
User prompt
Fix Bug: 'ReferenceError: Can't find variable: chosenQuestion' in this line: 'for (var i = 0; i < chosenQuestion.answers.length; i++) {' Line Number: 41
User prompt
To answer trivia player must tap 1 of 3 buttons associated with the answer options
User prompt
Fix Bug: 'ReferenceError: Can't find variable: hero' in this line: 'hero.update();' Line Number: 108
User prompt
Fix Bug: 'ReferenceError: Can't find variable: hero' in this line: 'hero.update();' Line Number: 108
User prompt
Do not display player in screen
User prompt
Fix Bug: 'Can't find variable: puzzleGraphics' in this line: 'puzzle.y = 2732 - puzzleGraphics.height / 2;' Line Number: 96
User prompt
Add this question to trivia: How many Styrofoam cups do Americans throw away every year? A) 15 trillion B) 25 trillion (Correct) C) 35 trillion
User prompt
Expand puzzle icon to cover bottom of screen
User prompt
Here are the trivia questions and answers: What is the capital city of Australia? A) Sydney B) Canberra (Correct) C) Melbourne Who wrote the novel "1984"? A) George Orwell (Correct) B) J.K. Rowling C) Ernest Hemingway What is the largest mammal in the world? A) Elephant B) Blue Whale (Correct) C) Giraffe In which year did the Titanic sink? A) 1912 (Correct) B) 1923 C) 1905 Which planet is known as the Red Planet? A) Jupiter B) Mars (Correct) C) Venus Who painted the famous artwork "Starry Night"? A) Claude Monet B) Vincent van Gogh (Correct) C) Pablo Picasso What is the square root of 64? A) 6 B) 8 (Correct) C) 10 What is the main ingredient in guacamole? A) Tomato B) Avocado (Correct) C) Onion In which country would you find the Great Barrier Reef? A) Mexico B) Australia (Correct) C) Brazil The Pacific Garbage Patch is an accumulation of marine debris in which ocean? A) Atlantic Ocean B) Indian Ocean C) Pacific Ocean (Correct)
User prompt
Each round has a ghost who is growing in size. If the ghost reaches 500% of original size show game over. To reduce the size of the ghost, player but answer trivia questions.
User prompt
User prompt
Fix Bug: 'TypeError: puzzle.update is not a function. (In 'puzzle.update()', 'puzzle.update' is undefined)' in this line: 'puzzle.update();' Line Number: 47
User prompt
Fix Bug: 'TypeError: puzzle.update is not a function. (In 'puzzle.update()', 'puzzle.update' is undefined)' in this line: 'puzzle.update();' Line Number: 47
User prompt
User prompt
Fix Bug: 'TypeError: ghost.update is not a function. (In 'ghost.update()', 'ghost.update' is undefined)' in this line: 'ghost.update();' Line Number: 44
User prompt
Fix Bug: 'TypeError: ghost.update is not a function. (In 'ghost.update()', 'ghost.update' is undefined)' in this line: 'ghost.update();' Line Number: 44
User prompt
Fix Bug: 'TypeError: hero.update is not a function. (In 'hero.update()', 'hero.update' is undefined)' in this line: 'hero.update();' Line Number: 42
User prompt
Fix Bug: 'TypeError: hero.update is not a function. (In 'hero.update()', 'hero.update' is undefined)' in this line: 'hero.update();' Line Number: 42
Initial prompt
ParaPuzzles 👻
var Ghost = Container.expand(function () { var self = Container.call(this); var ghostGraphics = self.createAsset('ghost', 'Ghost character', .5, .5); self.sizeMultiplier = 1; self.checkSize = function () { if (self.sizeMultiplier >= 5) { LK.showGameOver(); } }; self.move = function () {}; self.attack = function () {}; self.update = function () { self.sizeMultiplier += 0.01; ghostGraphics.scale.set(self.sizeMultiplier); self.checkSize(); }; }); var Hero = Container.expand(function () { var self = Container.call(this); var heroGraphics = self.createAsset('hero', 'Hero character', .5, .5); self.move = function () {}; self.attack = function () {}; self.update = function () {}; }); var Puzzle = Container.expand(function () { var self = Container.call(this); var puzzleGraphics = self.createAsset('puzzle', 'Puzzle element', .5, .5); self.solve = function (ghost) { var triviaQuestions = [{ question: 'What is the capital city of Australia?', answers: ['Sydney', 'Canberra', 'Melbourne'], correct: 1 }, { question: 'Who wrote the novel "1984"?', answers: ['George Orwell', 'J.K. Rowling', 'Ernest Hemingway'], correct: 0 }, { question: 'What is the largest mammal in the world?', answers: ['Elephant', 'Blue Whale', 'Giraffe'], correct: 1 }, { question: 'In which year did the Titanic sink?', answers: ['1912', '1923', '1905'], correct: 0 }, { question: 'Which planet is known as the Red Planet?', answers: ['Jupiter', 'Mars', 'Venus'], correct: 1 }, { question: 'Who painted the famous artwork "Starry Night"?', answers: ['Claude Monet', 'Vincent van Gogh', 'Pablo Picasso'], correct: 1 }, { question: 'What is the square root of 64?', answers: ['6', '8', '10'], correct: 1 }, { question: 'What is the main ingredient in guacamole?', answers: ['Tomato', 'Avocado', 'Onion'], correct: 1 }, { question: 'In which country would you find the Great Barrier Reef?', answers: ['Mexico', 'Australia', 'Brazil'], correct: 1 }, { question: 'The Pacific Garbage Patch is an accumulation of marine debris in which ocean?', answers: ['Atlantic Ocean', 'Indian Ocean', 'Pacific Ocean'], correct: 2 }]; var randomIndex = Math.floor(Math.random() * triviaQuestions.length); var chosenQuestion = triviaQuestions[randomIndex]; var playerAnswer = getPlayerAnswer(chosenQuestion.question + '\n' + chosenQuestion.answers.join('\n')); if (playerAnswer === chosenQuestion.answers[chosenQuestion.correct]) { ghost.sizeMultiplier = Math.max(1, ghost.sizeMultiplier - 0.5); ghostGraphics.scale.set(ghost.sizeMultiplier); } }; function getPlayerAnswer(question) { return prompt(question); } self.update = function () {}; }); var Game = Container.expand(function () { var self = Container.call(this); LK.stageContainer.setBackgroundColor(0x000000); var hero = self.addChild(new Hero()); hero.x = 2048 / 2; hero.y = 2732 / 2; var ghost = self.addChild(new Ghost()); ghost.x = 2048 / 2; ghost.y = 2732 / 4; var puzzles = []; for (var i = 0; i < 5; i++) { var puzzle = self.addChild(new Puzzle()); puzzle.x = 2048 / 2; puzzle.y = 2732 / 2 + i * 100; puzzles.push(puzzle); } var scoreTxt = new Text2('0', { size: 150, fill: "#ffffff" }); scoreTxt.anchor.set(.5, 0); LK.gui.topCenter.addChild(scoreTxt); var isGameOver = false; LK.on('tick', function () { hero.update(); ghost.update(); puzzles.forEach(function (puzzle) { puzzle.update(); if (puzzle.isSolved) { puzzle.solve(ghost); } }); if (isGameOver) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } }); });
===================================================================
--- original.js
+++ change.js
@@ -25,12 +25,53 @@
var Puzzle = Container.expand(function () {
var self = Container.call(this);
var puzzleGraphics = self.createAsset('puzzle', 'Puzzle element', .5, .5);
self.solve = function (ghost) {
- var question = 'What is the capital of France?';
- var correctAnswer = 'Paris';
- var playerAnswer = getPlayerAnswer(question);
- if (playerAnswer === correctAnswer) {
+ var triviaQuestions = [{
+ question: 'What is the capital city of Australia?',
+ answers: ['Sydney', 'Canberra', 'Melbourne'],
+ correct: 1
+ }, {
+ question: 'Who wrote the novel "1984"?',
+ answers: ['George Orwell', 'J.K. Rowling', 'Ernest Hemingway'],
+ correct: 0
+ }, {
+ question: 'What is the largest mammal in the world?',
+ answers: ['Elephant', 'Blue Whale', 'Giraffe'],
+ correct: 1
+ }, {
+ question: 'In which year did the Titanic sink?',
+ answers: ['1912', '1923', '1905'],
+ correct: 0
+ }, {
+ question: 'Which planet is known as the Red Planet?',
+ answers: ['Jupiter', 'Mars', 'Venus'],
+ correct: 1
+ }, {
+ question: 'Who painted the famous artwork "Starry Night"?',
+ answers: ['Claude Monet', 'Vincent van Gogh', 'Pablo Picasso'],
+ correct: 1
+ }, {
+ question: 'What is the square root of 64?',
+ answers: ['6', '8', '10'],
+ correct: 1
+ }, {
+ question: 'What is the main ingredient in guacamole?',
+ answers: ['Tomato', 'Avocado', 'Onion'],
+ correct: 1
+ }, {
+ question: 'In which country would you find the Great Barrier Reef?',
+ answers: ['Mexico', 'Australia', 'Brazil'],
+ correct: 1
+ }, {
+ question: 'The Pacific Garbage Patch is an accumulation of marine debris in which ocean?',
+ answers: ['Atlantic Ocean', 'Indian Ocean', 'Pacific Ocean'],
+ correct: 2
+ }];
+ var randomIndex = Math.floor(Math.random() * triviaQuestions.length);
+ var chosenQuestion = triviaQuestions[randomIndex];
+ var playerAnswer = getPlayerAnswer(chosenQuestion.question + '\n' + chosenQuestion.answers.join('\n'));
+ if (playerAnswer === chosenQuestion.answers[chosenQuestion.correct]) {
ghost.sizeMultiplier = Math.max(1, ghost.sizeMultiplier - 0.5);
ghostGraphics.scale.set(ghost.sizeMultiplier);
}
};
Book pages, blank, open book, no text, front facing Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Scrap of paper, horizontal, blank, torn edge Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Rfireball blue magic Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Ghost girl, scary, horror movie, full body, Japanese ghost, Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Spooky abandoned house interior Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
White rectangle, game UI, blank, flat 2D Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Horror game UI sign, "SANITY BREAK" Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Fear icon, horror game Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.