User prompt
create asteroids which are spawn randomly on the game
User prompt
move the player only when mouse input is detected
User prompt
remove enemy class and its code
User prompt
restrict the enemy movement only on x axis and forward
User prompt
add enemy which spawns and move towards the player
User prompt
when i click the left mouse button the player character shoots a bullet
User prompt
spawn the player little above on the scree
User prompt
spawn the player on the bottom part of the screen
User prompt
restrict the mouse input only to x axis
User prompt
use mouse as a input
User prompt
create a player class
User prompt
remove everything
User prompt
change this game into space fighter
User prompt
make enemy class to move towards the player
User prompt
make the enemy to move towards player
User prompt
generate game like 1941: Counter Attack
User prompt
remove everything
User prompt
remove space fighter
User prompt
create a space fighter game
User prompt
add a xwing
User prompt
create a asset and replace that asset with the default backgroundColor
User prompt
delete space fighter
User prompt
var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); replace the background color with asset and make this asset into lively background
User prompt
remove enemy laser and its code
User prompt
fit the game background with screen size
/**** 
* Classes
****/ 
// Asteroid class
var Asteroid = Container.expand(function () {
	var self = Container.call(this);
	// Attach asteroid asset
	var asteroidGraphics = self.attachAsset('asteroid', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	// Set asteroid speed
	self.speed = -5;
	// Update function called every game tick
	self.update = function () {
		// Move asteroid based on speed
		self.y += self.speed;
	};
});
// Bullet class
var Bullet = Container.expand(function () {
	var self = Container.call(this);
	// Attach bullet asset
	var bulletGraphics = self.attachAsset('bullet', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	// Set bullet speed
	self.speed = -5;
	// Update function called every game tick
	self.update = function () {
		// Move bullet based on speed
		self.y += self.speed;
	};
});
// Player class
var Player = Container.expand(function () {
	var self = Container.call(this);
	// Attach player asset
	var playerGraphics = self.attachAsset('player', {
		anchorX: 0.5,
		anchorY: 0.5
	});
	// Set player speed
	self.speed = 5;
	// Update function called every game tick
	self.update = function () {
		// Player movement is handled in game.move event
	};
});
/**** 
* Initialize Game
****/ 
//<Assets used in the game will automatically appear here>
//<Write imports for supported plugins here>
var game = new LK.Game({
	backgroundColor: 0x000000
});
/**** 
* Game Code
****/ 
game.update = function () {
	// Spawn an asteroid every 60 ticks
	if (LK.ticks % 60 == 0) {
		// Create an asteroid instance
		var asteroid = game.addChild(new Asteroid());
		// Set asteroid initial position to a random x and off the top of the screen
		asteroid.x = Math.random() * 2048;
		asteroid.y = -asteroid.height;
	}
};
var player = game.addChild(new Player());
// Set player initial position
player.x = 1024;
player.y = 2732 - player.height / 2 - 100;
// Add mouse move event to the game
game.move = function (x, y, obj) {
	// Move player to mouse position
	player.x = x;
	player.y = y;
}; ===================================================================
--- original.js
+++ change.js
@@ -1,7 +1,23 @@
 /**** 
 * Classes
 ****/ 
+// Asteroid class
+var Asteroid = Container.expand(function () {
+	var self = Container.call(this);
+	// Attach asteroid asset
+	var asteroidGraphics = self.attachAsset('asteroid', {
+		anchorX: 0.5,
+		anchorY: 0.5
+	});
+	// Set asteroid speed
+	self.speed = -5;
+	// Update function called every game tick
+	self.update = function () {
+		// Move asteroid based on speed
+		self.y += self.speed;
+	};
+});
 // Bullet class
 var Bullet = Container.expand(function () {
 	var self = Container.call(this);
 	// Attach bullet asset
@@ -44,14 +60,17 @@
 
 /**** 
 * Game Code
 ****/ 
-game.down = function (x, y, obj) {
-	// Create a bullet instance
-	var bullet = game.addChild(new Bullet());
-	// Set bullet initial position
-	bullet.x = player.x;
-	bullet.y = player.y;
+game.update = function () {
+	// Spawn an asteroid every 60 ticks
+	if (LK.ticks % 60 == 0) {
+		// Create an asteroid instance
+		var asteroid = game.addChild(new Asteroid());
+		// Set asteroid initial position to a random x and off the top of the screen
+		asteroid.x = Math.random() * 2048;
+		asteroid.y = -asteroid.height;
+	}
 };
 var player = game.addChild(new Player());
 // Set player initial position
 player.x = 1024;
:quality(85)/https://cdn.frvr.ai/67bd57e4efe262753dfd6dfb.png%3F3) 
 Space craft in facing forward. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/67bd65e6b3c92d3f541dbe1d.png%3F3) 
 spacecraft in 4k
:quality(85)/https://cdn.frvr.ai/67bd6df50b7dc080adb82b08.png%3F3) 
 :quality(85)/https://cdn.frvr.ai/67bd6ef5b3c92d3f541dbebe.png%3F3) 
 fire blast. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
:quality(85)/https://cdn.frvr.ai/67bd755cb3c92d3f541dbf00.png%3F3) 
 asteroid. Single Game Texture. In-Game asset. 2d. No shadows
:quality(85)/https://cdn.frvr.ai/67bd7b3cb3c92d3f541dbf68.png%3F3) 
 dark nebula galaxy 4k. Single Game Texture. In-Game asset. 2d. Blank background. No shadows