Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 58 additions & 2 deletions assets/scripts/core/game-scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ class GameScene extends Phaser.Scene {
{frame: "", url: "", angle: 0, row: 2, col: 1 },
{frame: "", url: "", angle: 0, row: 2, col: 2 },
{ frame: "gj_discordIcon_001.png", url: "https://discord.gg/TfEzAVWPSJ", angle: 90, row: 2, col: 3 },

{ frame: "gj_wbdlIcon_001.png", url: "https://www.webdemonlist.org/", angle: 0, row: 2, col: 4 },

//{ frame: "gj_instaIcon_001.png", url: "https://www.instagram.com/", angle: -90, flipX: true, row: 1, col: 3 },
//{ frame: "gj_twitchIcon_001.png", url: "https://www.twitch.tv/", angle: -90, flipX: true, row: 0, col: 0 },
Expand Down Expand Up @@ -622,6 +622,7 @@ this._menuUpdateLogBtn = this.add.image(screenWidth - 30 - 50, 33, "GJ_WebSheet"
const isSearchButton = frame === "GJ_searchBtn_001.png";
const isFeaturedButton = frame === "GJ_featuredBtn_001.png";
const isEditorButton = frame === "GJ_createBtn_001.png";
const isMapButton = frame === "GJ_mapBtn_001.png";
if (isSearchButton) {
btn.setInteractive();
this._makeBouncyButton(btn, btnScale, () => {
Expand All @@ -640,7 +641,14 @@ this._menuUpdateLogBtn = this.add.image(screenWidth - 30 - 50, 33, "GJ_WebSheet"
this._closeCreatorMenu(true);
this._openEditorMenu();
}, () => true);
} else {
} else if (isMapButton) {
btn.setInteractive();
this._makeBouncyButton(btn, btnScale, () => {
this._openMapMenu();
}, () => true);
}
else
{
btn.setTint(0x666666);
}
this._creatorOverlayObjects.push(btn);
Expand Down Expand Up @@ -1776,6 +1784,54 @@ this._menuUpdateLogBtn = this.add.image(screenWidth - 30 - 50, 33, "GJ_WebSheet"
}
});
};
this._openMapMenu = () => {
if (this._mapMenu) return;

const centerX = screenWidth / 2,
centerY = 320,
panelWidth = 800,
panelHeight = 550;

this._mapPopup = this.add.container(0, 0).setScrollFactor(0).setDepth(250);

const dim = this.add.rectangle(centerX, centerY, screenWidth, screenHeight, 0, 150 / 255).setInteractive();
this._mapPopup.add(dim);

const innerContainer = this.add.container(centerX, centerY).setScale(0);
this._mapPopup.add(innerContainer);

const map = this.add.image(0, 0, "roadmap_1").setScale(0.5);
innerContainer.add(map);

const closeMenu = () => {
window.removeEventListener('keydown', escListener);
this._mapPopup.destroy();
this._mapPopup = null;
};

const closeBtn = this.add.image(-(panelWidth / 2) - 25, -(panelHeight / 2) - 5, 'GJ_WebSheet', "GJ_closeBtn_001.png").setScale(0.8).setInteractive();
innerContainer.add(closeBtn);
this._makeBouncyButton(closeBtn, 0.8, closeMenu);

const escListener = (event) => {
if (event.key === "Escape") {
event.preventDefault();
event.stopPropagation();
closeMenu();
}
};
window.addEventListener('keydown', escListener);

this.tweens.add({
targets: innerContainer,
scale: 1,
duration: 660,
ease: "Elastic.Out",
easeParams: [1, 0.6]
});
};
this._closeMapMenu = () => {
}
this._makeBouncyButton(this._creatorBtn, 1, () => {
this._openCreatorMenu();
}, () => this._menuActive && !this._levelSelectOverlay);
Expand Down
1 change: 1 addition & 0 deletions assets/scripts/core/loading-screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ class BootScene extends Phaser.Scene {
this.load.image("stopPlayback", "assets/sprites/stopPlayback.png");
this.load.image("recordMacro", "assets/sprites/recordMacro.png");
this.load.image("stopRecord", "assets/sprites/stopRecord.png");
this.load.image("roadmap_1", "assets/sprites/roadmap_1.png");

for (let i = 1; i < 23; i++) {
let index = i - 1;
Expand Down
99 changes: 53 additions & 46 deletions assets/scripts/core/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -800,74 +800,81 @@ class PlayerObject {
if (this._endAnimating) {
return;
}
const _0x7f0705 = mirrorOffset !== undefined ? mirrorOffset : centerX;
const _0x1a433c = b(this.p.y) + cameraY;
const currentCenterX = mirrorOffset !== undefined ? mirrorOffset : centerX;
const adjustedPlayerY = b(this.p.y) + cameraY;
const playerRotation = this._rotation;
this._lastCameraX = cameraX;
this._lastCameraY = cameraY;
this._aboveContainer.x = -cameraX;
this._aboveContainer.y = cameraY;
if (this.p.isFlying || this.p.isUfo) {
const _0x3904f8 = 10;
if (this.p.isFlying || this.p.isUfo) {
const _miniS = this.p.isMini ? 0.6 : 1;
const playerOffset = this.p.gravityFlipped ? (-30 * _miniS) : (10 * _miniS);
const mirrored = this.p.mirrored ? -1 : 1;
const gravityDir = this.p.gravityFlipped ? -1 : 1;

const cosRotation = Math.cos(playerRotation);
const sinRotation = Math.sin(playerRotation);
const mirrored = this.p.mirrored ? -1 : 1;
const _0x1b1d28 = -_0x3904f8 * sinRotation * mirrored;
const _0x185f91 = _0x3904f8 * cosRotation;
const _0x562424 = playerOffset * sinRotation * mirrored;
const _0x3011c9 = -playerOffset * cosRotation;

const localVehicleY = 12 * gravityDir * _miniS;
const vehicleOffsetX = -localVehicleY * sinRotation * mirrored;
const vehicleOffsetY = localVehicleY * cosRotation;

const localCubeY = -12 * _miniS;
const cubeOffsetX = -localCubeY * sinRotation * mirrored * gravityDir;
const cubeOffsetY = localCubeY * cosRotation * gravityDir;

const _ufoMode = this.p.isUfo && !this.p.isFlying;

if (this.p.isFlying) {
for (const layer of this._shipLayers) {
if (layer) {
const _miniS = this.p.isMini ? 0.6 : 1;
layer.sprite.x = _0x7f0705 + _0x1b1d28;
layer.sprite.y = _0x1a433c + _0x185f91 + (this.p.gravityFlipped ? (-20 * _miniS) : 0)
layer.sprite.rotation = this.p.mirrored ? -playerRotation : playerRotation;
layer.sprite.x = currentCenterX + vehicleOffsetX;
layer.sprite.y = adjustedPlayerY + vehicleOffsetY;

layer.sprite.rotation = playerRotation;
layer.sprite.scaleY = this.p.gravityFlipped ? -_miniS : _miniS;
layer.sprite.scaleX = this.p.mirrored ? -_miniS : _miniS;
}
}
}
if (this.p.isUfo && !this.p.isDead) {
for (const layer of this._birdLayers) {
if (layer) {
layer.sprite.setVisible(true);
layer.sprite.x = _0x7f0705 + _0x1b1d28;
layer.sprite.y = _0x1a433c + _0x185f91 + (this.p.gravityFlipped ? -15 : 5);
layer.sprite.rotation = this.p.mirrored ? -playerRotation : playerRotation;
const _miniS = this.p.isMini ? 0.6 : 1;
layer.sprite.scaleY = this.p.gravityFlipped ? -_miniS : _miniS;
layer.sprite.scaleX = this.p.mirrored ? -_miniS : _miniS;
}
if (this.p.isUfo && !this.p.isDead) {
for (const layer of this._birdLayers) {
if (layer) {
layer.sprite.setVisible(true);
layer.sprite.x = currentCenterX + vehicleOffsetX;
layer.sprite.y = adjustedPlayerY + vehicleOffsetY + (this.p.gravityFlipped ? -15 : 5);
layer.sprite.rotation = this.p.mirrored ? -playerRotation : playerRotation;
const _miniS = this.p.isMini ? 0.6 : 1;
layer.sprite.scaleY = this.p.gravityFlipped ? -_miniS : _miniS;
layer.sprite.scaleX = this.p.mirrored ? -_miniS : _miniS;
}
}
}
}


for (const playerLayerItem of this._playerLayers) {
if (playerLayerItem) {
const _miniS = this.p.isMini ? 0.6 : 1;
playerLayerItem.sprite.x = _0x7f0705 + _0x562424;
playerLayerItem.sprite.y = (_0x1a433c + _0x3011c9) + (this.p.isMini ? (8 * _miniS) : 0) + (this.p.gravityFlipped ? (-20 * _miniS) : 0);
playerLayerItem.sprite.rotation = this.p.mirrored ? -playerRotation : playerRotation;
playerLayerItem.sprite.x = currentCenterX + cubeOffsetX;
playerLayerItem.sprite.y = adjustedPlayerY + cubeOffsetY;

playerLayerItem.sprite.rotation = playerRotation;

const _shipCubeS = _miniS * 0.55;
playerLayerItem.sprite.scaleY = this.p.gravityFlipped ? -_shipCubeS : _shipCubeS;
playerLayerItem.sprite.scaleX = this.p.mirrored ? -_shipCubeS : _shipCubeS;
}
}
if (_ufoMode) {
const _ufoTilt = Math.max(-0.05, Math.min(0.05, -(this.p.y - this.p.lastY) * 0.008));
for (const layer of this._birdLayers) {
if (layer) {
layer.sprite.rotation = this.p.mirrored ? -_ufoTilt : _ufoTilt;
const _ufoTilt = Math.max(-0.05, Math.min(0.05, -(this.p.y - this.p.lastY) * 0.008));
for (const layer of this._birdLayers) {
if (layer) {
layer.sprite.rotation = this.p.mirrored ? -_ufoTilt : _ufoTilt;
}
}
}
for (const playerLayerItem of this._playerLayers) {
if (playerLayerItem) {
playerLayerItem.sprite.rotation = this.p.mirrored ? -_ufoTilt : _ufoTilt;
for (const playerLayerItem of this._playerLayers) {
if (playerLayerItem) {
playerLayerItem.sprite.rotation = this.p.mirrored ? -_ufoTilt : _ufoTilt;
}
}
}
}
} else {
for (const layer of this._spiderLayers) {
Expand All @@ -878,8 +885,8 @@ if (this.p.isFlying || this.p.isUfo) {

for (const playerLayer of this._allLayers) {
if (playerLayer) {
playerLayer.sprite.x = _0x7f0705;
playerLayer.sprite.y = _0x1a433c;
playerLayer.sprite.x = currentCenterX;
playerLayer.sprite.y = adjustedPlayerY;
const isBallLayer = this._ballLayers.includes(playerLayer);
playerLayer.sprite.rotation = isBallLayer ? playerRotation : (this.p.mirrored ? -playerRotation : playerRotation);
let _miniS = this.p.isMini ? 0.6 : 1;
Expand All @@ -898,8 +905,8 @@ if (this.p.isFlying || this.p.isUfo) {

for (const playerLayer of this._allLayers) {
if (playerLayer) {
playerLayer.sprite.x = _0x7f0705;
playerLayer.sprite.y = _0x1a433c;
playerLayer.sprite.x = currentCenterX;
playerLayer.sprite.y = adjustedPlayerY;
const isBallLayer = this._ballLayers.includes(playerLayer);
playerLayer.sprite.rotation = isBallLayer ? playerRotation : (this.p.mirrored ? -playerRotation : playerRotation);
let _miniS = this.p.isMini ? 0.6 : 1;
Expand All @@ -920,8 +927,8 @@ if (this.p.isFlying || this.p.isUfo) {

this._updateDashAnimation(_0x3afedf * 1000);
if (this._dashAnimationSprite && this._dashAnimationSprite.visible) {
this._dashAnimationSprite.x = _0x7f0705;
this._dashAnimationSprite.y = _0x1a433c;
this._dashAnimationSprite.x = currentCenterX;
this._dashAnimationSprite.y = adjustedPlayerY;
const _miniS = this.p.isMini ? 0.6 : 1;
this._dashAnimationSprite.scaleY = this.p.gravityFlipped ? -_miniS : _miniS;
this._dashAnimationSprite.scaleX = _miniS;
Expand Down
21 changes: 21 additions & 0 deletions assets/sheets/GJ_GameSheet03.json
Original file line number Diff line number Diff line change
Expand Up @@ -9291,6 +9291,27 @@
"h": 62
}
},
{
"filename": "gj_wbdlIcon_001.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 62,
"h": 62
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 62,
"h": 62
},
"frame": {
"x": 1478,
"y": 1929,
"w": 62,
"h": 62
}
},
{
"filename": "gj_ytIcon_001.png",
"rotated": false,
Expand Down
Binary file modified assets/sheets/GJ_GameSheet03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/MapPopup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/roadmap_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/roadmap_template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.