🤗
There's unused variable declarations, so I assume it's unfinished.
You forgot 'new' the line should be -->
var game = new Phaser.Game(config);
There's a few other things... And I'm pretty sure there's an extra } for no reason... Unless I counted wrong.
nostr:npub13wfgha67mdxall3gqp2hlln7tc4s03w4zqhe05v4t7fptpvnsgqs0z4fun could you give me a list of weird and highly unusual activities to engage in?
Wow that's weird. What's the black Forrest region?
What does a cuckoo clock represent or symbolize?
nostr:npub1tsgw6pncspg4d5u778hk63s3pls70evs4czfsmx0fzap9xwt203qtkhtk4 tell me some facts about cuckoo birds
Side note:
Holy shit
Wtaf
Furthermore
Lol!
Since Elon pussed out can we blame him for being complicit in meddling in foreign elections?
Asking for a fren.

#wordle






#gameDiv {
margin-top: 200px;
}
let spriteExample = new Phaser.Scene('spriteExample');
function launchBitcoinWallet() {
var fallbackLink = 'https://getalby.com/p/btcapsule';
var fallbackTimeout = setTimeout(function() {
window.location.href = fallbackLink;
}, 1000);
window.location.href = 'walletofsatoshi://bronzeping54@walletofsatoshi.com';
window.onblur = function() {
clearTimeout(fallbackTimeout);
};
}
var config = {
type: Phaser.AUTO,
width: 950,
height: 1800,
parent: 'gameDiv',
backgroundColor: '#ffffff',
audio: { disableWebAudio: true },
plugins: {
scene: [{
plugin: PhaserMatterCollisionPlugin.default,
key: "matterCollision",
mapping: "matterCollision"
}]
},
scene: {
spriteExample
},
physics: {
default: 'matter',
matter: {
gravity: {
x: 0,
y: 3
},
//debug: true
}
}
};
var fart;
var jump;
var score = 0;
var maxScore = 0;
var scoreText;
var game = new Phaser.Game(config);
game.scene.add('spriteExample', spriteExample, true);
spriteExample.preload = function() {
this.load.spritesheet('player', '
', {
frameWidth: 466.64,
frameHeight: 400
});
this.load.image('block', '
')
this.load.image('coin', '
')
this.load.image('shitcoin', '
')
this.load.image('dogeShit', '
')
this.load.image('retry', '
')
this.load.image('menu', '
')
this.load.image('zap', '
')
this.load.audio('zap_sound', ['https://nostr.build/p/nb9083.mp3']);
this.load.audio('theBeginning', ['https://nostr.build/p/nb9074.mp3']);
this.load.audio('fail', ['https://nostr.build/p/nb9076.mp3']);
}
spriteExample.create = function() {
this.input.addPointer(3);
camera = this.cameras.main;
time=this.time;
cat = [];
for (i = 0; i < 20; i++) {
cat[i] = this.matter.world.nextCategory();
}
zapSound = this.sound.add('zap_sound', { loop:false, volume:0.005, rate:3, detune:-1000});
fail = this.sound.add('fail', { loop:false, volume:0.005, rate:1});
theBeginning = this.sound.add('theBeginning', { loop:true });
theBeginning.play();
theBeginning.setVolume(0.5);
this.sound.unlock();
playerRugged = 0
stay = 3
matterWorld = this.matter.world
fly = 100
scoreText = this.add.text(1300, -200, 'Sats: 0', {
fontSize: '30px',
fill: '#000'
});
restartMenu = this.add.image(-3500, -200, 'menu');
restartMenu.setScale(2);
restartMenu.depth = 100;
welcome = this.add.text(900, -100, 'RUNNING NOSTR\n\nNon-KYC sats are \nflying around NostrLand. \nBut watch out \nfor the shitcoins!', {
fontSize: '50px',
fill: '#000',
align: 'center'
});
scoreEnd = this.add.text(restartMenu.x - 50, restartMenu.y + 50, ' score', {
fontSize: '40px',
fill: '#000000'
});
scoreEnd.depth = 102;
retryBtn = this.add.image(restartMenu.x, restartMenu.y + 50, 'retry');
retryBtn.setScale(1.2);
retryBtn.depth = 101;
retryBtn.setInteractive();
retryBtn.on('pointerdown', (pointer, retryBtn) => {
this.scene.restart();
playerRugged = 0
score = 0;
maxScore = 0;
stay = 0
fly = 0
matterWorld.resetCollisionIDs();
});
zap = this.add.image(restartMenu.x, restartMenu.y + 50, 'zap');
zap.setScale(1.2);
zap.depth = 101;
zap.setInteractive();
zap.on('pointerdown', (pointer, retryBtn) => {
launchBitcoinWallet()
playerRugged = 0
score = 0;
maxScore = 0;
stay = 0
fly = 0
});
scoreEnd = this.add.text(restartMenu.x - 50, restartMenu.y + 50, ' score', {
fontSize: '40px',
fill: '#ffffff'
});
scoreEnd.depth = 102;
player = this.matter.add.sprite(300, 300, 'player');
player.setBody({
type: 'rectangle',
width: 150,
height: 240,
});
player.setScale(0.5);
player.setFixedRotation(true)
player.setFrictionAir(0);
player.setDensity(100)
player.setBounce(-1)
coin = this.matter.add.image(player.x + 1500, player.y - 100, 'coin', null, {
isSensor: true
})
coin.setBody({
type: 'rectangle',
width: 80,
height: 25,
});
coin.setFixedRotation()
coinImage = this.add.image(coin.x, coin.y, 'coin')
var poly = '69.090 0.500, 139.603 114.347, 71.013 211.838, 0.500 115.309'
shitcoin = this.matter.add.image(player.x + 2000, player.y - 200, 'shitcoin', null, {
shape: {
type: 'fromVerts',
verts: poly
},
render: {
sprite: {
xOffset: 0.15,
yOffset: 0.11
}
}
})
shitcoin.setScale(0.5)
shitcoin.setBounce(1.1)
dogeShit = this.matter.add.image(player.x + 2200, player.y - 200, 'dogeShit', null, {
isSensor: true
})
dogeShit.setBody({
type: 'polygon',
sides: 6
});
dogeShit.setScale(0.5)
dogeShit.setBounce(1.1)
//////// ANIMATION
this.anims.create({
key: 'rightJump',
frames: this.anims.generateFrameNumbers('player', {
start: 2,
end: 2
}),
});
this.anims.create({
key: 'right',
frames: this.anims.generateFrameNumbers('player', {
start: 1,
end: 17
}),
frameRate: 24,
repeat: -1
});
sensorMove = this.matter.add.image(player.x - 400, player.y - 300, 'block')
sensorMove.setStatic(true)
sensorMove.setRotation(80)
sensorMove.setFixedRotation(true)
sensorMove.setSensor(true)
platform = this.matter.add.image(player.x, player.y + 40, 'block')
platform.setStatic(true)
platform.scaleY = 5
platform.scaleX = 5
platform.setFixedRotation(true)
coinRandom = Phaser.Math.Between(-100, 50);
dogeShitRandomX = Phaser.Math.Between(-5, -10);
this.matterCollision.addOnCollideStart({
objectA: coin,
objectB: sensorMove,
callback: () => {
coinRandom = Phaser.Math.Between(-100, 180);
coin.setPosition(player.x + 1000, coinRandom)
}
})
coinImageMove=0
this.matterCollision.addOnCollideStart({
objectA: coin,
objectB: player,
callback: () => {
if(coin.x > player.x) {
if (coin.y>platform.y-50)
{
coinImage.setPosition(coin.x, coin.y)
console.log('low')
} else {
coinImage.setPosition(coin.x, coin.y-73)
}
coinImageMove=1
time.addEvent({
delay: 200,
callback: coinMove,
repeat: 0
})
function coinMove(){
coinImage.setPosition(coin.x, coin.y)
coinImageMove=0
}
} else {
coinImageMove=1
time.addEvent({
delay: 200,
callback: coinMove,
repeat: 0
})
function coinMove(){
coinImage.setPosition(coin.x, coin.y)
coinImageMove=0
}
}
coinRandom = Phaser.Math.Between(-100, 180);
coin.setPosition(player.x + 1000, coinRandom)
if (score == maxScore) {
maxScore += 1000000;
} else {
maxScore = maxScore;
}
score += 1000000;
if (score == 1) {
scoreText.setText('Sats: ⚡️' + score);
} else if (score > 1) {
scoreText.setText('Sats: ⚡️' + score);
}
if (score < 0) {
score = 1000000;
}
}
})
this.matterCollision.addOnCollideStart({
objectA: dogeShit,
objectB: sensorMove,
callback: () => {
if (score < 5000000) {
fly = 0
} else if (score >= 5000000 && score < 20000000) {
fly = 2
} else if (score >= 20000000 && score < 30000000) {
fly = 4
} else if (score >= 30000000 && score < 40000000) {
fly = 6
} else if (score >= 40000000 && score < 50000000) {
fly = 8
} else if (score >= 50000000 && score < 60000000) {
fly = 10
} else if (score >= 60000000 && score < 70000000) {
fly = 12
} else if (score >= 70000000 && score < 80000000) {
fly = 16
} else if (score >= 80000000 && score < 90000000) {
fly = 18
} else if (score >= 90000000 && score < 100000000) {
fly = 20
}
dogeShitRandomX = Phaser.Math.Between(-7, -10);
dogeShit.setPosition(player.x + 1000, platform.y - 200)
shitcoin.setVelocityY(-15)
}
})
this.matterCollision.addOnCollideStart({
objectA: shitcoin,
objectB: sensorMove,
callback: () => {
if (score < 5000000) {
fly = 1
} else if (score >= 5000000 && score < 20000000) {
fly = 3
} else if (score >= 20000000 && score < 30000000) {
fly = 5
} else if (score >= 30000000 && score < 40000000) {
fly = 7
} else if (score >= 40000000 && score < 50000000) {
fly = 9
} else if (score >= 50000000 && score < 60000000) {
fly = 11
} else if (score >= 60000000 && score < 70000000) {
fly = 13
} else if (score >= 70000000 && score < 80000000) {
fly = 15
} else if (score >= 80000000 && score < 90000000) {
fly = 17
} else if (score >= 90000000 && score < 100000000) {
fly = 19
}
shitcoin.setPosition(player.x + 1200, platform.y - 200)
dogeShit.setVelocityY(-15)
}
})
button = this.add.image(player.x, 400, 'block', null, {
isStatic: true
});
button.setInteractive({
draggable: true
});
this.input.dragDistanceThreshold = 20;
button.setScrollFactor(-0.0001);
button.scaleY = 450;
button.scaleX = 1000;
button.setImmovable = true;
button.alpha = 0.005;
stop = 0;
jump = 0;
this.matterCollision.addOnCollideActive({
objectA: player,
objectB: platform,
callback: () => {
jump = 0;
fart = 0;
}
});
this.matterCollision.addOnCollideEnd({
objectA: player,
objectB: platform,
callback: () => {
fart = 1;
}
});
button.on('pointerdown', function(pointer, upY, upX) {
if (fly == 100) {
fly = 0
welcome.setAlpha(0);
}
if (fart == 0) {
fart = 1;
if (fart == 1) {
player.setVelocityY(-21);
player.anims.play('rightJump', true);
jump = 1;
fart = 2;
}
}
})
this.matterCollision.addOnCollideStart({
objectA: player,
objectB: dogeShit,
callback: () => {
fail.play()
coin.setPosition(-100, -100)
playerRugged = 1
button.depth = 1
stay = 2
fly = 100
player.setFixedRotation(false)
player.setVelocityY(-15)
restartMenu.setPosition(platform.x + 900, platform.y - 400)
retryBtn.setPosition(restartMenu.x, restartMenu.y);
zap.setPosition(restartMenu.x, restartMenu.y + 110);
}
})
this.matterCollision.addOnCollideStart({
objectA: player,
objectB: shitcoin,
callback: () => {
fail.play()
coin.setPosition(-100, -100)
playerRugged = 1
button.depth = 1
stay = 2
fly = 100
player.setFixedRotation(false)
player.setVelocityY(-15)
restartMenu.setPosition(platform.x + 900, platform.y - 400)
retryBtn.setPosition(restartMenu.x, restartMenu.y);
zap.setPosition(restartMenu.x, restartMenu.y + 110);
}
})
coin.setCollisionCategory([cat[0]]);
shitcoin.setCollisionCategory([cat[1]]);
dogeShit.setCollisionCategory([cat[2]]);
coin.setCollidesWith(1)
shitcoin.setCollidesWith(1)
dogeShit.setCollidesWith(1)
platform.setCollidesWith([1, cat[0], cat[1], cat[2]]);
sensorMove.setCollidesWith([1, cat[0], cat[1], cat[2]]);
player.setCollidesWith([1, cat[0], cat[1], cat[2]]);
camera.setZoom(1);
camera.startFollow(platform);
camera.setFollowOffset(-900, -200);
}
spriteExample.update = function() {
if (coinImageMove==1 && fly <10) {
coinImage.x-=7
zapSound.play()
} else if (coinImageMove==1 && fly >10)
{
coinImage.x-=15
zapSound.play()
}
if (playerRugged == 0) {
player.x = sensorMove.x + 1000
}
if (playerRugged == 1) {
player.anims.play('rightJump')
button.alpha = 0
player.setVelocityX(15)
player.rotation += 0.2
}
if (fart == 0) {
player.anims.play('right', true)
}
if (fly == 0) {
coin.setVelocityX(-5)
dogeShit.setVelocityX(0)
shitcoin.setVelocityX(-7)
} else if (fly == 2) {
dogeShit.setVelocityX(0)
coin.setVelocityX(-7)
shitcoin.setVelocityX(-15)
} else if (fly == 4) {
dogeShit.setVelocityX(0)
coin.setVelocityX(-8)
shitcoin.setVelocityX(-16)
} else if (fly == 6) {
dogeShit.setVelocityX(0)
coin.setVelocityX(-9)
shitcoin.setVelocityX(-17)
} else if (fly == 8) {
dogeShit.setVelocityX(0)
coin.setVelocityX(-10)
shitcoin.setVelocityX(-18)
} else if (fly == 10) {
dogeShit.setVelocityX(0)
coin.setVelocityX(-11)
shitcoin.setVelocityX(-19)
} else if (fly == 12) {
dogeShit.setVelocityX(0)
coin.setVelocityX(-12)
shitcoin.setVelocityX(-20)
} else if (fly == 14) {
dogeShit.setVelocityX(0)
coin.setVelocityX(-13)
shitcoin.setVelocityX(-21)
} else if (fly == 16) {
dogeShit.setVelocityX(0)
coin.setVelocityX(-14)
shitcoin.setVelocityX(-22)
} else if (fly == 18) {
dogeShit.setVelocityX(0)
coin.setVelocityX(-15)
shitcoin.setVelocityX(-23)
} else if (fly == 20) {
dogeShit.setVelocityX(0)
coin.setVelocityX(-16)
shitcoin.setVelocityX(-24)
} else if (fly == 1) {
dogeShit.setVelocityX(-10)
coin.setVelocityX(-5)
shitcoin.setVelocityX(0)
} else if (fly == 3) {
dogeShit.setVelocityX(-15)
coin.setVelocityX(-7)
shitcoin.setVelocityX(0)
} else if (fly == 5) {
dogeShit.setVelocityX(-16)
coin.setVelocityX(-8)
shitcoin.setVelocityX(0)
} else if (fly == 7) {
dogeShit.setVelocityX(-17)
coin.setVelocityX(-9)
shitcoin.setVelocityX(0)
} else if (fly == 9) {
dogeShit.setVelocityX(-18)
coin.setVelocityX(-10)
shitcoin.setVelocityX(0)
} else if (fly == 11) {
dogeShit.setVelocityX(-19)
coin.setVelocityX(-11)
shitcoin.setVelocityX(0)
} else if (fly == 13) {
dogeShit.setVelocityX(-20)
coin.setVelocityX(-12)
shitcoin.setVelocityX(0)
} else if (fly == 15) {
dogeShit.setVelocityX(-21)
coin.setVelocityX(-13)
shitcoin.setVelocityX(0)
} else if (fly == 17) {
dogeShit.setVelocityX(-22)
coin.setVelocityX(-14)
shitcoin.setVelocityX(0)
} else if (fly == 19) {
dogeShit.setVelocityX(-23)
coin.setVelocityX(-15)
shitcoin.setVelocityX(0)
} else {
coin.setVelocityX(0)
dogeShit.setVelocityX(0)
shitcoin.setVelocityX(0)
}
if (coin.y > coinRandom) {
coin.y = coinRandom
}
}