User prompt
Currently, on the statistics screen, there should be a graph of money earned, number of views and number of subscribers. Currently, there is only a graph for the number of viewers and the money graph is written below it, which is wrong.
User prompt
When you move on to the statistics section, there will be 3 different graphic statistics about how many views the player has received from the first day he played until the last day, how many subscribers he has gained and how much money he has earned.
User prompt
Add a navigation bar at the bottom of the screen and divide that navigation bar into 3, the first being the video recording section, the second being the skill tree section and the third being the statistics section.
User prompt
The edit video button, publish video button and loading bars should be a little higher, as they are not aligned with the video list at the moment.
User prompt
Please fix the bug: 'Uncaught ReferenceError: showProcessBar is not defined' in or related to this line: 'showProcessBar(0);' Line Number: 594
User prompt
Remove the loading bar that appears independently of the video list on the main screen of the game.
User prompt
You removed the wrong loading bar. Bring back the previous loading bar and remove the other one.
User prompt
Remove the loading bar that appears in the middle of the screen after recording a video.
User prompt
After a video is shot, the loading bar for the shot video should appear next to the listed video to the right of the buttons.
User prompt
After a video is shot, the edit button and publish button that appear on the right of the video's list should be aligned with that list (i.e. should be a little higher).
User prompt
After a video is shot and edited, the loading bar that appears should appear to the right of the button on the right of that video's list.
User prompt
The record video button should be further down.
User prompt
There should be some space between the "videos" text and the video list. The edit video and publish video buttons should be to the right of their respective video lists.
User prompt
Videos whose view counts stop increasing should be removed from the videos list.
User prompt
There should not be two different areas on the screen called recording and videos gaining views, there should be only one area and its name should be Videos.
User prompt
The video recorded with record video should wait to be edited and an edit video button should appear next to the video. When the edit video button is pressed, the video will be edited for 5 in-game hours and then the publish video button will appear instead of the edit video button and when the publish video button is pressed, the video will start to gain views.
User prompt
Move the record video button down
User prompt
Remove the edit video button and the promote video button from the screen and move the record video button down.
User prompt
Please fix the bug: 'promoteBtn is not defined' in or related to this line: 'promoteBtn.action = function () {' Line Number: 750
User prompt
Please fix the bug: 'editBtn is not defined' in or related to this line: 'editBtn.action = function () {' Line Number: 705
User prompt
Remove the edit video, promote video and upgrade studio buttons from the main screen.
User prompt
List the videos that are being shot on the screen. Let there be an area where all the videos that continue to gain views will be listed.
User prompt
Now there should be a list of videos on the screen and when the players click record video, the video should appear as being recorded there and a loading bar should fill up underneath. And after the video recording is finished, an edit video button should appear next to it and after the video is edited with this button, a publish video button should appear and when the video is published, it should start gaining views.
User prompt
When new videos are uploaded, old videos continue to gain views
User prompt
When a video is uploaded, it should not receive a random number of viewers directly, the views should come regularly every hour and for a video, it should receive views for 7 days, the hourly views should be realistic and proportional to the number of subscribers.
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
// Energy bar class
var EnergyBar = Container.expand(function () {
var self = Container.call(this);
self.bg = self.attachAsset('energyBarBg', {
anchorX: 0,
anchorY: 0.5
});
self.fill = self.attachAsset('energyBarFill', {
anchorX: 0,
anchorY: 0.5
});
self.fill.x = 0;
self.bg.x = 0;
self.bg.y = 0;
self.fill.y = 0;
self.maxWidth = self.fill.width;
self.set = function (ratio) {
if (ratio < 0) ratio = 0;
if (ratio > 1) ratio = 1;
self.fill.width = self.maxWidth * ratio;
};
return self;
});
// Button class for all clickable actions
var GameButton = Container.expand(function () {
var self = Container.call(this);
self.bg = null;
self.label = null;
self.action = null;
self.enabled = true;
self.setButton = function (assetId, labelText, color, width, height) {
self.bg = self.attachAsset(assetId, {
anchorX: 0.5,
anchorY: 0.5
});
self.bg.width = width;
self.bg.height = height;
// Modern look: more pronounced rounded corners and soft drop shadow
self.bg.cornerRadius = Math.min(width, height) * 0.28;
self.bg.shadow = {
color: 0x111111,
blur: 36,
offsetX: 0,
offsetY: 16,
alpha: 0.32
};
self.label = new Text2(labelText, {
size: 80,
fill: color,
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma",
dropShadow: true,
dropShadowColor: "#222",
dropShadowBlur: 12,
dropShadowDistance: 2
});
self.label.anchor.set(0.5, 0.5);
self.addChild(self.label);
};
self.setEnabled = function (val) {
self.enabled = val;
if (self.bg) {
self.bg.alpha = val ? 1 : 0.4;
}
};
self.down = function (x, y, obj) {
if (!self.enabled) return;
if (typeof self.action === 'function') {
self.action();
}
};
return self;
});
// VideoListItem: displays a video in the list with title, state, and stats
var VideoListItem = Container.expand(function () {
var self = Container.call(this);
self.bg = self.attachAsset('loadingbarempty', {
anchorX: 0,
anchorY: 0.5
});
self.bg.width = 1200;
self.bg.height = 120;
self.bg.alpha = 0.92;
self.titleTxt = new Text2("", {
size: 56,
fill: "#fff",
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma"
});
self.titleTxt.anchor.set(0, 0.5);
self.titleTxt.x = 40;
self.titleTxt.y = 0;
self.addChild(self.titleTxt);
self.stateTxt = new Text2("", {
size: 44,
fill: "#ff0",
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma"
});
self.stateTxt.anchor.set(0, 0.5);
self.stateTxt.x = 500;
self.stateTxt.y = 0;
self.addChild(self.stateTxt);
self.statsTxt = new Text2("", {
size: 44,
fill: "#0ff",
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma"
});
self.statsTxt.anchor.set(0, 0.5);
self.statsTxt.x = 800;
self.statsTxt.y = 0;
self.addChild(self.statsTxt);
self.setVideo = function (videoObj) {
self.titleTxt.setText(videoObj.title || "Untitled");
// State: Recording, Gaining Views, Finished
if (videoObj.hour === 0 && !videoObj.finished) {
self.stateTxt.setText("Just Published");
} else if (!videoObj.finished) {
self.stateTxt.setText("Gaining Views");
} else {
self.stateTxt.setText("Finished");
}
// Stats: views, money, subs
var stats = formatNumber(videoObj.totalViews) + " views";
stats += " | $" + formatNumber(videoObj.totalMoney);
stats += " | " + formatNumber(videoObj.totalSubs) + " subs";
if (videoObj.trending) {
stats += " | 🔥";
}
self.statsTxt.setText(stats);
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000
});
/****
* Game Code
****/
// --- Trending Category State ---
// --- Video Categories (must be defined before use in updateTrendingCategory) ---
var videoCategories = ["Vlog", "Challenge", "Reaction", "Tutorial", "Unboxing", "Gaming", "Music", "Comedy", "Q&A", "Other"];
var selectedCategoryIdx = 0;
// Studio background (simple box for now)
// --- Game State Variables ---
var trendingCategoryIdx = 0;
var trendingCategoryDay = 1; // The day this trending category started
function updateTrendingCategory() {
// Pick a new trending category index, different from the current one if possible
var oldIdx = trendingCategoryIdx;
if (videoCategories && videoCategories.length > 1) {
var newIdx;
do {
newIdx = Math.floor(Math.random() * videoCategories.length);
} while (newIdx === oldIdx);
trendingCategoryIdx = newIdx;
} else {
trendingCategoryIdx = 0;
}
trendingCategoryDay = gameDay;
// Set next change day if not already set
if (typeof trendingCategoryNextChangeDay === "undefined") {
trendingCategoryNextChangeDay = trendingCategoryDay + 7 + Math.floor(Math.random() * 24); // 7-30 days
}
}
// Video button
// Edit button
// Promote button
// Upgrade button
// Energy bar background
// Energy bar fill
// Subscriber icon
// Money icon
// Sound for making a video
var subscribers = 0;
var viewCount = 0;
var money = 0;
var videoQuality = 1; // upgrades increase this
var editSkill = 1; // upgrades increase this
var promoteSkill = 1; // upgrades increase this
var videoCount = 0;
var upgradeCost = 20;
var upgradeLevel = 1;
// --- Time Mechanics ---
var gameHour = 8; // Start at 8:00
var gameDay = 1;
var isTimePaused = false;
var timeTimer = null;
var timeProcess = null; // {type: 'record'|'edit'|'promote', hoursLeft: int, onFinish: fn}
// --- UI Elements ---
var studioBg = LK.getAsset('studioBg', {
anchorX: 0,
anchorY: 0,
x: 0,
y: 0
});
game.addChild(studioBg);
// --- Time Display ---
var timeTxt = new Text2('Day 1, 08:00', {
size: 80,
fill: 0xFFFFFF
});
timeTxt.anchor.set(0.5, 0.5);
timeTxt.x = 2048 / 2;
timeTxt.y = 300;
game.addChild(timeTxt);
// --- Video Lists UI ---
// Area for videos being recorded (future: if multi-record allowed)
var recordingListLabel = new Text2("Recording:", {
size: 54,
fill: "#fff"
});
recordingListLabel.anchor.set(0, 0.5);
recordingListLabel.x = 120;
recordingListLabel.y = 480;
game.addChild(recordingListLabel);
var recordingListContainer = new Container();
recordingListContainer.x = 120;
recordingListContainer.y = 540;
game.addChild(recordingListContainer);
// Area for videos gaining views
var gainingViewsLabel = new Text2("Videos Gaining Views:", {
size: 54,
fill: "#fff"
});
gainingViewsLabel.anchor.set(0, 0.5);
gainingViewsLabel.x = 120;
gainingViewsLabel.y = 720;
game.addChild(gainingViewsLabel);
var gainingViewsListContainer = new Container();
gainingViewsListContainer.x = 120;
gainingViewsListContainer.y = 780;
game.addChild(gainingViewsListContainer);
// --- Pause/Resume Button ---
var pauseBtn = new GameButton();
pauseBtn.setButton('editBtn', 'Pause', "#fff", 320, 120);
pauseBtn.x = 2048 / 2 + 520;
pauseBtn.y = 300;
pauseBtn.action = function () {
isTimePaused = !isTimePaused;
pauseBtn.label.setText(isTimePaused ? "Resume" : "Pause");
};
game.addChild(pauseBtn);
// Subscribers display
var subIcon = LK.getAsset('subIcon', {
anchorX: 0.5,
anchorY: 0.5,
x: 2048 / 2 - 520,
y: 140
});
game.addChild(subIcon);
var subTxt = new Text2('0', {
size: 64,
fill: 0xFFFFFF
});
subTxt.anchor.set(0, 0.5);
subTxt.x = subIcon.x + 70;
subTxt.y = subIcon.y;
game.addChild(subTxt);
// Money display
var moneyIcon = LK.getAsset('moneyIcon', {
anchorX: 0.5,
anchorY: 0.5,
x: 2048 / 2 + 320,
y: 140
});
game.addChild(moneyIcon);
var moneyTxt = new Text2('$0', {
size: 64,
fill: 0xFFE066
});
moneyTxt.anchor.set(0, 0.5);
moneyTxt.x = moneyIcon.x + 70;
moneyTxt.y = moneyIcon.y;
game.addChild(moneyTxt);
// View count display (use viewersicon asset for the viewers counter icon)
// Place view counter exactly in the middle between subIcon and moneyIcon
var viewAreaCenterX = (subIcon.x + moneyIcon.x) / 2;
var viewIcon = LK.getAsset('viewersicon', {
anchorX: 0.5,
anchorY: 0.5,
x: viewAreaCenterX - 40,
y: 110
});
game.addChild(viewIcon);
var viewTxt = new Text2('0', {
size: 64,
fill: 0x00e0ff
});
viewTxt.anchor.set(0, 0.5);
viewTxt.x = viewIcon.x + 70;
viewTxt.y = viewIcon.y;
game.addChild(viewTxt);
// --- Action Buttons ---
// Button layout: stack vertically, bigger, with spacing
var btnW = 540;
var btnH = 220;
var btnSpacingY = 60;
var btnStartY = 900;
// Make Video Button
var makeVideoBtn = new GameButton();
makeVideoBtn.setButton('videoBtn', 'Record Video', "#fff", btnW, btnH);
makeVideoBtn.x = 2048 / 2;
// Move the record video button down to where the edit button was
makeVideoBtn.y = btnStartY + btnH + btnSpacingY;
// --- Loading Bar for Process ---
var processBarBg = LK.getAsset('loadingbarempty', {
anchorX: 0.5,
anchorY: 0.5
});
processBarBg.width = 600;
processBarBg.height = 60;
processBarBg.x = 2048 / 2;
processBarBg.y = 600;
processBarBg.visible = false;
game.addChild(processBarBg);
// AnchorX 0 for left-to-right fill
var processBarFill = LK.getAsset('loadingbarfull', {
anchorX: 0,
anchorY: 0.5
});
processBarFill.width = 600;
processBarFill.height = 60;
// Position left edge of fill to match left edge of bg
processBarFill.x = processBarBg.x - processBarBg.width / 2;
processBarFill.y = 600;
processBarFill.visible = false;
game.addChild(processBarFill);
function showProcessBar(ratio) {
processBarBg.visible = true;
processBarFill.visible = true;
if (ratio < 0) ratio = 0;
if (ratio > 1) ratio = 1;
// Prevent bar from appearing full and then decreasing: if bar is hidden, always start at 0 width
if (!processBarBg._wasVisible) {
processBarFill.width = 0;
}
processBarBg._wasVisible = true;
// Smoothly tween the width to the new ratio
tween.stop(processBarFill, {
width: true
});
tween(processBarFill, {
width: 600 * ratio
}, {
duration: 350,
easing: tween.cubicOut
});
}
function hideProcessBar() {
processBarBg.visible = false;
processBarFill.visible = false;
processBarBg._wasVisible = false;
}
// --- Action Button Logic (time-based) ---
// Track if record video panel is open
var isRecordPanelOpen = false;
makeVideoBtn.action = function () {
if (timeProcess) return; // Only one process at a time
if (isRecordPanelOpen) return; // Prevent multiple panels
isRecordPanelOpen = true;
// Show a panel before starting the process
var panelBg = LK.getAsset('energyBarBg', {
anchorX: 0.5,
anchorY: 0.5
});
// Expand the panel to allow for more rows of category buttons
panelBg.width = 1500;
panelBg.height = 1300;
panelBg.x = 2048 / 2;
panelBg.y = 2732 / 2;
panelBg.alpha = 0.98;
// --- Panel Title ---
var panelText = new Text2("Select Category & Title", {
size: 90,
fill: "#fff",
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma",
dropShadow: true,
dropShadowColor: "#222",
dropShadowBlur: 8,
dropShadowDistance: 2
});
panelText.anchor.set(0.5, 0.5);
panelText.x = panelBg.x;
panelText.y = panelBg.y - panelBg.height / 2 + 120; // near top of panel
// --- Video Title Input ---
var titleInputBg = LK.getAsset('loadingbarempty', {
anchorX: 0.5,
anchorY: 0.5
});
titleInputBg.width = 1000;
titleInputBg.height = 130;
titleInputBg.x = panelBg.x - 180; // shift left to make space for random button
titleInputBg.y = panelText.y + 200; // more space below title
titleInputBg.alpha = 0.92;
var videoTitle = "";
var titleInputTxt = new Text2("Enter video title...", {
size: 72,
fill: "#fff",
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma",
dropShadow: true,
dropShadowColor: "#222",
dropShadowBlur: 8,
dropShadowDistance: 2
});
titleInputTxt.anchor.set(0.5, 0.5);
titleInputTxt.x = titleInputBg.x;
titleInputTxt.y = titleInputBg.y;
// Simulate input: tap to edit, prompt for text
titleInputBg.down = function (x, y, obj) {
var prompt = LK.prompt ? LK.prompt : window.prompt; // fallback for dev
var val = prompt ? prompt("Enter video title:", videoTitle) : "";
if (typeof val === "string" && val.length > 0) {
videoTitle = val;
titleInputTxt.setText(videoTitle);
}
};
// --- Random Title Button ---
var randomBtn = new GameButton();
randomBtn.setButton('promoteBtn', 'Random', "#fff", 340, 120);
randomBtn.x = titleInputBg.x + titleInputBg.width / 2 + 200; // right of input with space
randomBtn.y = titleInputBg.y;
randomBtn.action = function () {
// Titles per category
var categoryTitles = {
"Vlog": ["My Daily Vlog", "Life Update", "A Day in My Life", "Morning Routine", "Evening Recap"],
"Challenge": ["Epic Challenge!", "24 Hour Challenge", "Impossible Task!", "Last To Leave", "Extreme Challenge"],
"Reaction": ["Reacting to Comments", "Reacting to Viral Videos", "First Time Watching", "Fan Reactions", "Surprising Reactions"],
"Tutorial": ["How To Edit Videos", "Beginner's Guide", "Pro Tips & Tricks", "Step by Step Tutorial", "Easy DIY"],
"Unboxing": ["Unboxing Surprise", "Mystery Box Unboxing", "Tech Unboxing", "Unboxing Haul", "First Impressions"],
"Gaming": ["Let's Play!", "Epic Gaming Moments", "Game Review", "Speedrun Attempt", "Funny Gaming Fails"],
"Music": ["My New Song", "Music Cover", "Behind the Music", "Songwriting Session", "Live Performance"],
"Comedy": ["Funny Moments", "Comedy Skit", "Prank Video", "Try Not To Laugh", "Bloopers & Outtakes"],
"Q&A": ["Q&A Special", "Answering Your Questions", "Ask Me Anything", "Subscriber Q&A", "Get To Know Me"],
"Other": ["Behind the Scenes", "Special Announcement", "Random Thoughts", "Channel Update", "What Happened Today"]
};
var cat = videoCategories[selectedCategoryIdx];
var titles = categoryTitles[cat] || ["My Daily Vlog", "Epic Challenge!", "Reacting to Comments", "24 Hours in My Studio", "Behind the Scenes", "Q&A Special", "Trying Viral Trends", "Unboxing Surprise", "Life Update", "Funny Moments"];
var idx = Math.floor(Math.random() * titles.length);
videoTitle = titles[idx];
titleInputTxt.setText(videoTitle);
};
// --- Video Category Buttons ---
var categoryBtnW = 340;
var categoryBtnH = 120;
var categoryBtnSpacingX = 40;
var categoryBtnSpacingY = 40;
var categoryBtns = [];
// Layout: fit as many as possible per row, then wrap
var maxRowWidth = panelBg.width - 120; // leave some margin
var maxPerRow = Math.floor((maxRowWidth + categoryBtnSpacingX) / (categoryBtnW + categoryBtnSpacingX));
if (maxPerRow < 1) maxPerRow = 1;
var startX = panelBg.x - (Math.min(maxPerRow, videoCategories.length) * (categoryBtnW + categoryBtnSpacingX) - categoryBtnSpacingX) / 2 + categoryBtnW / 2;
var startY = titleInputBg.y + 220; // more space below input+random
for (var i = 0; i < videoCategories.length; i++) {
(function (idx) {
var btn = new GameButton();
btn.setButton('editBtn', videoCategories[idx], "#fff", categoryBtnW, categoryBtnH);
var row = Math.floor(idx / maxPerRow);
var col = idx % maxPerRow;
btn.x = startX + col * (categoryBtnW + categoryBtnSpacingX);
btn.y = startY + row * (categoryBtnH + categoryBtnSpacingY);
btn.action = function () {
// Deselect all
for (var j = 0; j < categoryBtns.length; j++) {
// If trending, keep its highlight
if (j === trendingCategoryIdx) {
categoryBtns[j].bg.alpha = 0.95;
} else {
categoryBtns[j].bg.alpha = 0.7;
}
}
btn.bg.alpha = 1;
selectedCategoryIdx = idx;
};
// Highlight the first by default
if (i === 0) btn.bg.alpha = 1;else btn.bg.alpha = 0.7;
// Mark trending category visually
if (i === trendingCategoryIdx) {
btn.bg.alpha = 0.95;
// Add a "Trending" label above the button
var trendingTxt = new Text2("🔥 Trending", {
size: 48,
fill: "#ff0",
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma",
dropShadow: true,
dropShadowColor: "#222",
dropShadowBlur: 8,
dropShadowDistance: 2
});
trendingTxt.anchor.set(0.5, 1);
trendingTxt.x = btn.x;
trendingTxt.y = btn.y - categoryBtnH / 2 - 10;
btn.trendingTxt = trendingTxt;
}
categoryBtns.push(btn);
})(i);
}
// --- Confirm/Record Button ---
var confirmBtn = new GameButton();
confirmBtn.setButton('videoBtn', 'Start Recording', "#fff", 600, 180);
confirmBtn.x = panelBg.x;
// Find the bottom Y of the last category button for spacing
var lastCategoryBtn = categoryBtns[categoryBtns.length - 1];
var categoryBtnsBottomY = lastCategoryBtn ? lastCategoryBtn.y + categoryBtnH / 2 : startY + categoryBtnH / 2;
confirmBtn.y = categoryBtnsBottomY + 200; // more space below category
confirmBtn.action = function () {
// Remove panel
panelBg.destroy();
panelText.destroy();
confirmBtn.destroy();
titleInputBg.destroy();
titleInputTxt.destroy();
randomBtn.destroy();
closeBtn.destroy(); // Also destroy the close (X) button
// Destroy all category buttons
for (var i = 0; i < categoryBtns.length; i++) {
// Destroy trending label if exists
if (categoryBtns[i].trendingTxt) {
categoryBtns[i].trendingTxt.destroy();
}
categoryBtns[i].destroy();
}
isRecordPanelOpen = false;
// Start the process
timeProcess = {
type: 'record',
hoursLeft: 3,
total: 3,
category: videoCategories[selectedCategoryIdx],
title: videoTitle,
onFinish: function onFinish() {
LK.getSound('makeVideo').play();
// Create a new video object to accrue views over time
if (!window.uploadedVideos) window.uploadedVideos = [];
var videoObj = {
title: videoTitle,
category: videoCategories[selectedCategoryIdx],
hour: 0,
totalHours: 7 * 24,
totalViews: 0,
totalMoney: 0,
totalSubs: 0,
trending: videoCategories[selectedCategoryIdx] === videoCategories[trendingCategoryIdx],
baseSubscribers: subscribers,
finished: false
};
// Precompute total views to distribute realistically over 7 days
var minViewPercent = 0.10;
var maxViewPercent = 0.30;
var percent = minViewPercent + Math.random() * (maxViewPercent - minViewPercent);
var baseViews = Math.floor(subscribers * percent);
if (subscribers < 100) {
baseViews = 100 + Math.floor(Math.random() * 400);
}
if (videoObj.trending) {
baseViews = Math.floor(baseViews * 1.5);
}
videoObj.targetViews = baseViews;
videoObj.targetMoney = Math.floor(baseViews / 1000 * (3 + Math.random() * 2));
videoObj.targetSubs = Math.floor(baseViews / (200 + Math.floor(Math.random() * 101)));
videoObj.hourlyViews = [];
// Distribute views per hour: more at start, less at end (decay curve)
var decay = 0.012; // controls how fast views drop off
var total = 0;
for (var h = 0; h < videoObj.totalHours; h++) {
var rel = h / videoObj.totalHours;
var hourViews = Math.max(1, Math.round(baseViews * Math.exp(-decay * h)));
videoObj.hourlyViews.push(hourViews);
total += hourViews;
}
// Normalize to match targetViews
var scale = baseViews / total;
for (var h = 0; h < videoObj.hourlyViews.length; h++) {
videoObj.hourlyViews[h] = Math.floor(videoObj.hourlyViews[h] * scale);
}
window.uploadedVideos.push(videoObj);
videoCount += 1;
updateStats();
updateVideoLists();
// Animate button
tween(makeVideoBtn, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 80,
onFinish: function onFinish() {
tween(makeVideoBtn, {
scaleX: 1,
scaleY: 1
}, {
duration: 80
});
}
});
if (subscribers >= 1000) {
LK.showYouWin();
}
}
};
showProcessBar(0);
};
// --- Close (X) Button ---
var closeBtn = new Text2("×", {
size: 120,
fill: "#fff",
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma",
dropShadow: true,
dropShadowColor: "#222",
dropShadowBlur: 8,
dropShadowDistance: 2
});
closeBtn.anchor.set(0.5, 0.5);
// Place at top right of panel, with margin
closeBtn.x = panelBg.x + panelBg.width / 2 - 80;
closeBtn.y = panelBg.y - panelBg.height / 2 + 80;
closeBtn.interactive = true;
closeBtn.buttonMode = true;
closeBtn.down = function () {
panelBg.destroy();
panelText.destroy();
confirmBtn.destroy();
closeBtn.destroy();
titleInputBg.destroy();
titleInputTxt.destroy();
randomBtn.destroy();
// Destroy all category buttons
for (var i = 0; i < categoryBtns.length; i++) {
// Destroy trending label if exists
if (categoryBtns[i].trendingTxt) {
categoryBtns[i].trendingTxt.destroy();
}
categoryBtns[i].destroy();
}
isRecordPanelOpen = false;
};
// Add all panel elements to game
game.addChild(panelBg);
game.addChild(panelText);
game.addChild(titleInputBg);
game.addChild(titleInputTxt);
game.addChild(randomBtn);
game.addChild(closeBtn);
// Add all category buttons
for (var i = 0; i < categoryBtns.length; i++) {
game.addChild(categoryBtns[i]);
// If trending label exists, add it to game
if (categoryBtns[i].trendingTxt) {
game.addChild(categoryBtns[i].trendingTxt);
}
}
game.addChild(confirmBtn);
};
// Add buttons to game
game.addChild(makeVideoBtn);
// Add extra vertical space between money/sub displays and buttons
subIcon.y = 110;
subTxt.y = subIcon.y;
moneyIcon.y = 110;
moneyTxt.y = moneyIcon.y;
// Removed undefined energyBar and energyTxt
// --- GUI: Timer/Score (use subscribers as score) ---
// Removed giant numbers next to the subscriber counter
// --- Helper Functions ---
function formatNumber(num) {
if (num < 1000) return "" + num;
if (num < 1000000) {
var k = num / 1000;
if (k % 1 === 0) return k + "k";
return k.toFixed(1).replace(/\.0$/, "") + "k";
}
var m = num / 1000000;
if (m % 1 === 0) return m + "m";
return m.toFixed(1).replace(/\.0$/, "") + "m";
}
function updateStats() {
subTxt.setText(formatNumber(subscribers));
viewTxt.setText(formatNumber(viewCount));
moneyTxt.setText('$' + formatNumber(money));
// Enable/disable buttons based on process and resources
makeVideoBtn.setEnabled(!timeProcess);
// --- Achievements ---
if (!updateStats.milestones) updateStats.milestones = {};
var milestones = [100, 250, 500, 750, 1000];
for (var i = 0; i < milestones.length; i++) {
var m = milestones[i];
if (subscribers >= m && !updateStats.milestones[m]) {
updateStats.milestones[m] = true;
var ach = new Text2("Milestone: " + m + " Subs!", {
size: 110,
fill: "#ff0",
stroke: "#000",
strokeThickness: 12,
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma",
dropShadow: true,
dropShadowColor: "#222",
dropShadowBlur: 12,
dropShadowDistance: 4
});
ach.anchor.set(0.5, 0.5);
ach.x = 2048 / 2;
ach.y = 400 + i * 80;
game.addChild(ach);
tween(ach, {
alpha: 0,
y: ach.y - 100
}, {
duration: 1800,
onFinish: function onFinish() {
ach.destroy();
}
});
}
}
}
// --- Video List UI Update ---
function updateVideoLists() {
// Clear all children
while (recordingListContainer.children.length > 0) {
var c = recordingListContainer.children[0];
c.destroy && c.destroy();
recordingListContainer.removeChild(c);
}
while (gainingViewsListContainer.children.length > 0) {
var c2 = gainingViewsListContainer.children[0];
c2.destroy && c2.destroy();
gainingViewsListContainer.removeChild(c2);
}
// Show videos being recorded (future: if multi-record allowed)
// Currently, only one at a time, and only during timeProcess.type==='record'
if (timeProcess && timeProcess.type === 'record') {
var recItem = new VideoListItem();
recItem.y = 0;
recItem.setVideo({
title: timeProcess.title || "Untitled",
hour: 0,
finished: false,
totalViews: 0,
totalMoney: 0,
totalSubs: 0,
trending: timeProcess.category === videoCategories[trendingCategoryIdx]
});
recordingListContainer.addChild(recItem);
}
// Show all uploaded videos that are gaining views (not finished or still accruing)
if (window.uploadedVideos) {
var y = 0;
for (var i = window.uploadedVideos.length - 1; i >= 0; i--) {
var vid = window.uploadedVideos[i];
if (!vid.finished || vid.totalViews > 0) {
var item = new VideoListItem();
item.y = y;
item.setVideo(vid);
gainingViewsListContainer.addChild(item);
y += 130;
}
}
}
}
// --- Time Update ---
function updateTimeDisplay() {
var h = gameHour;
var hStr = (h < 10 ? "0" : "") + h + ":00";
timeTxt.setText("Day " + gameDay + ", " + hStr);
}
// --- Process Update ---
function updateProcessBar() {
if (timeProcess) {
var ratio = 1 - timeProcess.hoursLeft / timeProcess.total;
showProcessBar(ratio);
} else {
hideProcessBar();
}
}
// --- Time Timer ---
if (timeTimer) LK.clearInterval(timeTimer);
timeTimer = LK.setInterval(function () {
if (isTimePaused) return;
// Advance time
gameHour += 1;
if (gameHour >= 24) {
gameHour = 0;
gameDay += 1;
// Check if it's time to change trending category
// Trending category changes a random number of times every 7 to 30 days
if (typeof trendingCategoryNextChangeDay === "undefined") {
trendingCategoryNextChangeDay = trendingCategoryDay + 7 + Math.floor(Math.random() * 24); // 7-30 days
}
if (gameDay >= trendingCategoryNextChangeDay) {
updateTrendingCategory();
trendingCategoryNextChangeDay = gameDay + 7 + Math.floor(Math.random() * 24); // 7-30 days
}
}
updateTimeDisplay();
// Process logic
if (timeProcess) {
timeProcess.hoursLeft -= 1;
updateProcessBar();
if (timeProcess.hoursLeft <= 0) {
var finish = timeProcess.onFinish;
timeProcess = null;
updateProcessBar();
updateStats();
updateVideoLists();
if (typeof finish === "function") finish();
}
}
// Per-hour video view/money/subscriber accrual
if (window.uploadedVideos) {
for (var v = 0; v < window.uploadedVideos.length; v++) {
var vid = window.uploadedVideos[v];
if (vid.hour < vid.totalHours) {
var viewsThisHour = vid.hourlyViews[vid.hour] || 0;
// Money: $3-5 per 1000 views, distributed proportionally
var moneyThisHour = Math.floor(viewsThisHour / vid.targetViews * vid.targetMoney);
// Subs: proportional to views, distributed over time
var subsThisHour = Math.floor(viewsThisHour / vid.targetViews * vid.targetSubs);
vid.totalViews += viewsThisHour;
vid.totalMoney += moneyThisHour;
vid.totalSubs += subsThisHour;
viewCount += viewsThisHour;
money += moneyThisHour;
subscribers += subsThisHour;
vid.hour++;
// Clamp to target on last hour
if (vid.hour === vid.totalHours) {
var leftViews = vid.targetViews - vid.totalViews;
var leftMoney = vid.targetMoney - vid.totalMoney;
var leftSubs = vid.targetSubs - vid.totalSubs;
if (leftViews > 0) {
viewCount += leftViews;
vid.totalViews += leftViews;
}
if (leftMoney > 0) {
money += leftMoney;
vid.totalMoney += leftMoney;
}
if (leftSubs > 0) {
subscribers += leftSubs;
vid.totalSubs += leftSubs;
}
vid.finished = true;
}
}
}
}
updateStats();
updateVideoLists();
}, 1000);
// --- Random Event Timer ---
var eventTimer = LK.setInterval(function () {
// Pick a random event: 0 = trend, 1 = sponsorship, 2 = copyright strike, 3 = viral short (rare)
var eventType;
// 10% chance for viral short, else normal events
if (Math.random() < 0.1) {
eventType = 3;
} else {
eventType = Math.floor(Math.random() * 3);
}
var eventMsg = "";
if (eventType === 0) {
// Trend: bonus subs and money
var trendSubs = 50 + Math.floor(Math.random() * 50);
var trendMoney = 20 + Math.floor(Math.random() * 20);
subscribers += trendSubs;
money += trendMoney;
updateStats();
eventMsg = "Trending Topic! +" + trendSubs + " subs, +$" + trendMoney;
} else if (eventType === 1) {
// Sponsorship: big money
var sponsorMoney = 60 + Math.floor(Math.random() * 40);
money += sponsorMoney;
updateStats();
eventMsg = "Sponsorship! +$" + sponsorMoney;
} else if (eventType === 2) {
// Copyright strike: lose subs, lose money
var strikeSubs = 30 + Math.floor(Math.random() * 30);
var strikeMoney = 10 + Math.floor(Math.random() * 10);
subscribers = Math.max(0, subscribers - strikeSubs);
money = Math.max(0, money - strikeMoney);
updateStats();
eventMsg = "Copyright Strike! -" + strikeSubs + " subs, -$" + strikeMoney;
} else if (eventType === 3) {
// Viral Short: huge sub and money boost
var viralSubs = 200 + Math.floor(Math.random() * 200);
var viralMoney = 100 + Math.floor(Math.random() * 100);
subscribers += viralSubs;
money += viralMoney;
updateStats();
eventMsg = "Viral Short! +" + viralSubs + " subs, +$" + viralMoney;
}
// Show popup in the center of the screen
var popup = new Text2(eventMsg, {
size: 100,
fill: "#fff",
stroke: "#000",
strokeThickness: 12,
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma",
dropShadow: true,
dropShadowColor: "#222",
dropShadowBlur: 12,
dropShadowDistance: 4
});
popup.anchor.set(0.5, 0.5);
popup.x = 2048 / 2;
popup.y = 2732 / 2;
game.addChild(popup);
tween(popup, {
alpha: 0,
y: popup.y - 120
}, {
duration: 1800,
onFinish: function onFinish() {
popup.destroy();
}
});
}, 20000);
// --- Game Update Loop ---
game.update = function () {
// Nothing needed for now, all logic is event/click based
};
// --- Touch/Drag Handling (no drag needed, but block top left 100x100) ---
game.down = function (x, y, obj) {
// Prevent accidental clicks in top left
if (x < 100 && y < 100) return;
};
game.move = function (x, y, obj) {};
game.up = function (x, y, obj) {};
// --- Initialize UI ---
updateStats();
// --- Daily Bonus at game start ---
(function showDailyBonus() {
var bonusType = Math.floor(Math.random() * 2);
var bonusMsg = "";
if (bonusType === 0) {
// Bonus subs
var bonusSubs = 50 + Math.floor(Math.random() * 50);
subscribers += bonusSubs;
updateStats();
bonusMsg = "Daily Bonus: +" + bonusSubs + " subs!";
} else {
// Bonus money
var bonusMoney = 30 + Math.floor(Math.random() * 30);
money += bonusMoney;
updateStats();
bonusMsg = "Daily Bonus: +$" + bonusMoney + "!";
}
var popup = new Text2(bonusMsg, {
size: 110,
fill: "#0ff",
stroke: "#000",
strokeThickness: 12,
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma",
dropShadow: true,
dropShadowColor: "#222",
dropShadowBlur: 12,
dropShadowDistance: 4
});
popup.anchor.set(0.5, 0.5);
popup.x = 2048 / 2;
popup.y = 2732 / 2 - 200;
game.addChild(popup);
tween(popup, {
alpha: 0,
y: popup.y - 120
}, {
duration: 2000,
onFinish: function onFinish() {
popup.destroy();
}
});
})();
; ===================================================================
--- original.js
+++ change.js
@@ -310,9 +310,10 @@
// Make Video Button
var makeVideoBtn = new GameButton();
makeVideoBtn.setButton('videoBtn', 'Record Video', "#fff", btnW, btnH);
makeVideoBtn.x = 2048 / 2;
-makeVideoBtn.y = btnStartY;
+// Move the record video button down to where the edit button was
+makeVideoBtn.y = btnStartY + btnH + btnSpacingY;
// --- Loading Bar for Process ---
var processBarBg = LK.getAsset('loadingbarempty', {
anchorX: 0.5,
anchorY: 0.5
@@ -659,91 +660,8 @@
}
}
game.addChild(confirmBtn);
};
-// Define editBtn as a GameButton and add to game
-var editBtn = new GameButton();
-editBtn.setButton('editBtn', 'Edit Video', "#fff", btnW, btnH);
-editBtn.x = 2048 / 2;
-editBtn.y = btnStartY + btnH + btnSpacingY;
-editBtn.action = function () {
- if (timeProcess) return;
- if (videoCount < 1) return;
- timeProcess = {
- type: 'edit',
- hoursLeft: 5,
- total: 5,
- onFinish: function onFinish() {
- LK.getSound('editVideo').play();
- var editBonus = 5 + Math.floor(Math.random() * 5) * editSkill;
- subscribers += editBonus;
- money += 2 * editSkill;
- updateStats();
- // Animate button
- tween(editBtn, {
- scaleX: 1.1,
- scaleY: 1.1
- }, {
- duration: 80,
- onFinish: function onFinish() {
- tween(editBtn, {
- scaleX: 1,
- scaleY: 1
- }, {
- duration: 80
- });
- }
- });
- if (subscribers >= 1000) {
- LK.showYouWin();
- }
- }
- };
- showProcessBar(0);
-};
-game.addChild(editBtn);
-// Define promoteBtn as a GameButton and add to game
-var promoteBtn = new GameButton();
-promoteBtn.setButton('promoteBtn', 'Promote Video', "#fff", btnW, btnH);
-promoteBtn.x = 2048 / 2;
-promoteBtn.y = btnStartY + 2 * (btnH + btnSpacingY);
-promoteBtn.action = function () {
- if (timeProcess) return;
- if (money < 5) return;
- money -= 5;
- updateStats();
- timeProcess = {
- type: 'promote',
- hoursLeft: 2,
- total: 2,
- onFinish: function onFinish() {
- LK.getSound('promoteVideo').play();
- var promoSubs = 15 + Math.floor(Math.random() * 10) * promoteSkill;
- subscribers += promoSubs;
- updateStats();
- // Animate button
- tween(promoteBtn, {
- scaleX: 1.1,
- scaleY: 1.1
- }, {
- duration: 80,
- onFinish: function onFinish() {
- tween(promoteBtn, {
- scaleX: 1,
- scaleY: 1
- }, {
- duration: 80
- });
- }
- });
- if (subscribers >= 1000) {
- LK.showYouWin();
- }
- }
- };
- showProcessBar(0);
-};
-game.addChild(promoteBtn);
// Add buttons to game
game.addChild(makeVideoBtn);
// Add extra vertical space between money/sub displays and buttons
subIcon.y = 110;
subscriber icon 2d. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
money icon 2d. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
solid grey colour background for panel. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
viewers icon for a mobile game. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
make bigger this monitor
please to this white color
white play button solid white color. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
double speed icon for mobile games. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat. no text. only white color.
2d phone for mobile games. modern phone. looks good but phone is one color, phone's screen one color. Let it be completely 2-dimensional and not look like 3-dimensional. There should be a mute button and small volume up and down and hang up buttons on the sides of the phone.. In-Game asset. 2d. High contrast. No shadows - Fill the entire screen with a light gray color. - The outer cover color of the phone should be dark gray.
youtube button logo. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
white background rounded corners. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat white color. all white color no border.
playstore logo. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
editing application logo. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
çöp kutusu logosu fakat kırmızı arka planlı (çöp kutusu logosu beyaz renkte olacak). In-Game asset. 2d. High contrast. No shadows
kırmızıya boya
beyaza boya
maviye boya
istatistik logosu. In-Game asset. 2d. High contrast. No shadows
reklam logosu herhangi bir yazı olmasın. In-Game asset. 2d. High contrast. No shadows
record video logo with not text. In-Game asset. 2d. High contrast. No shadows
finans logosu. In-Game asset. 2d. High contrast. No shadows
youtube studio logo with no text only logo. In-Game asset. 2d. High contrast. No shadows
create youtube channel avatar cartoon 2d. In-Game asset. 2d. High contrast. No shadows
youtube channel logo. In-Game asset. 2d. High contrast. No shadows
"rastgele" ikonu, beyaz renginde olacak.. In-Game asset. 2d. High contrast. No shadows
youtube thumbnail for vlog. 2d. High contrast. No shadows
kilit ikonu beyaz. In-Game asset. 2d. High contrast. No shadows