Code edit (7 edits merged)
Please save this source code
User prompt
keep the player position at bottom of the screen
User prompt
keep the player position at bottom of the screen
Code edit (2 edits merged)
Please save this source code
User prompt
keep the player movement infinte dont snap to start position
Code edit (1 edits merged)
Please save this source code
User prompt
keep the player movement slowly moving toward right sideways
User prompt
add a player onto the game with moving right side of the screen along with the game movement
User prompt
turn it into side scroller with moving forward infinetly
User prompt
make a asset for game background instead of backgroundcolor
User prompt
remove everything
User prompt
make platform asset as a background sidescroller with looping
User prompt
create a game like super mario bros
User prompt
remove everything
User prompt
with this side scroller create a game like super Mario bros
User prompt
change this into a side scroller
User prompt
create a super mario bros game
User prompt
create Doodle Cricket Game
User prompt
create a cricket game which is similar to doodle cricket in google
User prompt
create a cricket game
User prompt
unpublish
User prompt
delete everything
User prompt
fit the background image on fullscreen of player
User prompt
generate a cricket field background with people cheering
Initial prompt
Cricket
/**** * Initialize Game ****/ var game = new LK.Game(); /**** * Game Code ****/ // Initialize the game background asset // Attach the game background asset to the game var gameBackground1 = game.attachAsset('gameBackground', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 }); var gameBackground2 = game.attachAsset('gameBackground', { anchorX: 0.0, anchorY: 0.0, x: 2048, y: 0 }); var player = game.attachAsset('player', { anchorX: 0.5, anchorY: 0.5, x: 200, y: 1366 }); // Define the speed of the side scrolling var scrollSpeed = 5; game.update = function () { // Move the backgrounds to the left gameBackground1.x -= scrollSpeed; gameBackground2.x -= scrollSpeed; // When the first background has completely moved off the screen, reset its position to the right of the second background if (gameBackground1.x <= -2048) { gameBackground1.x = gameBackground2.x + 2048; } // When the second background has completely moved off the screen, reset its position to the right of the first background if (gameBackground2.x <= -2048) { gameBackground2.x = gameBackground1.x + 2048; } player.x += scrollSpeed; if (player.x >= 2048) { player.x = 0; } };
===================================================================
--- original.js
+++ change.js
@@ -19,8 +19,14 @@
anchorY: 0.0,
x: 2048,
y: 0
});
+var player = game.attachAsset('player', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 200,
+ y: 1366
+});
// Define the speed of the side scrolling
var scrollSpeed = 5;
game.update = function () {
// Move the backgrounds to the left
@@ -33,5 +39,9 @@
// When the second background has completely moved off the screen, reset its position to the right of the first background
if (gameBackground2.x <= -2048) {
gameBackground2.x = gameBackground1.x + 2048;
}
+ player.x += scrollSpeed;
+ if (player.x >= 2048) {
+ player.x = 0;
+ }
};
\ No newline at end of file
sci fi bike with person riding facing right side Single Game Texture. In-Game asset. High contrast. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
sci fi bike with person riding facing right side Single Game Texture. In-Game asset. High contrast.
asteroid falling diffrent colors Single Game Texture. In-Game asset. High contrast. No Background