User prompt
Implement a method within the Player class that allows shooting lasers.
User prompt
Create a Laser Class
User prompt
Implement a method within the Player class that allows shooting lasers.
User prompt
Create a Laser Class
User prompt
Make the laser go up.
User prompt
Add laser asset that shoots the rocks from the player asset.
User prompt
Make the obstacles a bit smaller and make the player bigger.
Remix started
Copy Quintillion Quadrilaterals
===================================================================
--- original.js
+++ change.js
@@ -4,8 +4,9 @@
// Player class
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.createAsset('player', 'Player character', 0.5, 0.5);
+ playerGraphics.scale.set(1.2); // Scale up the player
self.speed = 5;
self.moveLeft = function () {
self.x = Math.max(self.width / 2, self.x - self.speed);
};
@@ -63,8 +64,9 @@
// BlockObstacle class
var BlockObstacle = Container.expand(function () {
var self = Container.call(this);
var obstacleGraphics = self.createAsset('block_obstacle', 'Block obstacle', 0.5, 1);
+ obstacleGraphics.scale.set(0.8); // Scale down the obstacle
self.speed = Math.random() * 3 + 2; // Random speed between 2 and 5
self.speedMultiplier = 1;
self.increaseSpeed = function () {
self.speedMultiplier += 0.001;
Spaceship 2D Pixel.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Asteroid 2D Pixel.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Galaxy Background 2D Pixel.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.