User prompt
The game should not start straight away. The user should have to interact with something before the game actually begins.
User prompt
Add back the scoring for the fish. The player should get 5 points for every time they intersect with a fish.
User prompt
Remove all scoring from the game.
User prompt
Let's remove the scoring for the pipes. Instead, for every pixel the pelican moves to the right, they will score one point. Or better yet,
User prompt
The scoring for the pipes is not working for some reason. Every time the player's pelican passes over top of a pipe, they should score one point.
User prompt
Every time the player passes 8 pipes, there will be a 5 second period where no pipes appear. This is the only time the jets will come on screen.
User prompt
Jetch should be spread out more horizontally when they appear, and there should be three sets of them for each burst.
User prompt
Jets should appear in bursts of three that will appear on screen in quick succession.
User prompt
Jets should move at three times the speed of the pipes across the screen.
User prompt
The jets I just described should move from off the right side of the screen to off the left side of the screen horizontally.
User prompt
Add a new obstacle that moves horizontally on the screen that we'll call Jets. These will kill the player if they collide with them.
User prompt
Undo.
User prompt
Beneath the text that says Game Over, show the player's score.
User prompt
Remove the text at the end of the game.
Code edit (2 edits merged)
Please save this source code
User prompt
The vertical screen position of the game over text should be higher on the screen.
User prompt
The game over pop-up is appearing on top of the text when the game ends. Let's move the text up so it's not being covered by the pop-up.
User prompt
The final score and comment should appear on top of the game over pop-up, not behind it like it is right now.
User prompt
this message should appear on the game over pop-up not behind it.
User prompt
On the final score screen when the game ends, leave a text comment that comments on the player's score. If it's under 5, make fun of them. Otherwise, praise them.
User prompt
The pipes and the bottom layer are currently the same color. They need to be two different colors.
User prompt
The color of the pipes needs to be a different color from the bottom layer.
User prompt
Create an SVG of a pelican to replace the user's character.
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -93,19 +93,36 @@
self.fly = function () {
self.speed = -15; // Increase upward speed for flying
};
});
+// Start Button class
+var StartButton = Container.expand(function () {
+ var self = Container.call(this);
+ var buttonGraphics = self.attachAsset('startButton', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.x = 1024;
+ self.y = 1366;
+ self.down = function (x, y, obj) {
+ game.startGame();
+ self.destroy();
+ };
+});
/****
* Initialize Game
****/
var game = new LK.Game({
- backgroundColor: 0x87CEEB // Sky blue background
+ backgroundColor: 0x87CEEB,
+ // Sky blue background
+ gameStarted: false
});
/****
* Game Code
****/
+game.addChild(new StartButton());
game.pipesPassed = 0;
game.jetsAppear = false;
// Forest green color
// No start screen, game begins immediately
@@ -137,9 +154,15 @@
pelican.speed = 0; // Initial speed
pelican.x = 500;
pelican.y = 1366;
var obstacles = [];
+game.startGame = function () {
+ this.gameStarted = true;
+};
game.update = function () {
+ if (!this.gameStarted) {
+ return;
+ }
if (LK.ticks % 400 == 0 && !game.jetsAppear) {
var newObstacle = new Obstacle();
newObstacle.x = 2048;
var gapY = Math.random() * (2000 - 600); // Random gap position
@@ -200,9 +223,11 @@
}
}
};
game.down = function (x, y, obj) {
- pelican.fly();
+ if (this.gameStarted) {
+ pelican.fly();
+ }
};
game.up = function (x, y, obj) {
// No action needed on mouse up
};
\ No newline at end of file
8-bit profile of pelican flying straight. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit profile of fish for arcade game. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit profile of pelican flapping it's wings downward. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit silhouette of tugboat. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit "YUM" dialog bubble. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.