User prompt
when an invader hits the bottom. teleport the invader back to the top
User prompt
each Bounce the invader gets. the lower it gets
User prompt
each bounce the invader gets the faster the invaders get. and add red invaders that is 2x faster
User prompt
start the percentage by 0% when it hits 100% show the countdown. and when you double tap when the super bar is full you enable the super shot. And when you’re shooting the super shot. a laser appears from your cannon destroying everything in its way except all players
User prompt
if the invaders are shooted make another level. and when the bar is on 100% add a 10 second countdown over your cannon. same with other cannons. and show the percentage of the super bar
User prompt
add huge invaders and make them split when shooted
User prompt
apply the when you shoot an invader you gain a percentage to all of the players. and add invaders so you can shoot them.
User prompt
if you shoot an invader. you gain a percentage. not if you shoot.
User prompt
every thing you shoot. you gain a percentage of a super bar. so when you shoot an invader. a percentage pops up over the super bar and the name of the cannon and every thing you shoot. You gain 1% of your super bar.
User prompt
make the mega bar big and only appear in gameplay
User prompt
name the title “Pixelossed Rush Frenzy 2”
User prompt
undo the title to the current title!
User prompt
make thy ex
User prompt
add a mega bar at the side of the screen and add a super bar over all players.
User prompt
every 20 seconds a power up comes in. Make the power ups random and only these power ups added to this list. 1. Super Filler 2. Healer 3. Shield
User prompt
make all players shoot automatically
User prompt
move all of the cannons to the bottom and only moves left and right
User prompt
make the P1 cannon move when moving the hand and remove the AI movement on P1s cannon
User prompt
move all of the AI-controlled cannons even mines on the bottom and make the AI-controlled move like a player is actually playing the game but it’s not
User prompt
name all of the AI-controlled cannons randomly in gameplay
User prompt
add 12 cannons in the gameplay using the same names that was picked by the AI-controlled Cannons Screen
User prompt
add how many cannons there was in the Online AI-Controlled cannons screen
User prompt
after the loading screen add the AI-controlled cannons also your cannon and add the names that the name picking picked over the ai controlled cannons.
User prompt
add a loading bar which fills up randomly so like it fills up a sertan percent randomly
User prompt
so add a screen saying “Loading...” after the 10 second countdown.
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x181818
});
/****
* Game Code
****/
// Black screen for 4 seconds, then fade in/out "Pixelated Studios"
// Import tween plugin for animations
game.setBackgroundColor(0x000000); // Ensure black background
// Create the text, initially invisible
var madeByText = new Text2("Made By", {
size: 90,
fill: 0xFFFFFF
});
madeByText.anchor.set(0.5, 1);
madeByText.alpha = 0;
madeByText.x = 2048 / 2;
madeByText.y = 2732 / 2 - 120;
game.addChild(madeByText);
var studioText = new Text2("Pixelated Studios,", {
size: 180,
fill: 0xFFFFFF
});
studioText.anchor.set(0.5, 0.5);
studioText.alpha = 0;
studioText.x = 2048 / 2;
studioText.y = 2732 / 2;
game.addChild(studioText);
// --- SKIP BUTTON LOGIC ---
var skipBtn = new Text2("Skip", {
size: 80,
fill: 0xffffff,
background: 0x222222,
padding: 40,
borderRadius: 30
});
skipBtn.anchor.set(1, 0);
skipBtn.x = 2048 - 60;
skipBtn.y = 60;
skipBtn.alpha = 0.85;
game.addChild(skipBtn);
var skipIntro = false;
var skipTimeouts = [];
function showTitleScreen() {
// Remove skip button if present
if (skipBtn && skipBtn.parent) skipBtn.parent.removeChild(skipBtn);
// Remove all intro texts if present
if (madeByText && madeByText.parent) madeByText.parent.removeChild(madeByText);
if (studioText && studioText.parent) studioText.parent.removeChild(studioText);
if (geminiMadeByText && geminiMadeByText.parent) geminiMadeByText.parent.removeChild(geminiMadeByText);
if (geminiText && geminiText.parent) geminiText.parent.removeChild(geminiText);
if (andText && andText.parent) andText.parent.removeChild(andText);
if (upitText && upitText.parent) upitText.parent.removeChild(upitText);
// Create the title text
var titleText = new Text2("PIXELOSSED RUSH 2 FRENZY", {
size: 110,
fill: 0xFFFFFF
});
titleText.anchor.set(0.5, 0.5);
titleText.x = 2048 / 2;
titleText.y = 2732 / 2;
game.addChild(titleText);
// Create Multi-Player and Single-Player buttons just below the title, larger and more visible
var buttonWidth = 900;
var buttonHeight = 180;
var buttonSpacing = 60;
// Position buttons just below the title
var titleBottomY = titleText.y + titleText.height / 2 + 80;
var multiPlayerBtn = new Text2("Multi-Player", {
size: 110,
fill: 0x222222,
background: 0xFFFFFF,
padding: 60,
borderRadius: 40
});
multiPlayerBtn.anchor.set(0.5, 0.5);
multiPlayerBtn.x = 2048 / 2;
multiPlayerBtn.y = titleBottomY + buttonHeight / 2;
var singlePlayerBtn = new Text2("Single-Player", {
size: 110,
fill: 0x222222,
background: 0xFFFFFF,
padding: 60,
borderRadius: 40
});
singlePlayerBtn.anchor.set(0.5, 0.5);
singlePlayerBtn.x = 2048 / 2;
singlePlayerBtn.y = multiPlayerBtn.y + buttonHeight + buttonSpacing;
game.addChild(multiPlayerBtn);
game.addChild(singlePlayerBtn);
// Add .down event handlers to make buttons press-able
multiPlayerBtn.down = function (x, y, obj) {
LK.effects.flashObject(multiPlayerBtn, 0x00ff00, 400);
// Hide the main menu buttons and title
titleText.visible = false;
multiPlayerBtn.visible = false;
singlePlayerBtn.visible = false;
// Show the Multi-Player mode selection screen
// Create AI-Controlled Cannons button
var aiCannonsBtn = new Text2("AI-Controlled Cannons", {
size: 90,
fill: 0x222222,
background: 0xFFFFFF,
padding: 50,
borderRadius: 40
});
aiCannonsBtn.anchor.set(0.5, 0.5);
aiCannonsBtn.x = 2048 / 2;
aiCannonsBtn.y = 2732 / 2 - 120;
// Create Online AI controlled Cannons button
var onlineAICannonsBtn = new Text2("Online AI controlled Cannons", {
size: 90,
fill: 0x222222,
background: 0xFFFFFF,
padding: 50,
borderRadius: 40
});
onlineAICannonsBtn.anchor.set(0.5, 0.5);
onlineAICannonsBtn.x = 2048 / 2;
onlineAICannonsBtn.y = 2732 / 2 + 120;
game.addChild(aiCannonsBtn);
game.addChild(onlineAICannonsBtn);
// Add simple flash feedback for these buttons (actual logic can be added later)
aiCannonsBtn.down = function (x, y, obj) {
LK.effects.flashObject(aiCannonsBtn, 0x00ff00, 400);
// Add logic for AI-Controlled Cannons mode here
};
onlineAICannonsBtn.down = function (x, y, obj) {
LK.effects.flashObject(onlineAICannonsBtn, 0x00ff00, 400);
// Hide the mode selection buttons
aiCannonsBtn.visible = false;
onlineAICannonsBtn.visible = false;
// --- Setup for 3 lines, 4 spaces per line ---
var lines = [];
var spacesPerLine = 4;
var totalLines = 3;
var spaceWidth = 260;
var spaceHeight = 220;
var spaceSpacingX = 80;
var spaceSpacingY = 80;
var startY = 2732 / 2 - (totalLines - 1) * (spaceHeight + spaceSpacingY) / 2 - 100;
var startX = 2048 / 2 - (spacesPerLine - 1) * (spaceWidth + spaceSpacingX) / 2;
// Store references for later if needed
var onlineCannonSpaces = [];
for (var line = 0; line < totalLines; ++line) {
var y = startY + line * (spaceHeight + spaceSpacingY);
for (var col = 0; col < spacesPerLine; ++col) {
var x = startX + col * (spaceWidth + spaceSpacingX);
// Create a container for each space
var spaceContainer = new Container();
spaceContainer.x = x;
spaceContainer.y = y;
// Draw background for the first space of the first line (P1)
if (line === 0 && col === 0) {
var bg = LK.getAsset('box', {
width: spaceWidth,
height: spaceHeight,
color: 0xff2222,
anchorX: 0.5,
anchorY: 0.5
});
spaceContainer.addChild(bg);
} else {
// Draw a neutral background for other spaces
var bg = LK.getAsset('box', {
width: spaceWidth,
height: spaceHeight,
color: 0xeeeeee,
anchorX: 0.5,
anchorY: 0.5
});
spaceContainer.addChild(bg);
}
// Add text below the space (except for first line)
var labelText = "";
if (line === 0) {
// First line: only show P1 under first space, others show "looking for players..."
if (col === 0) {
labelText = "P1";
} else {
labelText = "looking for players...";
}
} else {
// All other lines: show "looking for players..." under all spaces
labelText = "looking for players...";
}
// Only add text if not the first line's spaces (per instructions)
if (!(line === 0)) {
var label = new Text2(labelText, {
size: 48,
fill: 0x333333
});
label.anchor.set(0.5, 0);
label.x = 0;
label.y = spaceHeight / 2 + 10;
spaceContainer.addChild(label);
spaceContainer._label = label; // Store reference for later
} else if (col !== 0) {
// For first line, only add text to spaces 2,3,4
var label = new Text2(labelText, {
size: 48,
fill: 0x333333
});
label.anchor.set(0.5, 0);
label.x = 0;
label.y = spaceHeight / 2 + 10;
spaceContainer.addChild(label);
spaceContainer._label = label; // Store reference for later
} else if (col === 0) {
// For first space, add "P1" below
var p1Label = new Text2("P1", {
size: 48,
fill: 0xffffff
});
p1Label.anchor.set(0.5, 0);
p1Label.x = 0;
p1Label.y = spaceHeight / 2 + 10;
spaceContainer.addChild(p1Label);
spaceContainer._label = null; // No random name for P1
}
// Center anchor for the container
spaceContainer.pivot.x = 0;
spaceContainer.pivot.y = 0;
game.addChild(spaceContainer);
onlineCannonSpaces.push(spaceContainer);
}
}
// After 5 seconds, show random names under the spaces (except P1)
LK.setTimeout(function () {
// List of random names to pick from
var randomNames = ["PixelHero", "GeminiBot", "UpitAI", "CannonKing", "BlasterX", "NovaRush", "Firestorm", "Zapster", "RedRocket", "BlueBolt", "GreenGunner", "ShadowAI", "LaserLynx", "TurboTiger", "CyberCannon", "Vortex"];
// Shuffle the names array
for (var i = randomNames.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = randomNames[i];
randomNames[i] = randomNames[j];
randomNames[j] = temp;
}
var nameIdx = 0;
for (var i = 0; i < onlineCannonSpaces.length; ++i) {
var space = onlineCannonSpaces[i];
// Only update if this space has a label (not P1)
if (space._label) {
// Pick a random name, cycle if we run out
var name = randomNames[nameIdx % randomNames.length];
space._label.setText(name);
// Make the name more visible and white
if (space._label.style) {
space._label.style.fill = 0xffffff;
space._label.style.size = 64;
}
nameIdx++;
} else if (i === 0) {
// Make P1 label more visible and white
for (var c = 0; c < space.children.length; ++c) {
var child = space.children[c];
if (child && child.setText && child.text === "P1" && child.style) {
child.style.fill = 0xffffff;
child.style.size = 64;
}
}
}
}
// --- 10 second countdown timer in bottom right ---
var countdownTime = 10;
var countdownText = new Text2(countdownTime + "", {
size: 120,
fill: 0xffffff,
background: 0x222222,
padding: 30,
borderRadius: 40
});
countdownText.anchor.set(1, 1);
// Place in bottom right, with margin
countdownText.x = 2048 - 60;
countdownText.y = 2732 - 60;
game.addChild(countdownText);
var countdownInterval = LK.setInterval(function () {
countdownTime--;
if (countdownTime >= 0) {
countdownText.setText(countdownTime + "");
}
if (countdownTime <= 0) {
LK.clearInterval(countdownInterval);
// Optionally, you can hide or remove the timer here
// countdownText.visible = false;
// After countdown, show "Loading…" screen
// Hide all spaces and countdown
for (var i = 0; i < onlineCannonSpaces.length; ++i) {
if (onlineCannonSpaces[i] && onlineCannonSpaces[i].parent) {
onlineCannonSpaces[i].parent.removeChild(onlineCannonSpaces[i]);
}
}
if (countdownText && countdownText.parent) {
countdownText.parent.removeChild(countdownText);
}
// Show "Loading…" centered
var loadingText = new Text2("Loading…", {
size: 180,
fill: 0xffffff,
background: 0x222222,
padding: 80,
borderRadius: 60
});
loadingText.anchor.set(0.5, 0.5);
loadingText.x = 2048 / 2;
loadingText.y = 2732 / 2 - 120;
game.addChild(loadingText);
// --- Loading Bar Logic ---
var barWidth = 900;
var barHeight = 80;
var barBg = LK.getAsset('box', {
width: barWidth,
height: barHeight,
color: 0x444444,
anchorX: 0.5,
anchorY: 0.5
});
barBg.x = 2048 / 2;
barBg.y = 2732 / 2 + 80;
game.addChild(barBg);
var barFill = LK.getAsset('box', {
width: 1,
height: barHeight - 16,
color: 0xffffff,
anchorX: 0,
anchorY: 0.5
});
barFill.x = 2048 / 2 - barWidth / 2 + 8;
barFill.y = 2732 / 2 + 80;
game.addChild(barFill);
var loadingPercent = 0;
var loadingBarInterval = LK.setInterval(function () {
// Randomly increase percent by 3-18% per tick, but never above 100
var increment = Math.floor(Math.random() * 16) + 3;
loadingPercent += increment;
if (loadingPercent > 100) loadingPercent = 100;
// Animate bar width
barFill.width = Math.floor((barWidth - 16) * (loadingPercent / 100));
// Optionally, show percent text above bar
if (!barFill._percentText) {
var percentText = new Text2("0%", {
size: 60,
fill: 0xffffff,
background: 0x222222,
padding: 18,
borderRadius: 30
});
percentText.anchor.set(0.5, 1);
percentText.x = 2048 / 2;
percentText.y = barBg.y - barHeight / 2 - 10;
game.addChild(percentText);
barFill._percentText = percentText;
}
barFill._percentText.setText(loadingPercent + "%");
// If full, stop interval (simulate loading complete)
if (loadingPercent >= 100) {
LK.clearInterval(loadingBarInterval);
// Optionally, fade out loading bar and text after a short delay
LK.setTimeout(function () {
if (loadingText && loadingText.parent) loadingText.parent.removeChild(loadingText);
if (barBg && barBg.parent) barBg.parent.removeChild(barBg);
if (barFill && barFill.parent) barFill.parent.removeChild(barFill);
if (barFill._percentText && barFill._percentText.parent) barFill._percentText.parent.removeChild(barFill._percentText);
// --- After loading, show AI-controlled cannons and player cannon with names ---
// We'll use the same random names as before, and show them above the AI cannons
// Get the names that were picked for the AI cannons (from previous randomization)
var aiCannonNames = [];
for (var i = 0; i < onlineCannonSpaces.length; ++i) {
var space = onlineCannonSpaces[i];
if (space && space._label && space._label.text) {
aiCannonNames.push(space._label.text);
}
}
// The first is always "P1" (player), the rest are AI names
// We'll show 4 cannons in a row, player on the left, 3 AI to the right
var cannonCount = 4;
var cannonSpacing = 420;
var cannonY = 2732 / 2 + 200;
var cannonStartX = 2048 / 2 - (cannonCount - 1) * cannonSpacing / 2;
// Store references for later if needed
var cannonSprites = [];
var cannonNameLabels = [];
for (var i = 0; i < cannonCount; ++i) {
var x = cannonStartX + i * cannonSpacing;
// Create a cannon (use 'box' asset for now)
var cannonColor = i === 0 ? 0xff2222 : 0xeeeeee;
var cannon = LK.getAsset('box', {
width: 180,
height: 180,
color: cannonColor,
anchorX: 0.5,
anchorY: 1
});
cannon.x = x;
cannon.y = cannonY;
game.addChild(cannon);
cannonSprites.push(cannon);
// Add the name above the cannon
var nameText = "";
if (i === 0) {
nameText = "P1";
} else if (aiCannonNames[i]) {
nameText = aiCannonNames[i];
} else {
nameText = "AI";
}
var nameLabel = new Text2(nameText, {
size: 80,
fill: 0xffffff,
background: 0x222222,
padding: 24,
borderRadius: 30
});
nameLabel.anchor.set(0.5, 1);
nameLabel.x = x;
nameLabel.y = cannonY - 200;
game.addChild(nameLabel);
cannonNameLabels.push(nameLabel);
}
// Show the number of cannons below the row, centered
var cannonCountText = new Text2("Cannons: " + cannonCount, {
size: 80,
fill: 0xffffff,
background: 0x222222,
padding: 24,
borderRadius: 30
});
cannonCountText.anchor.set(0.5, 0);
cannonCountText.x = 2048 / 2;
cannonCountText.y = cannonY + 60;
game.addChild(cannonCountText);
}, 800);
}
}, 350);
}
}, 1000);
}, 5000);
};
};
singlePlayerBtn.down = function (x, y, obj) {
// You can add your Single-Player logic here
LK.effects.flashObject(singlePlayerBtn, 0x00ff00, 400);
// For now, just flash the button to show it was pressed
};
}
// Show title immediately
studioText.alpha = 1;
madeByText.alpha = 1;
// Helper to clear all intro timeouts if skipping
function clearIntroTimeouts() {
for (var i = 0; i < skipTimeouts.length; ++i) {
LK.clearTimeout(skipTimeouts[i]);
}
skipTimeouts = [];
}
// Add skip button handler
skipBtn.down = function (x, y, obj) {
skipIntro = true;
clearIntroTimeouts();
showTitleScreen();
};
// Stay for 2 seconds, then hide instantly
skipTimeouts.push(LK.setTimeout(function () {
if (skipIntro) return;
studioText.alpha = 0;
madeByText.alpha = 0;
}, 2000));
// After Pixelated Studios, show Gemini Games
var geminiMadeByText = new Text2("Made By", {
size: 90,
fill: 0xFFFFFF
});
geminiMadeByText.anchor.set(0.5, 1);
geminiMadeByText.alpha = 0;
geminiMadeByText.x = 2048 / 2;
geminiMadeByText.y = 2732 / 2 - 120;
game.addChild(geminiMadeByText);
var geminiText = new Text2("Gemini Games,", {
size: 180,
fill: 0xFFFFFF
});
geminiText.anchor.set(0.5, 0.5);
geminiText.alpha = 0;
geminiText.x = 2048 / 2;
geminiText.y = 2732 / 2;
game.addChild(geminiText);
// 3 seconds after Pixelated Studios fades out (4+600+2000+600+3000 = 10200ms)
skipTimeouts.push(LK.setTimeout(function () {
if (skipIntro) return;
tween(geminiText, {
alpha: 1
}, {
duration: 600,
easing: tween.easeOut
});
tween(geminiMadeByText, {
alpha: 1
}, {
duration: 600,
easing: tween.easeOut
});
skipTimeouts.push(LK.setTimeout(function () {
if (skipIntro) return;
tween(geminiText, {
alpha: 0
}, {
duration: 600,
easing: tween.easeIn
});
tween(geminiMadeByText, {
alpha: 0
}, {
duration: 600,
easing: tween.easeIn
});
}, 2000));
}, 10200));
// After Gemini Games, show Upit Studios
var andText = new Text2("And", {
size: 90,
fill: 0xFFFFFF
});
andText.anchor.set(0.5, 1);
andText.alpha = 0;
andText.x = 2048 / 2;
andText.y = 2732 / 2 - 120;
game.addChild(andText);
var upitText = new Text2("Upit Studios", {
size: 180,
fill: 0xFFFFFF
});
upitText.anchor.set(0.5, 0.5);
upitText.alpha = 0;
upitText.x = 2048 / 2;
upitText.y = 2732 / 2;
game.addChild(upitText);
// 3 seconds after Gemini Games fades out (10200+600+2000+600+3000 = 16300ms)
skipTimeouts.push(LK.setTimeout(function () {
if (skipIntro) return;
tween(upitText, {
alpha: 1
}, {
duration: 600,
easing: tween.easeOut
});
tween(andText, {
alpha: 1
}, {
duration: 600,
easing: tween.easeOut
});
skipTimeouts.push(LK.setTimeout(function () {
if (skipIntro) return;
tween(upitText, {
alpha: 0
}, {
duration: 600,
easing: tween.easeIn
});
tween(andText, {
alpha: 0
}, {
duration: 600,
easing: tween.easeIn
});
}, 2000));
}, 16300));
// After Upit Studios, show the title screen
// 3 seconds after Upit Studios fades out (16300+600+2000+600+3000 = 22400ms)
skipTimeouts.push(LK.setTimeout(function () {
if (skipIntro) return;
showTitleScreen();
}, 22400));
;
; ===================================================================
--- original.js
+++ change.js
@@ -426,8 +426,20 @@
nameLabel.y = cannonY - 200;
game.addChild(nameLabel);
cannonNameLabels.push(nameLabel);
}
+ // Show the number of cannons below the row, centered
+ var cannonCountText = new Text2("Cannons: " + cannonCount, {
+ size: 80,
+ fill: 0xffffff,
+ background: 0x222222,
+ padding: 24,
+ borderRadius: 30
+ });
+ cannonCountText.anchor.set(0.5, 0);
+ cannonCountText.x = 2048 / 2;
+ cannonCountText.y = cannonY + 60;
+ game.addChild(cannonCountText);
}, 800);
}
}, 350);
}