User prompt
Locker appears even after Danger Room. Also increased danger room appearance further into the game along with shorter warning timers
User prompt
Exit Now is bugged also anxiety meter cannot be seen
User prompt
Add anxiety when inside locker and add green timer for safe exiting before the entity reenters, at max anxiety player loses. Make keycard appearance randomized ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Room is set as 25, when retrying player should go back to Room 1.
User prompt
Cannot pass after all entities have passed
User prompt
Make danger rooms harder ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'Timeout.tick error: undefined is not an object (evaluating 'self.timerText.style.fill = 0xff6b35')' in or related to this line: 'self.timerText.style.fill = 0xff6b35;' Line Number: 113
User prompt
Make a new room. Danger Rooms, unlike keycard rooms, a timer is shown and a player has to hide inside a locker for the entity to pass then can exit out and continue ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Now add new types of rooms. Add Keycard rooms in which the player finds a keycard before progressing. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Improve the visuals even more! ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Improve the background even more! ↪💡 Consider importing and using the following plugins: @upit/tween.v1 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Improve visuals further ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make the entire screen have sci-fi art. Then refine the background art ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make the background procedural sci-fi style on each room press. Add downtime between each press ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make game reset on win.
Code edit (1 edits merged)
Please save this source code
User prompt
Room Runner 100
Initial prompt
Player goes through 100 rooms trying to reach room 100 using one forward arrows. About it no twists
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var ForwardButton = Container.expand(function () { var self = Container.call(this); var buttonBackground = self.attachAsset('forwardArrow', { anchorX: 0.5, anchorY: 0.5 }); var arrow = self.attachAsset('arrowTriangle', { anchorX: 0.5, anchorY: 0.5, rotation: Math.PI / 2 }); self.down = function (x, y, obj) { tween(self, { scaleX: 0.95, scaleY: 0.95 }, { duration: 100 }); LK.getSound('roomAdvance').play(); advanceRoom(); }; self.up = function (x, y, obj) { tween(self, { scaleX: 1, scaleY: 1 }, { duration: 100 }); }; return self; }); var RoomDisplay = Container.expand(function () { var self = Container.call(this); var background = self.attachAsset('roomBackground', { anchorX: 0.5, anchorY: 0.5 }); self.updateRoom = function (roomNumber) { // Simple visual feedback for room change tween(self, { alpha: 0.7 }, { duration: 150, onFinish: function onFinish() { tween(self, { alpha: 1 }, { duration: 150 }); } }); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xe8e8e8 }); /**** * Game Code ****/ // Game state variables var currentRoom = storage.currentRoom || 1; var maxRoom = 100; // Create room display var roomDisplay = game.addChild(new RoomDisplay()); roomDisplay.x = 2048 / 2; roomDisplay.y = 2732 / 2 - 200; // Create forward button var forwardButton = game.addChild(new ForwardButton()); forwardButton.x = 2048 / 2; forwardButton.y = 2732 / 2 + 300; // Create room counter text var roomCounterText = new Text2('Room ' + currentRoom + '/' + maxRoom, { size: 120, fill: 0x333333 }); roomCounterText.anchor.set(0.5, 0.5); roomCounterText.x = 2048 / 2; roomCounterText.y = 2732 / 2 - 100; game.addChild(roomCounterText); // Create title text var titleText = new Text2('Room Runner 100', { size: 80, fill: 0x666666 }); titleText.anchor.set(0.5, 0); LK.gui.top.addChild(titleText); titleText.y = 150; // Function to advance to next room function advanceRoom() { if (currentRoom < maxRoom) { currentRoom++; storage.currentRoom = currentRoom; // Update room counter roomCounterText.setText('Room ' + currentRoom + '/' + maxRoom); // Update room display roomDisplay.updateRoom(currentRoom); // Check for completion if (currentRoom >= maxRoom) { LK.setTimeout(function () { LK.showYouWin(); }, 500); } } } // Hide forward button if game is complete if (currentRoom >= maxRoom) { forwardButton.visible = false; roomCounterText.setText('Complete!'); // Auto-trigger win after short delay LK.setTimeout(function () { LK.showYouWin(); }, 1000); } game.update = function () { // Simple idle animation for the forward button if (LK.ticks % 120 == 0 && currentRoom < maxRoom) { tween(forwardButton, { scaleX: 1.05, scaleY: 1.05 }, { duration: 300, easing: tween.easeInOut, onFinish: function onFinish() { tween(forwardButton, { scaleX: 1, scaleY: 1 }, { duration: 300, easing: tween.easeInOut }); } }); } };
===================================================================
--- original.js
+++ change.js
@@ -1,6 +1,149 @@
-/****
+/****
+* Plugins
+****/
+var tween = LK.import("@upit/tween.v1");
+var storage = LK.import("@upit/storage.v1");
+
+/****
+* Classes
+****/
+var ForwardButton = Container.expand(function () {
+ var self = Container.call(this);
+ var buttonBackground = self.attachAsset('forwardArrow', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ var arrow = self.attachAsset('arrowTriangle', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ rotation: Math.PI / 2
+ });
+ self.down = function (x, y, obj) {
+ tween(self, {
+ scaleX: 0.95,
+ scaleY: 0.95
+ }, {
+ duration: 100
+ });
+ LK.getSound('roomAdvance').play();
+ advanceRoom();
+ };
+ self.up = function (x, y, obj) {
+ tween(self, {
+ scaleX: 1,
+ scaleY: 1
+ }, {
+ duration: 100
+ });
+ };
+ return self;
+});
+var RoomDisplay = Container.expand(function () {
+ var self = Container.call(this);
+ var background = self.attachAsset('roomBackground', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.updateRoom = function (roomNumber) {
+ // Simple visual feedback for room change
+ tween(self, {
+ alpha: 0.7
+ }, {
+ duration: 150,
+ onFinish: function onFinish() {
+ tween(self, {
+ alpha: 1
+ }, {
+ duration: 150
+ });
+ }
+ });
+ };
+ return self;
+});
+
+/****
* Initialize Game
-****/
+****/
var game = new LK.Game({
- backgroundColor: 0x000000
-});
\ No newline at end of file
+ backgroundColor: 0xe8e8e8
+});
+
+/****
+* Game Code
+****/
+// Game state variables
+var currentRoom = storage.currentRoom || 1;
+var maxRoom = 100;
+// Create room display
+var roomDisplay = game.addChild(new RoomDisplay());
+roomDisplay.x = 2048 / 2;
+roomDisplay.y = 2732 / 2 - 200;
+// Create forward button
+var forwardButton = game.addChild(new ForwardButton());
+forwardButton.x = 2048 / 2;
+forwardButton.y = 2732 / 2 + 300;
+// Create room counter text
+var roomCounterText = new Text2('Room ' + currentRoom + '/' + maxRoom, {
+ size: 120,
+ fill: 0x333333
+});
+roomCounterText.anchor.set(0.5, 0.5);
+roomCounterText.x = 2048 / 2;
+roomCounterText.y = 2732 / 2 - 100;
+game.addChild(roomCounterText);
+// Create title text
+var titleText = new Text2('Room Runner 100', {
+ size: 80,
+ fill: 0x666666
+});
+titleText.anchor.set(0.5, 0);
+LK.gui.top.addChild(titleText);
+titleText.y = 150;
+// Function to advance to next room
+function advanceRoom() {
+ if (currentRoom < maxRoom) {
+ currentRoom++;
+ storage.currentRoom = currentRoom;
+ // Update room counter
+ roomCounterText.setText('Room ' + currentRoom + '/' + maxRoom);
+ // Update room display
+ roomDisplay.updateRoom(currentRoom);
+ // Check for completion
+ if (currentRoom >= maxRoom) {
+ LK.setTimeout(function () {
+ LK.showYouWin();
+ }, 500);
+ }
+ }
+}
+// Hide forward button if game is complete
+if (currentRoom >= maxRoom) {
+ forwardButton.visible = false;
+ roomCounterText.setText('Complete!');
+ // Auto-trigger win after short delay
+ LK.setTimeout(function () {
+ LK.showYouWin();
+ }, 1000);
+}
+game.update = function () {
+ // Simple idle animation for the forward button
+ if (LK.ticks % 120 == 0 && currentRoom < maxRoom) {
+ tween(forwardButton, {
+ scaleX: 1.05,
+ scaleY: 1.05
+ }, {
+ duration: 300,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ tween(forwardButton, {
+ scaleX: 1,
+ scaleY: 1
+ }, {
+ duration: 300,
+ easing: tween.easeInOut
+ });
+ }
+ });
+ }
+};
\ No newline at end of file