diff --git a/assets/scripts/core/game-scene.js b/assets/scripts/core/game-scene.js index f2a5ed21..c04d4c57 100644 --- a/assets/scripts/core/game-scene.js +++ b/assets/scripts/core/game-scene.js @@ -7673,7 +7673,8 @@ _buildSettingsPopup() { 1333: 0xff6326, 1594: 0x6cff6b, 1704: 0x04ff04, - 1751: 0xff00d2 + 1751: 0xff00d2, + 3004: 0xea5bff }; for (let _oSpr of this._level._orbSprites) { if (_drawn >= 4) break; diff --git a/assets/scripts/core/level-editor.js b/assets/scripts/core/level-editor.js index 4b432305..6787f64b 100644 --- a/assets/scripts/core/level-editor.js +++ b/assets/scripts/core/level-editor.js @@ -2213,7 +2213,10 @@ class LevelEditor { for (const collider of colliders) { collider.rotation = saveObj.rot; collider.rotationDegrees = saveObj.rot; - if (collider.orbId !== undefined) collider.orbRotation = saveObj.rot; + if (collider.orbId !== undefined) { + collider.orbRotation = saveObj.rot; + collider.orbFlipY = !!saveObj.flipY; + } collider._baseRotationDegrees = saveObj.rot; collider._origRotationDegrees = saveObj.rot; collider._eeInitialRotationDegrees = saveObj.rot; diff --git a/assets/scripts/core/level.js b/assets/scripts/core/level.js index a08855fe..8c56463a 100644 --- a/assets/scripts/core/level.js +++ b/assets/scripts/core/level.js @@ -494,7 +494,7 @@ function calculateSongOffsetForX(targetX, startSpeedKey = 0, sourceObjects = nul window.calculateGeometryDashSongOffsetForX = calculateSongOffsetForX; -const objsWithGlow = [1, 2, 3, 4, 6, 7, 83, 8, 39, 103, 392, 35, 36, 40, 140, 141, 62, 65, 66, 68, 195, 196, 1022, 1594]; +const objsWithGlow = [1, 2, 3, 4, 6, 7, 83, 8, 39, 103, 392, 35, 36, 40, 140, 141, 62, 65, 66, 68, 195, 196, 1022, 1594, 3004]; for (let obj of objsWithGlow) { if (allObjects[obj]) { allObjects[obj].glow = true; @@ -2369,6 +2369,7 @@ window.LevelObject = class LevelObject { const orbObj = new Collider(jumpRingType, worldX, worldY, orbW, orbH, levelObj.rot || 0); orbObj.orbId = levelObj.id; orbObj.orbRotation = levelObj.rot || 0; + orbObj.orbFlipY = !!levelObj.flipY; orbObj._dashHoldTicks = 0; registerCollider(orbObj); this.objects.push(orbObj); diff --git a/assets/scripts/core/player.js b/assets/scripts/core/player.js index e9fee61a..378da289 100644 --- a/assets/scripts/core/player.js +++ b/assets/scripts/core/player.js @@ -4328,6 +4328,70 @@ _updateWaveJump(dt) { this.runRotateAction(); _boostedThisStep = true; this._markActivatedOrbSprites(gameObj); + } else if (_orbId === 3004) { + // Swallow the press the way a spider teleport does, so landing back on a + // surface with canJump set doesn't immediately spend the same click on a + // jump. Only this orb consumes the input; every other orb is untouched. + this.p.upKeyPressed = false; + this.p.queuedHold = false; + // The sprite is an arrow that points up at rot 0 and rotates clockwise, + // so cos(rot) is how much it points upward, negated if the object is + // flipped vertically. Closer to up teleports up (and flips gravity); + // closer to down teleports down. Exactly sideways (90/270) counts as up. + const _spRotRad = (gameObj.orbRotation || 0) * Math.PI / 180; + const _spFlipY = gameObj.orbFlipY ? -1 : 1; + const _spGoingUp = Math.cos(_spRotRad) * _spFlipY >= -1e-9; + const _spSurfaceY = this._findSpiderTeleportSurface(_spGoingUp, pieceWidth, playerSize); + const _spOldY = this.p.y; + _teleportedThisStep = true; + if (_spSurfaceY !== null && Number.isFinite(_spSurfaceY)) { + const _spLandingY = _spGoingUp ? _spSurfaceY - playerSize : _spSurfaceY + playerSize; + const _spHazard = this._findSpiderTeleportHazard(_spGoingUp, pieceWidth, playerSize, _spLandingY); + if (_spHazard && !window.noClip) { + const _spHazardY = (_spHazard.bounds.lower + _spHazard.bounds.upper) / 2; + this.p.y = Number.isFinite(_spHazardY) ? _spHazardY : _spLandingY; + this._spawnSpiderTeleportEffects(_spOldY, this.p.y); + this.p.yVelocity = 0; + this.p.onGround = false; + this.p.canJump = false; + this.p.isJumping = false; + this._markActivatedOrbSprites(gameObj); + this.killPlayer(); + return; + } + this.p.y = _spLandingY; + this.flipGravity(_spGoingUp, 1.0); + this.p.onCeiling = _spGoingUp; + if (_spHazard && window.noClip) { + this.p._spiderTeleportNoclipDeathPending = true; + this.p.diedThisFrame = true; + } + this._spawnSpiderTeleportEffects(_spOldY, this.p.y); + this.p.yVelocity = 0; + this.p.onGround = true; + this.p.canJump = true; + this.p.isJumping = false; + } else { + this.flipGravity(_spGoingUp, 1.0); + this.p.yVelocity = 0; + this.p.onGround = false; + this.p.canJump = false; + this.p.isJumping = false; + } + this._syncOtherDualGravityForBlueBoost(); + if (this.p.isBall) { + this.p.ballShouldRotate = true; + this.p.ballRotateOpposite = this.p.gravityFlipped; + this.p.ballHitPad = true; + } + this.p._spiderTeleportAnimTimer = 0; + if (!this._scene?._editorPlaytestActive) { + this.p._spiderFlashDuration = 0.5; + this.p._spiderFlashTimer = 0.5; + } + this.runRotateAction(); + _boostedThisStep = true; + this._markActivatedOrbSprites(gameObj); } else if (this.p.isWave) { if (_orbId === 84 || _orbId === 1022) { this.flipGravity(!this.p.gravityFlipped); diff --git a/assets/scripts/game/allObjects.js b/assets/scripts/game/allObjects.js index c8daadaa..0c605f1a 100644 --- a/assets/scripts/game/allObjects.js +++ b/assets/scripts/game/allObjects.js @@ -53967,10 +53967,10 @@ window.allobjects = function() { "default_base_color_channel": 0, "frame": "spiderRing_001.png", "glow_frame": "spiderRing_glow_001.png", - "gridH": 1, - "gridW": 1, + "gridH": 1.2, + "gridW": 1.2, "spritesheet": "GJ_GameSheet-uhd", - "type": "deco", + "type": "ring", "z": 12, "default_detail_color_channel": -1, "default_z_layer": 3, diff --git a/index.html b/index.html index b099db67..1d4e946b 100644 --- a/index.html +++ b/index.html @@ -1,64 +1,65 @@ - - - - - - - Web Dashers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + Web Dashers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +