/**** * Classes ****/ // No plugins needed for this game // Button class: a simple rectangular button with centered text var BlueButton = Container.expand(function () { var self = Container.call(this); // Button dimensions var btnWidth = 600; var btnHeight = 200; // Create button background (rounded rectangle using ellipse for corners) var btnBg = self.attachAsset('buttonBg', { width: btnWidth, height: btnHeight, color: 0x1e90ff, // Dodger blue shape: 'box', anchorX: 0.5, anchorY: 0.5 }); // Button label var btnLabel = new Text2('PRESS ME', { size: 90, fill: 0xFFFFFF }); btnLabel.anchor.set(0.5, 0.5); btnLabel.x = 0; btnLabel.y = 0; self.addChild(btnLabel); // Optional: visual feedback on press self.down = function (x, y, obj) { btnBg.alpha = 0.7; }; self.up = function (x, y, obj) { btnBg.alpha = 1; }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xffffff // Start with white background }); /**** * Game Code ****/ // Set initial background color (white) game.setBackgroundColor(0xffffff); // --- Windows Version Data --- var windowsVersions = [{ name: "Windows 1.0", color: 0x0000aa, face: "", text: "Unexpected system error.\n\nPlease restart your computer.\n\nPress any key to continue _", textSize: 60 }, // --- Windows 2.0 --- { name: "Windows 2.0", color: 0x0000aa, face: "", text: "System Error\n\nAn error has occurred in Windows 2.0.\n\nPlease restart your computer by pressing CTRL+ALT+DEL.\n\nPress any key to continue _", textSize: 60 }, { name: "Windows 95", color: 0x0000aa, face: "", text: "A fatal exception 0E has occurred at 0028:C0011E36 in VXD VMM(01) +\n00010E36. The current application will be terminated.\n\n* Press any key to terminate the current application.\n* Press CTRL+ALT+DEL again to restart your computer. You will\n lose any unsaved information in all applications.\n\nPress any key to continue _", textSize: 60 }, { name: "Windows 98", color: 0x0000aa, face: "", text: "A fatal exception 0E has occurred at 0028:C183:00000000 in VXD VMM(01) +\n00000000. The current application will be terminated.\n\n* Press any key to terminate the current application.\n* Press CTRL+ALT+DEL again to restart your computer. You will\n lose any unsaved information in all applications.\n\nPress any key to continue _", textSize: 60 }, { name: "Windows NT", color: 0x000080, face: "", text: "*** STOP: 0x0000001E (0xC0000005,0x00000000,0x00000000,0x00000000)\nKMODE_EXCEPTION_NOT_HANDLED\n\nIf this is the first time you've seen this Stop error screen,\nrestart your computer. If this screen appears again, follow\nthese steps:\n\nCheck to make sure any new hardware or software is properly installed.\nIf this is a new installation, ask your hardware or software manufacturer\nfor any Windows NT updates you might need.\n\nIf problems continue, disable or remove any newly installed hardware\nor software. Disable BIOS memory options such as caching or shadowing.\nIf you need to use Safe Mode to remove or disable components, restart\nyour computer, press F8 to select Advanced Startup Options, and then\nselect Safe Mode.", textSize: 48 }, { name: "Windows XP", color: 0x00008b, face: "", text: "A problem has been detected and Windows has been shut down to prevent damage\nto your computer.\n\nIf this is the first time you've seen this Stop error screen,\nrestart your computer. If this screen appears again, follow\nthese steps:\n\nCheck to make sure any new hardware or software is properly installed.\nIf this is a new installation, ask your hardware or software manufacturer\nfor any Windows updates you might need.\n\nIf problems continue, disable or remove any newly installed hardware\nor software. Disable BIOS memory options such as caching or shadowing.\nIf you need to use Safe Mode to remove or disable components, restart\nyour computer, press F8 to select Advanced Startup Options, and then\nselect Safe Mode.\n\nTechnical information:\n*** STOP: 0x0000007B (0xF78D2524,0xC0000034,0x00000000,0x00000000)", textSize: 48 }, { name: "Windows 7", color: 0x0000aa, face: "", text: "A problem has been detected and Windows has been shut down to prevent damage\nto your computer.\n\nIf this is the first time you've seen this Stop error screen,\nrestart your computer. If this screen appears again, follow\nthese steps:\n\nCheck to make sure any new hardware or software is properly installed.\nIf this is a new installation, ask your hardware or software manufacturer\nfor any Windows updates you might need.\n\nIf problems continue, disable or remove any newly installed hardware\nor software. Disable BIOS memory options such as caching or shadowing.\nIf you need to use Safe Mode to remove or disable components, restart\nyour computer, press F8 to select Advanced Startup Options, and then\nselect Safe Mode.\n\nTechnical information:\n*** STOP: 0x0000007E (0xFFFFFFFFC0000005,0xFFFFF80002F8A16A,0xFFFFF880009A8C28,0xFFFFF880009A8480)", textSize: 48 }, { name: "Windows 10", color: 0x0078d7, face: ":(", text: "Your PC ran into a problem and needs to restart.\nWe're just collecting some error info, and then we'll restart for you.\n\nFor more information about this issue and possible fixes, visit\nhttps://www.windows.com/stopcode\n\nIf you call a support person, give them this info:\nSTOP CODE: FRVR_GAME_CRASHED", textSize: 60 }, { name: "Windows 11", color: 0x003399, face: ":(", text: "Your device ran into a problem and needs to restart.\nWe're just collecting some error info, and then we'll restart for you.\n\nFor more information about this issue and possible fixes, visit\nhttps://www.windows.com/stopcode\n\nIf you call a support person, give them this info:\nSTOP CODE: FRVR_GAME_CRASHED", textSize: 60 }, // Unreleased versions { name: "Windows 12 (Unreleased)", color: 0x2222cc, face: ":(", text: "Your device ran into a problem and needs to restart.\nWe're just collecting some error info, and then we'll restart for you.\n\nFor more information about this issue and possible fixes, visit\nhttps://www.windows.com/stopcode\n\nIf you call a support person, give them this info:\nSTOP CODE: FRVR_UNRELEASED_BUILD", textSize: 60 }, { name: "Windows Neptune (Unreleased)", color: 0x003366, face: "", text: "A problem has been detected and Windows Neptune has been shut down to prevent damage\nto your computer.\n\nIf this is the first time you've seen this Stop error screen,\nrestart your computer. If this screen appears again, follow\nthese steps:\n\nCheck to make sure any new hardware or software is properly installed.\nIf this is a new installation, ask your hardware or software manufacturer\nfor any Windows updates you might need.\n\nTechnical information:\n*** STOP: 0x0000007E (0xFFFFFFFFC0000005,0xFFFFF80002F8A16A,0xFFFFF880009A8C28,0xFFFFF880009A8480)", textSize: 48 }, { name: "Windows Longhorn (Unreleased)", color: 0x004488, face: "", text: "A problem has been detected and Windows Longhorn has been shut down to prevent damage\nto your computer.\n\nIf this is the first time you've seen this Stop error screen,\nrestart your computer. If this screen appears again, follow\nthese steps:\n\nCheck to make sure any new hardware or software is properly installed.\nIf this is a new installation, ask your hardware or software manufacturer\nfor any Windows updates you might need.\n\nTechnical information:\n*** STOP: 0xDEADDEAD (0x00000000,0x00000000,0x00000000,0x00000000)", textSize: 48 }]; // --- UI State --- var versionButtons = []; var versionSelectButtons = []; var selectedVersionIdx = null; // --- Helper: Remove all children except version buttons --- function clearScreenExceptVersionBtns() { for (var i = game.children.length - 1; i >= 0; i--) { var child = game.children[i]; if (versionButtons.indexOf(child) === -1 && versionSelectButtons.indexOf(child) === -1) { child.destroy(); } } } // --- Step 1: Show version selection buttons --- function showVersionButtons() { // Remove any previous version select buttons for (var i = 0; i < versionSelectButtons.length; ++i) { versionSelectButtons[i].destroy(); } versionSelectButtons = []; // Remove any blue screen or other overlays clearScreenExceptVersionBtns(); // Remove old version buttons for (var i = 0; i < versionButtons.length; ++i) { versionButtons[i].destroy(); } versionButtons = []; // Layout: vertical stack, centered var btnW = 700, btnH = 200, spacing = 60; var totalH = windowsVersions.length * btnH + (windowsVersions.length - 1) * spacing; var startY = (2732 - totalH) / 2 + btnH / 2; for (var i = 0; i < windowsVersions.length; ++i) { (function (idx) { var btn = new BlueButton(); btn.setLabel(windowsVersions[idx].name); btn.x = 2048 / 2; btn.y = startY + i * (btnH + spacing); btn.visible = true; btn.alpha = 1; btn.up = function (x, y, obj) { showVersionSelect(idx); }; game.addChild(btn); versionButtons.push(btn); })(i); } // --- Scroll Bar and Buttons for Home/Version List --- // Place scroll bar and buttons in a horizontal row at the right edge, vertically centered with the version list var scrollBarW = 80; var scrollBarH = 1200; // Will be resized dynamically var scrollBarX = 2048 - scrollBarW - 32 - 340 - 24; // leave space for buttons to the right var scrollBarY = (2732 - 1200) / 2; // vertically centered // Container to hold scroll bar and buttons side by side var scrollBarRow = new Container(); scrollBarRow.x = scrollBarX; scrollBarRow.y = scrollBarY; game.addChild(scrollBarRow); versionButtons.push(scrollBarRow); var scrollBarTrack = new Container(); var scrollBarBg = LK.getAsset('buttonBg', { width: scrollBarW, height: 400, color: 0x222244, anchorX: 0.5, anchorY: 0 }); scrollBarBg.x = scrollBarW / 2; scrollBarBg.y = 0; scrollBarTrack.addChild(scrollBarBg); scrollBarTrack.x = 0; scrollBarTrack.y = 0; scrollBarRow.addChild(scrollBarTrack); var scrollBarThumb = LK.getAsset('buttonBg', { width: scrollBarW - 12, height: 200, color: 0xff2222, anchorX: 0.5, anchorY: 0 }); scrollBarThumb.x = scrollBarW / 2; scrollBarThumb.y = 0; scrollBarTrack.addChild(scrollBarThumb); // Helper to create a red button with label function createScrollBtn(label) { var btn = new Container(); var bg = LK.getAsset('buttonBg', { width: 340, height: 120, color: 0xff2222, anchorX: 0.5, anchorY: 0.5 }); btn.addChild(bg); var txt = new Text2(label, { size: 48, fill: 0xffffff }); txt.anchor.set(0.5, 0.5); txt.x = 0; txt.y = 0; btn.addChild(txt); btn.down = function () { bg.alpha = 0.7; }; btn.up = function () { bg.alpha = 1; }; return btn; } // Create a container to hold the up/down buttons vertically var scrollBtnCol = new Container(); scrollBtnCol.x = scrollBarW + 24; // to the right of the scroll bar scrollBtnCol.y = 0; scrollBarRow.addChild(scrollBtnCol); // Scroll state for version list var versionListScrollOffset = 0; var versionListBtnH = btnH; var versionListSpacing = spacing; var versionListVisibleCount = Math.floor(1200 / (btnH + spacing)); var versionListMaxOffset = 0; var versionListMinOffset = Math.min(0, (windowsVersions.length - versionListVisibleCount) * (btnH + spacing)); // Scroll Up button var scrollUpBtn = createScrollBtn("Scroll Up"); scrollUpBtn.x = 340 / 2; scrollUpBtn.y = 120 / 2; scrollBtnCol.addChild(scrollUpBtn); versionButtons.push(scrollUpBtn); // Scroll Down button var scrollDownBtn = createScrollBtn("Scroll Down"); scrollDownBtn.x = 340 / 2; scrollDownBtn.y = 120 * 1.5 + 32; scrollBtnCol.addChild(scrollDownBtn); versionButtons.push(scrollDownBtn); // Helper to update version button positions based on scroll offset function updateVersionButtonPositions() { for (var i = 0; i < versionButtons.length; ++i) { var btn = versionButtons[i]; // Only update BlueButton instances (the version select buttons) if (btn instanceof BlueButton) { var idx = windowsVersions.findIndex(function (v) { return v.name === btn.children[0].text; }); if (idx !== -1) { btn.y = startY + idx * (btnH + spacing) + versionListScrollOffset; // Hide buttons that are out of visible scroll area if (btn.y < startY - btnH || btn.y > startY + versionListVisibleCount * (btnH + spacing)) { btn.visible = false; } else { btn.visible = true; } } } } // Move the thumb var scrollRange = versionListMaxOffset - versionListMinOffset; var thumbRange = 400 - scrollBarThumb.height; var thumbY = 0; if (scrollRange > 0) { thumbY = Math.round(-versionListScrollOffset / scrollRange * thumbRange); } scrollBarThumb.y = thumbY; } // Scroll up/down button logic // Move the whole version list screen up/down by shifting all versionButtons and scrollBarRow scrollUpBtn.up = function () { // Move everything up by a small step for (var i = 0; i < versionButtons.length; ++i) { var btn = versionButtons[i]; btn.y -= Math.round((btnH + spacing) * 0.15); } // Also move the scrollBarRow up scrollBarRow.y -= Math.round((btnH + spacing) * 0.15); }; scrollDownBtn.up = function () { // Move everything down by a small step for (var i = 0; i < versionButtons.length; ++i) { var btn = versionButtons[i]; btn.y += Math.round((btnH + spacing) * 0.15); } // Also move the scrollBarRow down scrollBarRow.y += Math.round((btnH + spacing) * 0.15); }; // Allow dragging the scroll thumb var thumbDragStartY = null; var thumbDragStartOffset = null; scrollBarThumb.down = function (x, y, obj) { thumbDragStartY = y; thumbDragStartOffset = versionListScrollOffset; }; scrollBarThumb.move = function (x, y, obj) { if (thumbDragStartY !== null) { var dy = y - thumbDragStartY; var scrollRange = versionListMaxOffset - versionListMinOffset; var thumbRange = 400 - scrollBarThumb.height; if (thumbRange > 0) { var scrollDelta = -dy * (scrollRange / thumbRange); versionListScrollOffset = thumbDragStartOffset + scrollDelta; if (versionListScrollOffset > versionListMaxOffset) versionListScrollOffset = versionListMaxOffset; if (versionListScrollOffset < versionListMinOffset) versionListScrollOffset = versionListMinOffset; updateVersionButtonPositions(); } } }; scrollBarThumb.up = function (x, y, obj) { thumbDragStartY = null; thumbDragStartOffset = null; }; // Initial update updateVersionButtonPositions(); } // --- Step 2: Show "See Blue Screen" button for selected version --- function showVersionSelect(idx) { // Remove version buttons for (var i = 0; i < versionButtons.length; ++i) { versionButtons[i].destroy(); } versionButtons = []; // Remove any previous select buttons for (var i = 0; i < versionSelectButtons.length; ++i) { versionSelectButtons[i].destroy(); } versionSelectButtons = []; clearScreenExceptVersionBtns(); selectedVersionIdx = idx; var version = windowsVersions[idx]; // Show version name as title var title = new Text2(version.name, { size: 120, fill: 0x222222 }); title.anchor.set(0.5, 0.5); title.x = 2048 / 2; title.y = 2732 / 2 - 300; game.addChild(title); versionSelectButtons.push(title); // Show "See Blue Screen" button var seeBtn = new BlueButton(); seeBtn.setLabel("See Blue Screen"); seeBtn.x = 2048 / 2; seeBtn.y = 2732 / 2 + 100; seeBtn.visible = true; seeBtn.alpha = 1; seeBtn.up = function (x, y, obj) { showBlueScreen(idx); }; game.addChild(seeBtn); versionSelectButtons.push(seeBtn); // --- Scroll Bar and Buttons for Home/Version Select --- // Place scroll bar and buttons in a horizontal row at the right edge, just right of the title var scrollBarW = 80; var scrollBarH = 1200; // Will be resized dynamically var scrollBarX = 2048 - scrollBarW - 32 - 340 - 24; // leave space for buttons to the right var scrollBarY = 2732 / 2 - 300 + 60; // below the title // Container to hold scroll bar and buttons side by side var scrollBarRow = new Container(); scrollBarRow.x = scrollBarX; scrollBarRow.y = scrollBarY; game.addChild(scrollBarRow); versionSelectButtons.push(scrollBarRow); var scrollBarTrack = new Container(); var scrollBarBg = LK.getAsset('buttonBg', { width: scrollBarW, height: 400, color: 0x222244, anchorX: 0.5, anchorY: 0 }); scrollBarBg.x = scrollBarW / 2; scrollBarBg.y = 0; scrollBarTrack.addChild(scrollBarBg); scrollBarTrack.x = 0; scrollBarTrack.y = 0; scrollBarRow.addChild(scrollBarTrack); var scrollBarThumb = LK.getAsset('buttonBg', { width: scrollBarW - 12, height: 200, color: 0xff2222, anchorX: 0.5, anchorY: 0 }); scrollBarThumb.x = scrollBarW / 2; scrollBarThumb.y = 0; scrollBarTrack.addChild(scrollBarThumb); // Helper to create a red button with label function createScrollBtn(label) { var btn = new Container(); var bg = LK.getAsset('buttonBg', { width: 340, height: 120, color: 0xff2222, anchorX: 0.5, anchorY: 0.5 }); btn.addChild(bg); var txt = new Text2(label, { size: 48, fill: 0xffffff }); txt.anchor.set(0.5, 0.5); txt.x = 0; txt.y = 0; btn.addChild(txt); btn.down = function () { bg.alpha = 0.7; }; btn.up = function () { bg.alpha = 1; }; return btn; } // Create a container to hold the up/down buttons vertically var scrollBtnCol = new Container(); scrollBtnCol.x = scrollBarW + 24; // to the right of the scroll bar scrollBtnCol.y = 0; scrollBarRow.addChild(scrollBtnCol); // Scroll Up button var scrollUpBtn = createScrollBtn("Scroll Up"); scrollUpBtn.x = 340 / 2; scrollUpBtn.y = 120 / 2; scrollBtnCol.addChild(scrollUpBtn); versionSelectButtons.push(scrollUpBtn); // Scroll Down button var scrollDownBtn = createScrollBtn("Scroll Down"); scrollDownBtn.x = 340 / 2; scrollDownBtn.y = 120 * 1.5 + 32; scrollBtnCol.addChild(scrollDownBtn); versionSelectButtons.push(scrollDownBtn); // Show "Back" button var backBtn = new BlueButton(); backBtn.setLabel("Back"); backBtn.x = 2048 / 2; backBtn.y = 2732 / 2 + 350; backBtn.visible = true; backBtn.alpha = 1; backBtn.up = function (x, y, obj) { showVersionButtons(); }; game.addChild(backBtn); versionSelectButtons.push(backBtn); } // --- Step 3: Show blue screen for selected version --- function showBlueScreen(idx) { // Remove all UI for (var i = 0; i < versionButtons.length; ++i) { versionButtons[i].destroy(); } versionButtons = []; for (var i = 0; i < versionSelectButtons.length; ++i) { versionSelectButtons[i].destroy(); } versionSelectButtons = []; clearScreenExceptVersionBtns(); var version = windowsVersions[idx]; // Set background color game.setBackgroundColor(version.color); // Show sad face if present if (version.face) { var sadFace = new Text2(version.face, { size: 400, fill: 0xFFFFFF }); sadFace.anchor.set(0.5, 0.5); sadFace.x = 2048 / 2; sadFace.y = 2732 / 2 - 350; game.addChild(sadFace); } // Create a scrollable container for the blue screen text var scrollContainer = new Container(); scrollContainer.x = 0; scrollContainer.y = 0; game.addChild(scrollContainer); // Show blue screen text inside the scrollable container var bsodText = new Text2(version.text, { size: version.textSize, fill: 0xFFFFFF, align: "center" }); bsodText.anchor.set(0.5, 0); bsodText.x = 2048 / 2; bsodText.y = 2732 / 2 + 50; scrollContainer.addChild(bsodText); // Set up scrolling state var scrollStartY = null; var scrollLastY = null; var scrollOffsetY = 0; var scrollMinY = Math.min(0, 2732 - (bsodText.y + bsodText.height + 100)); var scrollMaxY = 0; // Touch/mouse down to start scroll scrollContainer.down = function (x, y, obj) { scrollStartY = y; scrollLastY = y; }; // Touch/mouse move to scroll scrollContainer.move = function (x, y, obj) { if (scrollStartY !== null) { var deltaY = y - scrollLastY; scrollOffsetY += deltaY; // Clamp scroll if (scrollOffsetY < scrollMinY) scrollOffsetY = scrollMinY; if (scrollOffsetY > scrollMaxY) scrollOffsetY = scrollMaxY; bsodText.y = 2732 / 2 + 50 + scrollOffsetY; scrollLastY = y; } }; // Touch/mouse up to end scroll scrollContainer.up = function (x, y, obj) { scrollStartY = null; scrollLastY = null; }; // Forward game move/down/up events to scrollContainer if inside text area var origGameDown = game.down; var origGameMove = game.move; var origGameUp = game.up; game.down = function (x, y, obj) { // Only allow scroll if inside bsodText area var local = bsodText.toLocal({ x: x, y: y }, game); if (x >= bsodText.x - bsodText.width / 2 && x <= bsodText.x + bsodText.width / 2 && y >= bsodText.y && y <= bsodText.y + bsodText.height) { if (scrollContainer.down) scrollContainer.down(x, y, obj); } else if (origGameDown) { origGameDown(x, y, obj); } }; game.move = function (x, y, obj) { if (scrollStartY !== null) { if (scrollContainer.move) scrollContainer.move(x, y, obj); } else if (origGameMove) { origGameMove(x, y, obj); } }; game.up = function (x, y, obj) { if (scrollStartY !== null) { if (scrollContainer.up) scrollContainer.up(x, y, obj); } else if (origGameUp) { origGameUp(x, y, obj); } }; // Show "Back" button to return to version select var backBtn = new BlueButton(); backBtn.setLabel("Back"); backBtn.x = 2048 / 2; backBtn.y = 2732 - 250; backBtn.visible = true; backBtn.alpha = 1; backBtn.up = function (x, y, obj) { showVersionSelect(idx); }; game.addChild(backBtn); versionSelectButtons.push(backBtn); } // --- BlueButton: add setLabel method --- BlueButton.prototype.setLabel = function (txt) { // Find the Text2 child and set its text for (var i = 0; i < this.children.length; ++i) { if (this.children[i] instanceof Text2) { this.children[i].setText(txt); break; } } }; // --- Start the UI --- showVersionButtons(); // No update loop or other game logic needed for this MVP // No GUI elements needed // No sounds, music, or other effects per requirements;
/****
* Classes
****/
// No plugins needed for this game
// Button class: a simple rectangular button with centered text
var BlueButton = Container.expand(function () {
var self = Container.call(this);
// Button dimensions
var btnWidth = 600;
var btnHeight = 200;
// Create button background (rounded rectangle using ellipse for corners)
var btnBg = self.attachAsset('buttonBg', {
width: btnWidth,
height: btnHeight,
color: 0x1e90ff,
// Dodger blue
shape: 'box',
anchorX: 0.5,
anchorY: 0.5
});
// Button label
var btnLabel = new Text2('PRESS ME', {
size: 90,
fill: 0xFFFFFF
});
btnLabel.anchor.set(0.5, 0.5);
btnLabel.x = 0;
btnLabel.y = 0;
self.addChild(btnLabel);
// Optional: visual feedback on press
self.down = function (x, y, obj) {
btnBg.alpha = 0.7;
};
self.up = function (x, y, obj) {
btnBg.alpha = 1;
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xffffff // Start with white background
});
/****
* Game Code
****/
// Set initial background color (white)
game.setBackgroundColor(0xffffff);
// --- Windows Version Data ---
var windowsVersions = [{
name: "Windows 1.0",
color: 0x0000aa,
face: "",
text: "Unexpected system error.\n\nPlease restart your computer.\n\nPress any key to continue _",
textSize: 60
},
// --- Windows 2.0 ---
{
name: "Windows 2.0",
color: 0x0000aa,
face: "",
text: "System Error\n\nAn error has occurred in Windows 2.0.\n\nPlease restart your computer by pressing CTRL+ALT+DEL.\n\nPress any key to continue _",
textSize: 60
}, {
name: "Windows 95",
color: 0x0000aa,
face: "",
text: "A fatal exception 0E has occurred at 0028:C0011E36 in VXD VMM(01) +\n00010E36. The current application will be terminated.\n\n* Press any key to terminate the current application.\n* Press CTRL+ALT+DEL again to restart your computer. You will\n lose any unsaved information in all applications.\n\nPress any key to continue _",
textSize: 60
}, {
name: "Windows 98",
color: 0x0000aa,
face: "",
text: "A fatal exception 0E has occurred at 0028:C183:00000000 in VXD VMM(01) +\n00000000. The current application will be terminated.\n\n* Press any key to terminate the current application.\n* Press CTRL+ALT+DEL again to restart your computer. You will\n lose any unsaved information in all applications.\n\nPress any key to continue _",
textSize: 60
}, {
name: "Windows NT",
color: 0x000080,
face: "",
text: "*** STOP: 0x0000001E (0xC0000005,0x00000000,0x00000000,0x00000000)\nKMODE_EXCEPTION_NOT_HANDLED\n\nIf this is the first time you've seen this Stop error screen,\nrestart your computer. If this screen appears again, follow\nthese steps:\n\nCheck to make sure any new hardware or software is properly installed.\nIf this is a new installation, ask your hardware or software manufacturer\nfor any Windows NT updates you might need.\n\nIf problems continue, disable or remove any newly installed hardware\nor software. Disable BIOS memory options such as caching or shadowing.\nIf you need to use Safe Mode to remove or disable components, restart\nyour computer, press F8 to select Advanced Startup Options, and then\nselect Safe Mode.",
textSize: 48
}, {
name: "Windows XP",
color: 0x00008b,
face: "",
text: "A problem has been detected and Windows has been shut down to prevent damage\nto your computer.\n\nIf this is the first time you've seen this Stop error screen,\nrestart your computer. If this screen appears again, follow\nthese steps:\n\nCheck to make sure any new hardware or software is properly installed.\nIf this is a new installation, ask your hardware or software manufacturer\nfor any Windows updates you might need.\n\nIf problems continue, disable or remove any newly installed hardware\nor software. Disable BIOS memory options such as caching or shadowing.\nIf you need to use Safe Mode to remove or disable components, restart\nyour computer, press F8 to select Advanced Startup Options, and then\nselect Safe Mode.\n\nTechnical information:\n*** STOP: 0x0000007B (0xF78D2524,0xC0000034,0x00000000,0x00000000)",
textSize: 48
}, {
name: "Windows 7",
color: 0x0000aa,
face: "",
text: "A problem has been detected and Windows has been shut down to prevent damage\nto your computer.\n\nIf this is the first time you've seen this Stop error screen,\nrestart your computer. If this screen appears again, follow\nthese steps:\n\nCheck to make sure any new hardware or software is properly installed.\nIf this is a new installation, ask your hardware or software manufacturer\nfor any Windows updates you might need.\n\nIf problems continue, disable or remove any newly installed hardware\nor software. Disable BIOS memory options such as caching or shadowing.\nIf you need to use Safe Mode to remove or disable components, restart\nyour computer, press F8 to select Advanced Startup Options, and then\nselect Safe Mode.\n\nTechnical information:\n*** STOP: 0x0000007E (0xFFFFFFFFC0000005,0xFFFFF80002F8A16A,0xFFFFF880009A8C28,0xFFFFF880009A8480)",
textSize: 48
}, {
name: "Windows 10",
color: 0x0078d7,
face: ":(",
text: "Your PC ran into a problem and needs to restart.\nWe're just collecting some error info, and then we'll restart for you.\n\nFor more information about this issue and possible fixes, visit\nhttps://www.windows.com/stopcode\n\nIf you call a support person, give them this info:\nSTOP CODE: FRVR_GAME_CRASHED",
textSize: 60
}, {
name: "Windows 11",
color: 0x003399,
face: ":(",
text: "Your device ran into a problem and needs to restart.\nWe're just collecting some error info, and then we'll restart for you.\n\nFor more information about this issue and possible fixes, visit\nhttps://www.windows.com/stopcode\n\nIf you call a support person, give them this info:\nSTOP CODE: FRVR_GAME_CRASHED",
textSize: 60
},
// Unreleased versions
{
name: "Windows 12 (Unreleased)",
color: 0x2222cc,
face: ":(",
text: "Your device ran into a problem and needs to restart.\nWe're just collecting some error info, and then we'll restart for you.\n\nFor more information about this issue and possible fixes, visit\nhttps://www.windows.com/stopcode\n\nIf you call a support person, give them this info:\nSTOP CODE: FRVR_UNRELEASED_BUILD",
textSize: 60
}, {
name: "Windows Neptune (Unreleased)",
color: 0x003366,
face: "",
text: "A problem has been detected and Windows Neptune has been shut down to prevent damage\nto your computer.\n\nIf this is the first time you've seen this Stop error screen,\nrestart your computer. If this screen appears again, follow\nthese steps:\n\nCheck to make sure any new hardware or software is properly installed.\nIf this is a new installation, ask your hardware or software manufacturer\nfor any Windows updates you might need.\n\nTechnical information:\n*** STOP: 0x0000007E (0xFFFFFFFFC0000005,0xFFFFF80002F8A16A,0xFFFFF880009A8C28,0xFFFFF880009A8480)",
textSize: 48
}, {
name: "Windows Longhorn (Unreleased)",
color: 0x004488,
face: "",
text: "A problem has been detected and Windows Longhorn has been shut down to prevent damage\nto your computer.\n\nIf this is the first time you've seen this Stop error screen,\nrestart your computer. If this screen appears again, follow\nthese steps:\n\nCheck to make sure any new hardware or software is properly installed.\nIf this is a new installation, ask your hardware or software manufacturer\nfor any Windows updates you might need.\n\nTechnical information:\n*** STOP: 0xDEADDEAD (0x00000000,0x00000000,0x00000000,0x00000000)",
textSize: 48
}];
// --- UI State ---
var versionButtons = [];
var versionSelectButtons = [];
var selectedVersionIdx = null;
// --- Helper: Remove all children except version buttons ---
function clearScreenExceptVersionBtns() {
for (var i = game.children.length - 1; i >= 0; i--) {
var child = game.children[i];
if (versionButtons.indexOf(child) === -1 && versionSelectButtons.indexOf(child) === -1) {
child.destroy();
}
}
}
// --- Step 1: Show version selection buttons ---
function showVersionButtons() {
// Remove any previous version select buttons
for (var i = 0; i < versionSelectButtons.length; ++i) {
versionSelectButtons[i].destroy();
}
versionSelectButtons = [];
// Remove any blue screen or other overlays
clearScreenExceptVersionBtns();
// Remove old version buttons
for (var i = 0; i < versionButtons.length; ++i) {
versionButtons[i].destroy();
}
versionButtons = [];
// Layout: vertical stack, centered
var btnW = 700,
btnH = 200,
spacing = 60;
var totalH = windowsVersions.length * btnH + (windowsVersions.length - 1) * spacing;
var startY = (2732 - totalH) / 2 + btnH / 2;
for (var i = 0; i < windowsVersions.length; ++i) {
(function (idx) {
var btn = new BlueButton();
btn.setLabel(windowsVersions[idx].name);
btn.x = 2048 / 2;
btn.y = startY + i * (btnH + spacing);
btn.visible = true;
btn.alpha = 1;
btn.up = function (x, y, obj) {
showVersionSelect(idx);
};
game.addChild(btn);
versionButtons.push(btn);
})(i);
}
// --- Scroll Bar and Buttons for Home/Version List ---
// Place scroll bar and buttons in a horizontal row at the right edge, vertically centered with the version list
var scrollBarW = 80;
var scrollBarH = 1200; // Will be resized dynamically
var scrollBarX = 2048 - scrollBarW - 32 - 340 - 24; // leave space for buttons to the right
var scrollBarY = (2732 - 1200) / 2; // vertically centered
// Container to hold scroll bar and buttons side by side
var scrollBarRow = new Container();
scrollBarRow.x = scrollBarX;
scrollBarRow.y = scrollBarY;
game.addChild(scrollBarRow);
versionButtons.push(scrollBarRow);
var scrollBarTrack = new Container();
var scrollBarBg = LK.getAsset('buttonBg', {
width: scrollBarW,
height: 400,
color: 0x222244,
anchorX: 0.5,
anchorY: 0
});
scrollBarBg.x = scrollBarW / 2;
scrollBarBg.y = 0;
scrollBarTrack.addChild(scrollBarBg);
scrollBarTrack.x = 0;
scrollBarTrack.y = 0;
scrollBarRow.addChild(scrollBarTrack);
var scrollBarThumb = LK.getAsset('buttonBg', {
width: scrollBarW - 12,
height: 200,
color: 0xff2222,
anchorX: 0.5,
anchorY: 0
});
scrollBarThumb.x = scrollBarW / 2;
scrollBarThumb.y = 0;
scrollBarTrack.addChild(scrollBarThumb);
// Helper to create a red button with label
function createScrollBtn(label) {
var btn = new Container();
var bg = LK.getAsset('buttonBg', {
width: 340,
height: 120,
color: 0xff2222,
anchorX: 0.5,
anchorY: 0.5
});
btn.addChild(bg);
var txt = new Text2(label, {
size: 48,
fill: 0xffffff
});
txt.anchor.set(0.5, 0.5);
txt.x = 0;
txt.y = 0;
btn.addChild(txt);
btn.down = function () {
bg.alpha = 0.7;
};
btn.up = function () {
bg.alpha = 1;
};
return btn;
}
// Create a container to hold the up/down buttons vertically
var scrollBtnCol = new Container();
scrollBtnCol.x = scrollBarW + 24; // to the right of the scroll bar
scrollBtnCol.y = 0;
scrollBarRow.addChild(scrollBtnCol);
// Scroll state for version list
var versionListScrollOffset = 0;
var versionListBtnH = btnH;
var versionListSpacing = spacing;
var versionListVisibleCount = Math.floor(1200 / (btnH + spacing));
var versionListMaxOffset = 0;
var versionListMinOffset = Math.min(0, (windowsVersions.length - versionListVisibleCount) * (btnH + spacing));
// Scroll Up button
var scrollUpBtn = createScrollBtn("Scroll Up");
scrollUpBtn.x = 340 / 2;
scrollUpBtn.y = 120 / 2;
scrollBtnCol.addChild(scrollUpBtn);
versionButtons.push(scrollUpBtn);
// Scroll Down button
var scrollDownBtn = createScrollBtn("Scroll Down");
scrollDownBtn.x = 340 / 2;
scrollDownBtn.y = 120 * 1.5 + 32;
scrollBtnCol.addChild(scrollDownBtn);
versionButtons.push(scrollDownBtn);
// Helper to update version button positions based on scroll offset
function updateVersionButtonPositions() {
for (var i = 0; i < versionButtons.length; ++i) {
var btn = versionButtons[i];
// Only update BlueButton instances (the version select buttons)
if (btn instanceof BlueButton) {
var idx = windowsVersions.findIndex(function (v) {
return v.name === btn.children[0].text;
});
if (idx !== -1) {
btn.y = startY + idx * (btnH + spacing) + versionListScrollOffset;
// Hide buttons that are out of visible scroll area
if (btn.y < startY - btnH || btn.y > startY + versionListVisibleCount * (btnH + spacing)) {
btn.visible = false;
} else {
btn.visible = true;
}
}
}
}
// Move the thumb
var scrollRange = versionListMaxOffset - versionListMinOffset;
var thumbRange = 400 - scrollBarThumb.height;
var thumbY = 0;
if (scrollRange > 0) {
thumbY = Math.round(-versionListScrollOffset / scrollRange * thumbRange);
}
scrollBarThumb.y = thumbY;
}
// Scroll up/down button logic
// Move the whole version list screen up/down by shifting all versionButtons and scrollBarRow
scrollUpBtn.up = function () {
// Move everything up by a small step
for (var i = 0; i < versionButtons.length; ++i) {
var btn = versionButtons[i];
btn.y -= Math.round((btnH + spacing) * 0.15);
}
// Also move the scrollBarRow up
scrollBarRow.y -= Math.round((btnH + spacing) * 0.15);
};
scrollDownBtn.up = function () {
// Move everything down by a small step
for (var i = 0; i < versionButtons.length; ++i) {
var btn = versionButtons[i];
btn.y += Math.round((btnH + spacing) * 0.15);
}
// Also move the scrollBarRow down
scrollBarRow.y += Math.round((btnH + spacing) * 0.15);
};
// Allow dragging the scroll thumb
var thumbDragStartY = null;
var thumbDragStartOffset = null;
scrollBarThumb.down = function (x, y, obj) {
thumbDragStartY = y;
thumbDragStartOffset = versionListScrollOffset;
};
scrollBarThumb.move = function (x, y, obj) {
if (thumbDragStartY !== null) {
var dy = y - thumbDragStartY;
var scrollRange = versionListMaxOffset - versionListMinOffset;
var thumbRange = 400 - scrollBarThumb.height;
if (thumbRange > 0) {
var scrollDelta = -dy * (scrollRange / thumbRange);
versionListScrollOffset = thumbDragStartOffset + scrollDelta;
if (versionListScrollOffset > versionListMaxOffset) versionListScrollOffset = versionListMaxOffset;
if (versionListScrollOffset < versionListMinOffset) versionListScrollOffset = versionListMinOffset;
updateVersionButtonPositions();
}
}
};
scrollBarThumb.up = function (x, y, obj) {
thumbDragStartY = null;
thumbDragStartOffset = null;
};
// Initial update
updateVersionButtonPositions();
}
// --- Step 2: Show "See Blue Screen" button for selected version ---
function showVersionSelect(idx) {
// Remove version buttons
for (var i = 0; i < versionButtons.length; ++i) {
versionButtons[i].destroy();
}
versionButtons = [];
// Remove any previous select buttons
for (var i = 0; i < versionSelectButtons.length; ++i) {
versionSelectButtons[i].destroy();
}
versionSelectButtons = [];
clearScreenExceptVersionBtns();
selectedVersionIdx = idx;
var version = windowsVersions[idx];
// Show version name as title
var title = new Text2(version.name, {
size: 120,
fill: 0x222222
});
title.anchor.set(0.5, 0.5);
title.x = 2048 / 2;
title.y = 2732 / 2 - 300;
game.addChild(title);
versionSelectButtons.push(title);
// Show "See Blue Screen" button
var seeBtn = new BlueButton();
seeBtn.setLabel("See Blue Screen");
seeBtn.x = 2048 / 2;
seeBtn.y = 2732 / 2 + 100;
seeBtn.visible = true;
seeBtn.alpha = 1;
seeBtn.up = function (x, y, obj) {
showBlueScreen(idx);
};
game.addChild(seeBtn);
versionSelectButtons.push(seeBtn);
// --- Scroll Bar and Buttons for Home/Version Select ---
// Place scroll bar and buttons in a horizontal row at the right edge, just right of the title
var scrollBarW = 80;
var scrollBarH = 1200; // Will be resized dynamically
var scrollBarX = 2048 - scrollBarW - 32 - 340 - 24; // leave space for buttons to the right
var scrollBarY = 2732 / 2 - 300 + 60; // below the title
// Container to hold scroll bar and buttons side by side
var scrollBarRow = new Container();
scrollBarRow.x = scrollBarX;
scrollBarRow.y = scrollBarY;
game.addChild(scrollBarRow);
versionSelectButtons.push(scrollBarRow);
var scrollBarTrack = new Container();
var scrollBarBg = LK.getAsset('buttonBg', {
width: scrollBarW,
height: 400,
color: 0x222244,
anchorX: 0.5,
anchorY: 0
});
scrollBarBg.x = scrollBarW / 2;
scrollBarBg.y = 0;
scrollBarTrack.addChild(scrollBarBg);
scrollBarTrack.x = 0;
scrollBarTrack.y = 0;
scrollBarRow.addChild(scrollBarTrack);
var scrollBarThumb = LK.getAsset('buttonBg', {
width: scrollBarW - 12,
height: 200,
color: 0xff2222,
anchorX: 0.5,
anchorY: 0
});
scrollBarThumb.x = scrollBarW / 2;
scrollBarThumb.y = 0;
scrollBarTrack.addChild(scrollBarThumb);
// Helper to create a red button with label
function createScrollBtn(label) {
var btn = new Container();
var bg = LK.getAsset('buttonBg', {
width: 340,
height: 120,
color: 0xff2222,
anchorX: 0.5,
anchorY: 0.5
});
btn.addChild(bg);
var txt = new Text2(label, {
size: 48,
fill: 0xffffff
});
txt.anchor.set(0.5, 0.5);
txt.x = 0;
txt.y = 0;
btn.addChild(txt);
btn.down = function () {
bg.alpha = 0.7;
};
btn.up = function () {
bg.alpha = 1;
};
return btn;
}
// Create a container to hold the up/down buttons vertically
var scrollBtnCol = new Container();
scrollBtnCol.x = scrollBarW + 24; // to the right of the scroll bar
scrollBtnCol.y = 0;
scrollBarRow.addChild(scrollBtnCol);
// Scroll Up button
var scrollUpBtn = createScrollBtn("Scroll Up");
scrollUpBtn.x = 340 / 2;
scrollUpBtn.y = 120 / 2;
scrollBtnCol.addChild(scrollUpBtn);
versionSelectButtons.push(scrollUpBtn);
// Scroll Down button
var scrollDownBtn = createScrollBtn("Scroll Down");
scrollDownBtn.x = 340 / 2;
scrollDownBtn.y = 120 * 1.5 + 32;
scrollBtnCol.addChild(scrollDownBtn);
versionSelectButtons.push(scrollDownBtn);
// Show "Back" button
var backBtn = new BlueButton();
backBtn.setLabel("Back");
backBtn.x = 2048 / 2;
backBtn.y = 2732 / 2 + 350;
backBtn.visible = true;
backBtn.alpha = 1;
backBtn.up = function (x, y, obj) {
showVersionButtons();
};
game.addChild(backBtn);
versionSelectButtons.push(backBtn);
}
// --- Step 3: Show blue screen for selected version ---
function showBlueScreen(idx) {
// Remove all UI
for (var i = 0; i < versionButtons.length; ++i) {
versionButtons[i].destroy();
}
versionButtons = [];
for (var i = 0; i < versionSelectButtons.length; ++i) {
versionSelectButtons[i].destroy();
}
versionSelectButtons = [];
clearScreenExceptVersionBtns();
var version = windowsVersions[idx];
// Set background color
game.setBackgroundColor(version.color);
// Show sad face if present
if (version.face) {
var sadFace = new Text2(version.face, {
size: 400,
fill: 0xFFFFFF
});
sadFace.anchor.set(0.5, 0.5);
sadFace.x = 2048 / 2;
sadFace.y = 2732 / 2 - 350;
game.addChild(sadFace);
}
// Create a scrollable container for the blue screen text
var scrollContainer = new Container();
scrollContainer.x = 0;
scrollContainer.y = 0;
game.addChild(scrollContainer);
// Show blue screen text inside the scrollable container
var bsodText = new Text2(version.text, {
size: version.textSize,
fill: 0xFFFFFF,
align: "center"
});
bsodText.anchor.set(0.5, 0);
bsodText.x = 2048 / 2;
bsodText.y = 2732 / 2 + 50;
scrollContainer.addChild(bsodText);
// Set up scrolling state
var scrollStartY = null;
var scrollLastY = null;
var scrollOffsetY = 0;
var scrollMinY = Math.min(0, 2732 - (bsodText.y + bsodText.height + 100));
var scrollMaxY = 0;
// Touch/mouse down to start scroll
scrollContainer.down = function (x, y, obj) {
scrollStartY = y;
scrollLastY = y;
};
// Touch/mouse move to scroll
scrollContainer.move = function (x, y, obj) {
if (scrollStartY !== null) {
var deltaY = y - scrollLastY;
scrollOffsetY += deltaY;
// Clamp scroll
if (scrollOffsetY < scrollMinY) scrollOffsetY = scrollMinY;
if (scrollOffsetY > scrollMaxY) scrollOffsetY = scrollMaxY;
bsodText.y = 2732 / 2 + 50 + scrollOffsetY;
scrollLastY = y;
}
};
// Touch/mouse up to end scroll
scrollContainer.up = function (x, y, obj) {
scrollStartY = null;
scrollLastY = null;
};
// Forward game move/down/up events to scrollContainer if inside text area
var origGameDown = game.down;
var origGameMove = game.move;
var origGameUp = game.up;
game.down = function (x, y, obj) {
// Only allow scroll if inside bsodText area
var local = bsodText.toLocal({
x: x,
y: y
}, game);
if (x >= bsodText.x - bsodText.width / 2 && x <= bsodText.x + bsodText.width / 2 && y >= bsodText.y && y <= bsodText.y + bsodText.height) {
if (scrollContainer.down) scrollContainer.down(x, y, obj);
} else if (origGameDown) {
origGameDown(x, y, obj);
}
};
game.move = function (x, y, obj) {
if (scrollStartY !== null) {
if (scrollContainer.move) scrollContainer.move(x, y, obj);
} else if (origGameMove) {
origGameMove(x, y, obj);
}
};
game.up = function (x, y, obj) {
if (scrollStartY !== null) {
if (scrollContainer.up) scrollContainer.up(x, y, obj);
} else if (origGameUp) {
origGameUp(x, y, obj);
}
};
// Show "Back" button to return to version select
var backBtn = new BlueButton();
backBtn.setLabel("Back");
backBtn.x = 2048 / 2;
backBtn.y = 2732 - 250;
backBtn.visible = true;
backBtn.alpha = 1;
backBtn.up = function (x, y, obj) {
showVersionSelect(idx);
};
game.addChild(backBtn);
versionSelectButtons.push(backBtn);
}
// --- BlueButton: add setLabel method ---
BlueButton.prototype.setLabel = function (txt) {
// Find the Text2 child and set its text
for (var i = 0; i < this.children.length; ++i) {
if (this.children[i] instanceof Text2) {
this.children[i].setText(txt);
break;
}
}
};
// --- Start the UI ---
showVersionButtons();
// No update loop or other game logic needed for this MVP
// No GUI elements needed
// No sounds, music, or other effects per requirements;