User prompt
The difficulty doesn't increase fast enough. Make it go up quicker.
User prompt
Slowly add more and more obstacles over time, so the game becomes harder the longer I stay alive.
User prompt
I should also be able to move in the X axis.
User prompt
Fix Bug: 'TypeError: reindeer.move is not a function' in this line: 'reindeer.move();' Line Number: 37
User prompt
Fix Bug: 'TypeError: reindeer.move is not a function' in this line: 'reindeer.move();' Line Number: 37
User prompt
The reindeer doesn't move when I click somewhere. It just stands still.
User prompt
Right now, the reindeer moves upwards all the time. It should stand still by default. When I click and hold the mouse somewhere, it should move towards that position.
User prompt
Add a score counter. I should get 1 point for each second I stay alive.
User prompt
Make it so that if the reindeer hits an obstacle, it's game over.
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'move')' in this line: 'obstacles[a].move();' Line Number: 33
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'move')' in this line: 'obstacles[a].move();' Line Number: 33
Initial prompt
Reindeer Rockets
===================================================================
--- original.js
+++ change.js
@@ -7,8 +7,15 @@
}
var reindeerGraphics = self.createAsset('reindeer', 'Reindeer on a rocket', .5, .5);
self.targetY = self.y;
self.speed = 5;
+ self.move = function () {
+ if (self.y < self.targetY) {
+ self.y += Math.min(self.speed, self.targetY - self.y);
+ } else if (self.y > self.targetY) {
+ self.y -= Math.min(self.speed, self.y - self.targetY);
+ }
+ };
});
var Obstacle = Container.expand(function () {
var self = Container.call(this);
var obstacleGraphics = self.createAsset('obstacle', 'Obstacle', .5, .5);