diff --git a/README.md b/README.md index 8847f830..6b4e7fd3 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ - **Custom Levels** - Some custom levels added in the main menu such as The Nightmare, Bloodbath, Nine Circles, and more! - **Icon kit** - A working Icon Kit with different colors and icons to choose from! - **Different Gamemodes** - Multiple working gamemodes such as the Ball, Wave, Cube, UFO, Mini portals and Speed portals! -- **Extra Settings** - You can enable and disable Noclip or Show Hitboxes from the pause menu in a level, along with other settings, like the level percentage! -- **Account System** - You can save/load all level progress, and upload it to the cloud to keep your progress on different devices! +- **Extra Settings** - You can enable and disable Noclip, Show Hitboxes, or Low Detailed Mode from the pause menu in a level, along with other settings, like the level percentage! +- **Account System** - You can save/load all level progress, and upload it to the cloud to keep your progress on different devices! (Broken) ## Things currently in development: - **Practice Mode** - Although a early version of Practice mode is already in the game, we hope to make a completely working Practice Mode with no bugs at all. @@ -54,7 +54,7 @@ ### Come try out the WIP Web Dashers demo at: **[web-dashers.github.io](https://web-dashers.github.io/)** -*(Last updated 5/16/2026)* +*(Last updated 5/27/2026)* --- > - Special thanks to all of the people that help the project by contributing, and Please support us by starring the repo, as it helps us out a ton!! > - Also, please report bugs found to the Discord server or the Issues page on github, just please dont be annoying about it, and don't make bug reports about bugs already being worked on or ones that are already known about. diff --git a/assets/scripts/core/game-scene.js b/assets/scripts/core/game-scene.js index ce52c4fa..26161d6e 100644 --- a/assets/scripts/core/game-scene.js +++ b/assets/scripts/core/game-scene.js @@ -373,8 +373,10 @@ class GameScene extends Phaser.Scene { } }); this._level.additiveContainer.add(this._glitterEmitter); - this._bg.setTint(this._colorManager.getHex(fs)); - this._level.setGroundColor(this._colorManager.getHex(gs)); + this._staticBgColor = this._colorManager.getHex(fs); + this._staticGroundColor = this._colorManager.getHex(gs); + this._bg.setTint(this._staticBgColor); + this._level.setGroundColor(this._staticGroundColor); this._level.additiveContainer.setVisible(false); this._level.container.setVisible(false); this._level.topContainer.setVisible(false); @@ -494,6 +496,7 @@ this._menuUpdateLogBtn = this.add.image(screenWidth - 30 - 50, 33, "GJ_WebSheet" frequency: 35, blendMode: S, tint: 20670, + emitting: !(window.isLowDetailMode && window.isLowDetailMode()), x: { min: -130, max: 130 @@ -3141,6 +3144,10 @@ this._menuUpdateLogBtn = this.add.image(screenWidth - 30 - 50, 33, "GJ_WebSheet" this._restartLevel(); } toggleGlitter(_0x34c21a) { + if (window.isLowDetailMode && window.isLowDetailMode()) { + if (this._glitterEmitter) this._glitterEmitter.stop(); + return; + } if (_0x34c21a) { this._glitterEmitter.start(); } else { @@ -3608,6 +3615,36 @@ _buildSettingsPopup() { () => window.showCPS, (v) => window.showCPS = v ); + + createToggle(container, column2X, startY, "Low Detail Mode", + () => window.lowDetailMode, + (v) => { + if (window.setLowDetailMode) window.setLowDetailMode(v); + else window.lowDetailMode = v; + if (v) { + if (this._glitterEmitter) this._glitterEmitter.stop(); + if (this._menuGlitter) this._menuGlitter.stop(); + this._applyLowDetailVisualCuts?.(); + if (this._iconBtn) { + this.tweens.killTweensOf(this._iconBtn); + this._iconBtn.y = 320; + } + this._bg.setTint(this._staticBgColor ?? this._colorManager.getHex(fs)); + this._level.setGroundColor(this._staticGroundColor ?? this._colorManager.getHex(gs)); + if (this._orbGfx) this._orbGfx.clear(); + this._player?._updateParticles?.(this._cameraX, this._cameraY, 0); + this._player2?._updateParticles?.(this._cameraX, this._cameraY, 0); + } else { + this._ldmVisualsCleared = false; + if (!this._menuActive && this._level?.additiveContainer) { + this._level.additiveContainer.setVisible(true); + } + if (this._menuActive && this._menuGlitter) { + this._menuGlitter.start(); + } + } + } + ); }; const buildPage = (idx) => { @@ -3631,13 +3668,17 @@ _buildSettingsPopup() { currentPage = (currentPage + 1) % pages.length; buildPage(currentPage); }); - this.tweens.add({ - targets: innerContainer, - scale: 1, - duration: 660, - ease: "Elastic.Out", - easeParams: [1, 0.6] - }); + if (window.isLowDetailMode && window.isLowDetailMode()) { + innerContainer.setScale(1); + } else { + this.tweens.add({ + targets: innerContainer, + scale: 1, + duration: 660, + ease: "Elastic.Out", + easeParams: [1, 0.6] + }); + } } _saveSettings() { const settings = { @@ -3654,7 +3695,8 @@ _buildSettingsPopup() { showCPS: window.showCPS, speedHack: window.speedHack, macroBot: window.macroBot, - showEditorGlow: window.showEditorGlow + showEditorGlow: window.showEditorGlow, + lowDetailMode: window.lowDetailMode }; localStorage.setItem("gd_settings", JSON.stringify(settings)); } @@ -3674,7 +3716,8 @@ _buildSettingsPopup() { showCPS: false, speedHack: 1.0, macroBot: false, - showEditorGlow: false + showEditorGlow: false, + lowDetailMode: window.lowDetailMode === false }; const data = saved ? JSON.parse(saved) : defaults; @@ -3693,6 +3736,14 @@ _buildSettingsPopup() { window.speedHack = data.speedHack; window.macroBot = data.macroBot; window.showEditorGlow = data.showEditorGlow; + if (window.setLowDetailMode) window.setLowDetailMode(data.lowDetailMode === true); + else window.lowDetailMode = data.lowDetailMode === true; + if (window.lowDetailMode) { + if (this._menuGlitter) this._menuGlitter.stop(); + if (this._glitterEmitter) this._glitterEmitter.stop(); + if (this._orbGfx) this._orbGfx.clear(); + this._applyLowDetailVisualCuts?.(); + } } _buildMacroPopup() { if (this._macroPopup) return; @@ -3896,7 +3947,7 @@ _buildSettingsPopup() { { text: "breadbb, PinkDev, rohanis0000,", scale: 0.7, font: "goldFont" }, { text: "bog, AntiMatter, arbstro, aloaf", scale: 0.7, font: "goldFont" }, { text: "Contributors:", scale: 0.9, font: "bigFont" }, - { text: "t0nchi7 and Lasokar.", scale: 0.7, font: "goldFont" }, + { text: "t0nchi7, Lasokar, POW_Boy1", scale: 0.7, font: "goldFont" }, { text: "© 2026 RobTop Games. All rights reserved.", scale: 0.4, font: "Arial", color: 0x000000 }, ]; let yPos = 0; @@ -4193,8 +4244,8 @@ _buildSettingsPopup() { */ const updateEntries = [ { text: "Update Log", scale: 0.85, font: "goldFont" }, - { text: "Accurate GDWeb+ logo", scale: 0.65 }, - { text: "Credit to Altruist for making it", scale: 0.6 }, + { text: "Added Low Detail Mode", scale: 0.65 }, + { text: "Credits to POWBoy1/POW_Boy1 for making it", scale: 0.5 }, { text: "is this update finally out?", scale: 0.65, color: 0xaaddff }, { text: "- rohanis0000", scale: 0.65, color: 0xaaddff }, ]; @@ -4405,6 +4456,10 @@ _buildSettingsPopup() { textureX.on("pointerdown", () => { if (!_0xda0c21 || !!_0xda0c21()) { textureX._pressed = true; + if (window.isLowDetailMode && window.isLowDetailMode()) { + textureX.setScale(_0x57b645); + return; + } this.tweens.killTweensOf(textureX, "scale"); this.tweens.add({ targets: textureX, @@ -4417,6 +4472,10 @@ _buildSettingsPopup() { textureX.on("pointerout", (pointer) => { if (textureX._pressed) { textureX._pressed = false; + if (window.isLowDetailMode && window.isLowDetailMode()) { + textureX.setScale(_0x57b645); + return; + } this.tweens.killTweensOf(textureX, "scale"); this.tweens.add({ targets: textureX, @@ -4446,6 +4505,20 @@ _buildSettingsPopup() { } catch (_0x22124f) {} } } + _applyLowDetailVisualCuts() { + if (!this._level) return; + this._level.clearPulseEffects?.(); + this._level.clearAlphaEffects?.(); + this._level.clearEnterEffects?.(); + if (this._level.additiveContainer) { + this._level.additiveContainer.setVisible(false); + } + if (this._bg) { + this._bg.setTint(this._staticBgColor ?? this._colorManager.getHex(fs)); + } + this._level.setGroundColor(this._staticGroundColor ?? this._colorManager.getHex(gs)); + this._ldmVisualsCleared = true; + } _drawScale9(_0x147730, _0x4c8cbf, scaleWidth, scaleHeight, _0x24a44b, borderSize, _0x590eba, _0x206735) { const _0x4080b2 = this.add.container(_0x147730, _0x4c8cbf); const _0x2522df = this.textures.get(_0x24a44b); @@ -4963,14 +5036,16 @@ _buildSettingsPopup() { this._iconBtn.x = (screenWidth / 2) - this._playBtn.width / 2 - 100 - (this._iconBtn.width * this._iconBtn.scaleX) / 2; this.tweens.killTweensOf(this._iconBtn, "y"); this._iconBtn.y = 320; - this.tweens.add({ - targets: this._iconBtn, - y: 324, - duration: 750, - ease: "Quad.InOut", - yoyo: true, - repeat: -1 - }); + if (!(window.isLowDetailMode && window.isLowDetailMode())) { + this.tweens.add({ + targets: this._iconBtn, + y: 324, + duration: 750, + ease: "Quad.InOut", + yoyo: true, + repeat: -1 + }); + } } if (this._creatorBtn) { this._creatorBtn.x = (screenWidth / 2) + this._playBtn.width / 2 + 100 + (this._creatorBtn.width * this._creatorBtn.scaleX) / 2; @@ -5348,6 +5423,10 @@ _buildSettingsPopup() { } } _updateBackground() { + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._prevCameraX = this._cameraX; + return; + } this._bg.tilePositionX += (this._cameraX - this._prevCameraX) * this._bgSpeedX; this._prevCameraX = this._cameraX; this._bg.tilePositionY = this._bgInitY - this._cameraY * this._bgSpeedY; @@ -5522,6 +5601,12 @@ _buildSettingsPopup() { } this._arrowWasDown = _arrowLeft || _arrowRight; this._spaceWasDown = this._spaceKey.isDown || this._upKey.isDown || this._wKey.isDown || this._lKey.isDown; + if (window.isLowDetailMode && window.isLowDetailMode()) { + if (this._menuGlitter) this._menuGlitter.stop(); + this._bg.setTint(this._staticBgColor ?? this._colorManager.getHex(fs)); + this._level.setGroundColor(this._staticGroundColor ?? this._colorManager.getHex(gs)); + return; + } const menuDelta = Math.min(deltaTime / 1000 * 60, 2); const menuSpeed = 0.85; this._menuCameraX = (this._menuCameraX || 0) + menuDelta * playerSpeed * d * menuSpeed; @@ -5689,16 +5774,18 @@ _buildSettingsPopup() { this._playTime += deltaTime / 1000; this._audio.update(deltaTime / 1000); - window._animTimer += deltaTime; - for (let _as of window._animatedSprites) { - if (window._animTimer - (_as._lastAnimSwap || 0) >= _as._animInterval) { - _as._lastAnimSwap = window._animTimer; - _as._animIdx = (_as._animIdx + 1) % _as._animFrames.length; - let _fr = getAtlasFrame(_as._animScene, _as._animFrames[_as._animIdx]); - if (_fr) { - try { - _as.setTexture(_fr.atlas, _fr.frame); - } catch(e){} + if (!(window.isLowDetailMode && window.isLowDetailMode())) { + window._animTimer += deltaTime; + for (let _as of window._animatedSprites) { + if (window._animTimer - (_as._lastAnimSwap || 0) >= _as._animInterval) { + _as._lastAnimSwap = window._animTimer; + _as._animIdx = (_as._animIdx + 1) % _as._animFrames.length; + let _fr = getAtlasFrame(_as._animScene, _as._animFrames[_as._animIdx]); + if (_fr) { + try { + _as.setTexture(_fr.atlas, _fr.frame); + } catch(e){} + } } } } @@ -5708,10 +5795,15 @@ _buildSettingsPopup() { if (_saw && _saw.active) _saw.rotation += sawRotation; } } - this._level.updateAudioScale(this._audio.getMeteringValue()); + if (!(window.isLowDetailMode && window.isLowDetailMode())) { + this._level.updateAudioScale(this._audio.getMeteringValue()); + } if (!this._orbGfx) { this._orbGfx = this.add.graphics().setDepth(54).setBlendMode(S); } + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._orbGfx.clear(); + } else { this._orbParticleAngle = ((this._orbParticleAngle || 0) + deltaTime * 0.004) % (Math.PI * 2); this._orbGfxTimer = (this._orbGfxTimer || 0) + deltaTime; if (this._orbGfxTimer > 33) { @@ -5755,6 +5847,7 @@ _buildSettingsPopup() { } catch(e) {} } } + } let quantizedDelta = this._quantizeDelta(deltaTime); let subSteps = quantizedDelta > 0 ? Math.max(1, Math.round(quantizedDelta * 4)) : 0; if (subSteps > 60) { @@ -5767,7 +5860,6 @@ _buildSettingsPopup() { for (let i = 0; i < subSteps; i++) { this._state.lastY = this._state.y; this._physicsFrame++; - console.log(this._physicsFrame) if (this._macroBot?.playing) { this._macroBot.step(this._physicsFrame); } @@ -5857,19 +5949,35 @@ if (!this._state.isFlying && !this._state.isWave && !this._state.isUfo) { } this._level.checkMoveTriggers(playerX); this._level.stepMoveTriggers(deltaTime / 1000); - this._level.checkAlphaTriggers(playerX); - this._level.stepAlphaTriggers(deltaTime / 1000); + if (window.isLowDetailMode && window.isLowDetailMode()) { + if (!this._ldmVisualsCleared) this._applyLowDetailVisualCuts(); + } else { + this._ldmVisualsCleared = false; + this._level.checkAlphaTriggers(playerX); + this._level.stepAlphaTriggers(deltaTime / 1000); + } this._level.checkRotateTriggers(playerX); this._level.stepRotateTriggers(deltaTime / 1000); - this._level.checkPulseTriggers(playerX); - this._level.stepPulseTriggers(deltaTime / 1000, this._colorManager); + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._level.clearPulseEffects(); + } else { + this._level.checkPulseTriggers(playerX); + this._level.stepPulseTriggers(deltaTime / 1000, this._colorManager); + } this._colorManager.step(deltaTime / 1000); this._level.applyColorChannels(this._colorManager); - this._bg.setTint(this._colorManager.getHex(fs)); - this._level.setGroundColor(this._colorManager.getHex(gs)); + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._bg.setTint(this._staticBgColor ?? this._colorManager.getHex(fs)); + this._level.setGroundColor(this._staticGroundColor ?? this._colorManager.getHex(gs)); + } else { + this._bg.setTint(this._colorManager.getHex(fs)); + this._level.setGroundColor(this._colorManager.getHex(gs)); + } this._level.updateVisibility(this._cameraX); - this._level.checkEnterEffectTriggers(playerX); - this._level.applyEnterEffects(this._cameraX); + if (!(window.isLowDetailMode && window.isLowDetailMode())) { + this._level.checkEnterEffectTriggers(playerX); + this._level.applyEnterEffects(this._cameraX); + } this._glitterCenterX = this._cameraX + screenWidth / 2; this._glitterCenterY = T - this._cameraY; this._updateBackground(); @@ -7547,37 +7655,46 @@ _applyMirrorEffect() { _showSettingsScreen() { this._settingsScreenClosing = false; if (this._pauseBtn) { - this.tweens.add({ - targets: this._pauseBtn, - alpha: 0, - duration: 300 - }); + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._pauseBtn.setAlpha(0); + } else { + this.tweens.add({ + targets: this._pauseBtn, + alpha: 0, + duration: 300 + }); + } } const containerX = screenWidth / 2; const _0x1aa656 = 320; this._settingsLayerOverlay = this.add.rectangle(containerX, _0x1aa656, screenWidth, screenHeight, 0, 0).setScrollFactor(0).setDepth(200).setInteractive(); this._settingsLayerInternal = this.add.container(0, -640).setScrollFactor(0).setDepth(201); this._settingsScreenClosing = false; - this.tweens.add({ - targets: this._settingsLayerOverlay, - alpha: 180 / 255, - duration: 400, - ease: "Linear" - }); + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._settingsLayerOverlay.setAlpha(180 / 255); + this._settingsLayerInternal.y = 10; + } else { + this.tweens.add({ + targets: this._settingsLayerOverlay, + alpha: 180 / 255, + duration: 400, + ease: "Linear" + }); - const _0x59b9ab = { - p: 0 - }; - this.tweens.add({ - targets: _0x59b9ab, - p: 1, - duration: 500, - ease: "Quad.Out", - onUpdate: () => { - this._settingsLayerInternal.y = _0x59b9ab.p * 650 - 640; - }, - onComplete: () => {} - }); + const _0x59b9ab = { + p: 0 + }; + this.tweens.add({ + targets: _0x59b9ab, + p: 1, + duration: 500, + ease: "Quad.Out", + onUpdate: () => { + this._settingsLayerInternal.y = _0x59b9ab.p * 650 - 640; + }, + onComplete: () => {} + }); + } const _0x595215 = 712; const _0x950c8d = 460; const _0x2a115c = (screenWidth - _0x595215) / 2; @@ -7622,12 +7739,20 @@ _applyMirrorEffect() { const pressedScale = baseScale * 1.26; hitZone.on("pointerdown", () => { hitZone._pressed = true; + if (window.isLowDetailMode && window.isLowDetailMode()) { + grp.setScale(baseScale); + return; + } this.tweens.killTweensOf(grp, "scale"); this.tweens.add({ targets: grp, scale: pressedScale, duration: 300, ease: "Bounce.Out" }); }); hitZone.on("pointerout", () => { if (hitZone._pressed) { hitZone._pressed = false; + if (window.isLowDetailMode && window.isLowDetailMode()) { + grp.setScale(baseScale); + return; + } this.tweens.killTweensOf(grp, "scale"); this.tweens.add({ targets: grp, scale: baseScale, duration: 400, ease: "Bounce.Out" }); } @@ -7734,6 +7859,9 @@ _applyMirrorEffect() { if (!this._settingsLayerInternal) { return; } + if (window.isLowDetailMode && window.isLowDetailMode()) { + return; + } const _0x4edc03 = containerX; const _0x5a0e9 = 200; const _0x453043 = this.add.image(_0x4edc03, _0x5a0e9, "GJ_WebSheet", "GJ_bigStar_001.png").setScale(3).setAlpha(0); @@ -7764,13 +7892,21 @@ _applyMirrorEffect() { } if (this._pauseBtn) { - this.tweens.add({ - targets: this._pauseBtn, - alpha: 1, - duration: 300 - }); + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._pauseBtn.setAlpha(1); + } else { + this.tweens.add({ + targets: this._pauseBtn, + alpha: 1, + duration: 300 + }); + } } }; + if (window.isLowDetailMode && window.isLowDetailMode()) { + _0x272eb1(); + return; + } this.tweens.add({ targets: this._settingsLayerOverlay, alpha: 0, @@ -7794,33 +7930,42 @@ _applyMirrorEffect() { } _showStatsScreen() { if (this._pauseBtn) { - this.tweens.add({ - targets: this._pauseBtn, - alpha: 0, - duration: 300 - }); + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._pauseBtn.setAlpha(0); + } else { + this.tweens.add({ + targets: this._pauseBtn, + alpha: 0, + duration: 300 + }); + } } const containerX = screenWidth / 2; const _0x1aa656 = 320; this._statsLayerOverlay = this.add.rectangle(containerX, _0x1aa656, screenWidth, screenHeight, 0, 0).setScrollFactor(0).setDepth(200).setInteractive(); this._statsLayerInternal = this.add.container(0, -640).setScrollFactor(0).setDepth(201); - this.tweens.add({ - targets: this._statsLayerOverlay, - alpha: 100 / 255, - duration: 1000 - }); - const _0x59b9ab = { - p: 0 - }; - this.tweens.add({ - targets: _0x59b9ab, - p: 1, - duration: 500, - ease: "Quad.Out", - onUpdate: () => { - this._statsLayerInternal.y = _0x59b9ab.p * 650 - 640; - } - }); + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._statsLayerOverlay.setAlpha(100 / 255); + this._statsLayerInternal.y = 10; + } else { + this.tweens.add({ + targets: this._statsLayerOverlay, + alpha: 100 / 255, + duration: 1000 + }); + const _0x59b9ab = { + p: 0 + }; + this.tweens.add({ + targets: _0x59b9ab, + p: 1, + duration: 500, + ease: "Quad.Out", + onUpdate: () => { + this._statsLayerInternal.y = _0x59b9ab.p * 650 - 640; + } + }); + } const _0x595215 = 712; const _0x950c8d = 460; const _0x2a115c = (screenWidth - _0x595215) / 2; @@ -7896,13 +8041,21 @@ _applyMirrorEffect() { this._statsLayerInternal = null; } if (this._pauseBtn) { - this.tweens.add({ - targets: this._pauseBtn, - alpha: 1, - duration: 300 - }); + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._pauseBtn.setAlpha(1); + } else { + this.tweens.add({ + targets: this._pauseBtn, + alpha: 1, + duration: 300 + }); + } } }; + if (window.isLowDetailMode && window.isLowDetailMode()) { + _0x272eb1(); + return; + } this.tweens.add({ targets: this._statsLayerOverlay, alpha: 0, @@ -7927,6 +8080,9 @@ _applyMirrorEffect() { if (!this._endLayerInternal) { return; } + if (window.isLowDetailMode && window.isLowDetailMode()) { + return; + } const _0x4edc03 = this._endStarX; const _0x5a0e9 = this._endStarY; const _0x453043 = this.add.image(_0x4edc03, _0x5a0e9, "GJ_WebSheet", "GJ_bigStar_001.png").setScale(3).setAlpha(0); diff --git a/assets/scripts/core/level.js b/assets/scripts/core/level.js index 78c8a30f..39d4e7b8 100644 --- a/assets/scripts/core/level.js +++ b/assets/scripts/core/level.js @@ -1202,46 +1202,48 @@ window.LevelObject = class LevelObject { }; const maxDistance = 20; - const particles = scene.add.particles(particleX, particleY, "GJ_WebSheet", { - frame: "square.png", - lifespan: { - min: 200, - max: 1000 - }, - speed: 0, - scale: { - start: 0.75, - end: 0.125 - }, - alpha: { - start: 0.5, - end: 0 - }, - tint: objectDef.portalParticleColor, - blendMode: Phaser.BlendModes.ADD, - frequency: 20, - maxParticles: 0, - emitting: true, - emitZone: { - type: "random", - source: source - }, - emitCallback: particle => { - const vx = -particle.x; - const vy = -particle.y; - const len = Math.sqrt(vx * vx + vy * vy) || 1; - const lifeSeconds = particle.life / 1000; - const speed = (len - maxDistance) / (lifeSeconds || 0.3); - particle.velocityX = vx / len * speed; - particle.velocityY = vy / len * speed; - } - }); + if (!(window.isLowDetailMode && window.isLowDetailMode())) { + const particles = scene.add.particles(particleX, particleY, "GJ_WebSheet", { + frame: "square.png", + lifespan: { + min: 200, + max: 1000 + }, + speed: 0, + scale: { + start: 0.75, + end: 0.125 + }, + alpha: { + start: 0.5, + end: 0 + }, + tint: objectDef.portalParticleColor, + blendMode: Phaser.BlendModes.ADD, + frequency: 20, + maxParticles: 0, + emitting: true, + emitZone: { + type: "random", + source: source + }, + emitCallback: particle => { + const vx = -particle.x; + const vy = -particle.y; + const len = Math.sqrt(vx * vx + vy * vy) || 1; + const lifeSeconds = particle.life / 1000; + const speed = (len - maxDistance) / (lifeSeconds || 0.3); + particle.velocityX = vx / len * speed; + particle.velocityY = vy / len * speed; + } + }); - particles.setDepth(14); - particles._eeLayer = 2; - particles._eeWorldX = worldX; - particles._eeBaseY = particleY; - this._addToSection(particles); + particles.setDepth(14); + particles._eeLayer = 2; + particles._eeWorldX = worldX; + particles._eeBaseY = particleY; + this._addToSection(particles); + } } if (objectDef) { @@ -1477,6 +1479,11 @@ window.LevelObject = class LevelObject { this._endPortalShine.setTint(window.mainColor); this._endPortalShine.setScale(1, 960 / _0x3e25a9); this.additiveContainer.add(this._endPortalShine); + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._endPortalEmitter = null; + this._endPortalGameY = 240; + return; + } const _0x58cedb = _0x3b56d4 - 30; const _0x4f52b7 = { getRandomPoint: _0x4f04dd => { @@ -1534,7 +1541,9 @@ window.LevelObject = class LevelObject { const _0x32e645 = b(_0x1be4c3); this._endPortalContainer.y = _0x32e645; this._endPortalShine.y = _0x32e645; - this._endPortalEmitter.y = _0x32e645; + if (this._endPortalEmitter) { + this._endPortalEmitter.y = _0x32e645; + } this._endPortalGameY = _0x1be4c3; } checkColorTriggers(_0x2b00ce) { @@ -1820,6 +1829,18 @@ window.LevelObject = class LevelObject { } } } + clearAlphaEffects() { + this._activeAlphaTweens = []; + this._groupOpacity = {}; + for (const gid in this._groupSprites) { + for (const spr of this._groupSprites[gid]) { + if (!spr || !spr.active) continue; + if (spr._eeActive) continue; + spr.setAlpha(1); + spr._eeOrigAlpha = 1; + } + } + } checkRotateTriggers(playerX) { while (this._rotateTriggerIdx < this._rotateTriggers.length) { @@ -1909,6 +1930,10 @@ window.LevelObject = class LevelObject { } } stepPulseTriggers(dt, colorManager) { + if (window.isLowDetailMode && window.isLowDetailMode()) { + this.clearPulseEffects(); + return; + } let i = 0; while (i < this._activePulses.length) { const pulse = this._activePulses[i]; @@ -1969,6 +1994,21 @@ window.LevelObject = class LevelObject { this._activePulses = []; } + clearPulseEffects() { + for (const pulse of this._activePulses || []) { + const trig = pulse.trig; + if (trig.targetType === 1 && trig.targetGroup > 0) { + const sprites = this._groupSprites[trig.targetGroup]; + if (sprites) for (const spr of sprites) { if (spr && spr.active) { spr.clearTint(); spr._eePulsed = false; } } + } + if (trig.targetType === 0 && trig.targetChannel > 0) { + const chSprites = this._colorChannelSprites[trig.targetChannel]; + if (chSprites) for (const spr of chSprites) { if (spr && spr.active) spr._eePulsed = false; } + } + } + this._activePulses = []; + } + applyColorChannels(colorManager) { for (const chId in this._colorChannelSprites) { const sprites = this._colorChannelSprites[chId]; @@ -1986,6 +2026,10 @@ window.LevelObject = class LevelObject { resetEnterEffectTriggers() { this._enterEffectTriggerIdx = 0; + this.clearEnterEffects(); + } + + clearEnterEffects() { this._activeEnterEffect = 0; this._activeExitEffect = 0; for (let _0x17a21d = 0; _0x17a21d < this._sections.length; _0x17a21d++) { @@ -2121,6 +2165,9 @@ window.LevelObject = class LevelObject { } } updateAudioScale(_0x337bf7) { + if (window.isLowDetailMode && window.isLowDetailMode()) { + return; + } for (let _0x24afdb of this._audioScaleSprites) { _0x24afdb.setScale(_0x337bf7); } @@ -2147,6 +2194,17 @@ window.LevelObject = class LevelObject { } } } + clearAudioScaleEffects() { + for (let _0x24afdb of this._audioScaleSprites) { + if (_0x24afdb && _0x24afdb.active) _0x24afdb.setScale(0.1); + } + for (let _0xOrbSpr of this._orbSprites) { + if (_0xOrbSpr && _0xOrbSpr.active) { + _0xOrbSpr._hitTime = null; + _0xOrbSpr.setScale(0.75); + } + } + } resetVisibility() { this._visMinSec = -1; this._visMaxSec = -1; diff --git a/assets/scripts/core/loading-screen.js b/assets/scripts/core/loading-screen.js index 7171db88..950d8737 100644 --- a/assets/scripts/core/loading-screen.js +++ b/assets/scripts/core/loading-screen.js @@ -185,6 +185,7 @@ class BootScene extends Phaser.Scene { "I don't know how this works...", "Why u have to be mad?", "It is only game...", + "Tiki Tiki!", "Unlock new icons and colors by completing achievements" ]; const sliderOriginX = cx - 105; diff --git a/assets/scripts/core/player.js b/assets/scripts/core/player.js index ff795e26..8d8165b5 100644 --- a/assets/scripts/core/player.js +++ b/assets/scripts/core/player.js @@ -87,6 +87,10 @@ class StreakManager { this._gfx.clear(); } update(_0x2acf4c) { + if (window.isLowDetailMode && window.isLowDetailMode()) { + this.reset(); + return; + } if (!this._posInit) { this._gfx.clear(); return; @@ -467,6 +471,10 @@ class PlayerObject { } _updateDashAnimation(deltaTime) { if (!this._dashAnimationSprite) return; + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._dashAnimationSprite.setVisible(false); + return; + } if (this.p.isDashing) { this._dashAnimationSprite.setVisible(true); this._dashAnimationTimer += deltaTime; @@ -660,6 +668,16 @@ class PlayerObject { this._waveTrail.addToContainer(this._gameLayer.container, 9); } _updateParticles(_0xc43238, _0x52b718, _0x5af874) { + if (window.isLowDetailMode && window.isLowDetailMode()) { + this._particleEmitter.stop(); + this._flyParticleEmitter.stop(); + this._flyParticle2Emitter.stop(); + this._shipDragEmitter.stop(); + this._particleActive = false; + this._flyParticleActive = false; + this._flyParticle2Active = false; + this._shipDragActive = false; + } if (this.p.isDead) { return; } @@ -1212,7 +1230,9 @@ if (this.p.isFlying || this.p.isUfo) { const _0x31584b = this._landIdx ? this._landEmitter1 : this._landEmitter2; const _0x2248d5 = this._scene._playerWorldX; const _0x17e0bb = this.p.gravityFlipped ? b(this.p.y) - 30 : b(this.p.y) + 30; - _0x31584b.explode(10, _0x2248d5, _0x17e0bb); + if (!(window.isLowDetailMode && window.isLowDetailMode())) { + _0x31584b.explode(10, _0x2248d5, _0x17e0bb); + } } } killPlayer() { @@ -1235,60 +1255,62 @@ if (this.p.isFlying || this.p.isUfo) { const _0x3f0446 = _0x3f4b84._getMirrorXOffset(_0x3f4b84._playerWorldX - _0x3f4b84._cameraX); const _0x53ac5b = b(this.p.y) + this._lastCameraY; const _0x281e43 = 0.9; - _0x3f4b84.add.particles(_0x3f0446, _0x53ac5b, "GJ_WebSheet", { - frame: "square.png", - speed: { - min: 200, - max: 800 - }, - angle: { - min: 0, - max: 360 - }, - scale: { - start: 18 / 32, - end: 0 - }, - alpha: { - start: 1, - end: 0 - }, - lifespan: { - min: 50, - max: 800 - }, - quantity: 100, - stopAfter: 100, - blendMode: S, - tint: window.mainColor, - x: { - min: -20, - max: 20 - }, - y: { - min: -20, - max: 20 - } - }).setScrollFactor(0).setDepth(15); - const _0x438d80 = _0x3f4b84.add.graphics().setScrollFactor(0).setDepth(15).setBlendMode(S); - const _0x4683eb = { - t: 0 - }; - _0x3f4b84.tweens.add({ - targets: _0x4683eb, - t: 1, - duration: 500, - ease: "Quad.Out", - onUpdate: () => { - const _0x39f32 = 18 + _0x4683eb.t * 144; - const _0xc8c1 = 1 - _0x4683eb.t; - _0x438d80.clear(); - _0x438d80.fillStyle(window.mainColor, _0xc8c1); - _0x438d80.fillCircle(_0x3f0446, _0x53ac5b, _0x39f32); - }, - onComplete: () => _0x438d80.destroy() - }); - this._createExplosionPieces(_0x3f0446, _0x53ac5b, _0x281e43); + if (!(window.isLowDetailMode && window.isLowDetailMode())) { + _0x3f4b84.add.particles(_0x3f0446, _0x53ac5b, "GJ_WebSheet", { + frame: "square.png", + speed: { + min: 200, + max: 800 + }, + angle: { + min: 0, + max: 360 + }, + scale: { + start: 18 / 32, + end: 0 + }, + alpha: { + start: 1, + end: 0 + }, + lifespan: { + min: 50, + max: 800 + }, + quantity: 100, + stopAfter: 100, + blendMode: S, + tint: window.mainColor, + x: { + min: -20, + max: 20 + }, + y: { + min: -20, + max: 20 + } + }).setScrollFactor(0).setDepth(15); + const _0x438d80 = _0x3f4b84.add.graphics().setScrollFactor(0).setDepth(15).setBlendMode(S); + const _0x4683eb = { + t: 0 + }; + _0x3f4b84.tweens.add({ + targets: _0x4683eb, + t: 1, + duration: 500, + ease: "Quad.Out", + onUpdate: () => { + const _0x39f32 = 18 + _0x4683eb.t * 144; + const _0xc8c1 = 1 - _0x4683eb.t; + _0x438d80.clear(); + _0x438d80.fillStyle(window.mainColor, _0xc8c1); + _0x438d80.fillCircle(_0x3f0446, _0x53ac5b, _0x39f32); + }, + onComplete: () => _0x438d80.destroy() + }); + this._createExplosionPieces(_0x3f0446, _0x53ac5b, _0x281e43); + } this.setCubeVisible(false); this.setShipVisible(false); this.setBallVisible(false); diff --git a/assets/scripts/core/triggers.js b/assets/scripts/core/triggers.js index 7c002852..14af3840 100644 --- a/assets/scripts/core/triggers.js +++ b/assets/scripts/core/triggers.js @@ -158,6 +158,9 @@ class ColorManager { } function circleEffect(gameScene, xPos, yPos, radius, radius2, duration, filled = false, _0x550b4a /*idk what this is*/ = false, color = 16777215) { + if (window.isLowDetailMode && window.isLowDetailMode()) { + return; + } const graphics = gameScene.add.graphics().setScrollFactor(0).setDepth(55).setBlendMode(S); const targets = { r: radius, @@ -184,6 +187,9 @@ function circleEffect(gameScene, xPos, yPos, radius, radius2, duration, filled = }); } function particleEffect(gameScene, color1 = 16777215, color2 = 16777215) { + if (window.isLowDetailMode && window.isLowDetailMode()) { + return; + } const basePos = 200; const xPos = basePos + (screenWidth - 400) * Math.random(); const yPos = basePos + Math.random() * 240; diff --git a/assets/scripts/utils/config.js b/assets/scripts/utils/config.js index 9bb07d7d..22eee579 100644 --- a/assets/scripts/utils/config.js +++ b/assets/scripts/utils/config.js @@ -21,6 +21,12 @@ window.currentlevel = [ window.orbClickScale = 2.0; window.orbClickShrinkTime = 250; window.orbParticleSize = 3.5; +window.lowDetailMode = localStorage.getItem("lowDetailMode") === "true"; +window.isLowDetailMode = () => window.lowDetailMode === true; +window.setLowDetailMode = value => { + window.lowDetailMode = value === true; + localStorage.setItem("lowDetailMode", window.lowDetailMode ? "true" : "false"); +}; const urlParams = new URLSearchParams(window.location.search); if (urlParams.has('id')) {