<!DOCTYPE html>
<html lang="en">
<head>
<!-- Crafted by 6-year old Jr.Ray who likes building legos, coding Scrath Jr., playing basketball, and making art on bitcoin. A future Bitcoin builder, he is gearing up to take control of his future. Coded and Inscribed by proud dad - https://twitter.com/MisterRayCrypto -->
<meta charset="UTF-8">
<style>
#game-container {
border: 3px solid white;
width: 600px;
height: 640px;
position: relative;
margin: auto;
background-color: black;
}
#gameCanvas {
position: absolute;
left: 0;
right: 0;
top: 50%;
transform: translateY(-50%);
}
#start-btn {
display: block;
margin: 20px auto;
padding: 10px 20px;
font-size: 20px;
cursor: pointer;
}
h1 {
text-align: center;
color: white;
}
#initial-screen {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.8);
z-index: 10;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: white;
}
#initial-screen img {
width: 400px;
}
#initial-screen h1 {
margin-bottom: 20px;
}
#initial-screen p {
text-align: center;
margin-bottom: 20px;
font-size: 18px;
}
#initial-screen .symbol {
font-weight: bold;
font-size: 24px;
}
#score-container {
position: absolute;
top: 10px;
right: 10px;
color: white;
font-size: 24px;
}
.score-change {
position: absolute;
color: white;
font-size: 36px;
opacity: 1;
transition: all 1s;
}
</style>
</head>
<body>
<div id="game-container">
<div id="initial-screen">
<h1>FIAT FUNERAL</h1>
<img src="https://ordinals.com/content/2f4b5b57dfb6ebb9a0174b1b7a53e33eab29198a6febbd7c34136508dedccaf5i0" alt="Initial Image">
<p>Control sparked a fire, and from it we grew,<br>
In the shadows, Satoshi's vision flew.<br>
Rise, rise, against the night,<br>
With <span class="symbol" style="color: orange;">₿</span>'s blaze, ignite the light.</p>
<button id="start-btn">Start FIAT FUNERAL</button>
<p class="credits">Imagined by a 6-year old future Bitcoin builder. Proudly coded and inscribed by dad on Father's day, 2023. No physical currencies were harmed or exploited in the making of this game - only their foundations challenged</p>
</div>
<canvas id="gameCanvas" width="600" height="640"></canvas>
<div id="score-container">Score: <span id="score">0</span></div>
</div>
<script>
const canvas = document.getElementById('gameCanvas');
const ctx = canvas.getContext('2d');
const startBtn = document.getElementById('start-btn');
const scoreContainer = document.getElementById('score-container');
const scoreElement = document.getElementById('score');
let intervalId;
let player, bullets, enemies, score;
let gameRunning = false;
let enemyDirection = 1;
let currentWave = 1;
const maxWaves = 10;
let fireIcon = new Image();
fireIcon.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAAXNSR0IArs4c6QAAAG1JREFUGFdjZICCjR6ah/13XLeF8RlhDHQaLnGhUF9bxuXDlWd7+bz1+i5vA0tsclYzFdNgN/v6/u+Uf38ZTruuvGYG13G53vi/RpIEw7WJjxv1+y41gCUuFuqVckmzdakkKjOcn3yewajhFiMAY8MlB1mFEboAAAAASUVORK5CYII=";
const symbols = ["$", "¥", "€", "₿"];
function drawTriangle(x, y, width, height) {
ctx.save();
ctx.translate(x + width / 2, y + height / 2);
ctx.rotate(Math.PI);
ctx.beginPath();
ctx.moveTo(-width / 2, -height / 2);
ctx.lineTo(width / 2, -height / 2);
ctx.lineTo(0, height / 2);
ctx.closePath();
ctx.fillStyle = 'white';
ctx.fill();
ctx.restore();
}
function drawSymbol(symbol, x, y, width, height) {
ctx.font = 'bold ' + (height * 0.6) + 'px Arial';
let symbolColor;
if (symbol === '$') {
symbolColor = 'green';
} else if (symbol === '¥') {
symbolColor = 'yellow';
} else if (symbol === '€') {
symbolColor = 'blue';
} else if (symbol === '₿') {
symbolColor = 'orange';
} else {
symbolColor = 'white';
}
ctx.fillStyle = symbolColor;
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.fillText(symbol, x + width / 2, y + height / 2);
}
function showScoreChange(text, x, y) {
const scoreChange = document.createElement('div');
scoreChange.textContent = text;
scoreChange.classList.add('score-change');
scoreChange.style.left = x + 'px';
scoreChange.style.top = y + 'px';
document.body.appendChild(scoreChange);
setTimeout(() => {
scoreChange.style.opacity = '0';
setTimeout(() => {
document.body.removeChild(scoreChange);
}, 1000);
}, 500);
}
function startGame() {
clearInterval(intervalId);
player = { x: canvas.width / 2, y: canvas.height - 30, width: 12.5, height: 12.5 };
bullets = [];
enemies = [];
score = 0;
currentWave = 1; // Reset current wave
populateEnemies();
intervalId = setInterval(update, 1000 / 30);
gameRunning = true;
document.getElementById('initial-screen').style.display = 'none';
}
function populateEnemies() {
let symbolCount = {
"$": 0,
"¥": 0,
"€": 0,
"₿": 0
};
for (let i = 0; i < 5; i++) {
for (let j = 0; j < 11; j++) {
let enemy = {
x: 30 + j * 50,
y: 30 + i * 50,
width: 40,
height: 40,
type: null
};
do {
enemy.type = symbols[Math.floor(Math.random() * symbols.length)];
} while (enemy.type === "₿" && symbolCount[enemy.type] / (symbolCount["$"] + symbolCount["¥"] + symbolCount["€"]) > 0.04);
symbolCount[enemy.type]++;
enemies.push(enemy);
}
}
}
function update() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawTriangle(player.x, player.y, player.width, player.height);
bullets.forEach((bullet, index) => {
bullet.y -= 5;
ctx.drawImage(fireIcon, bullet.x, bullet.y, bullet.width, bullet.height);
if (bullet.y < 0) bullets.splice(index, 1);
});
let reverseDirection = false;
let hitBottomBorder = false;
enemies.forEach(enemy => {
enemy.x += 1 * enemyDirection;
if (enemy.x < 0 || enemy.x + enemy.width > canvas.width) {
reverseDirection = true;
}
if (enemy.y + enemy.height >= canvas.height && enemy.type !== '₿') {
hitBottomBorder = true;
}
});
if (reverseDirection) {
enemyDirection *= -1;
enemies.forEach(enemy => {
enemy.y += 10;
});
}
enemies.forEach(enemy => {
drawSymbol(enemy.type, enemy.x, enemy.y, enemy.width, enemy.height);
});
// Check collisions
bullets.forEach((bullet, bulletIndex) => {
enemies.forEach((enemy, enemyIndex) => {
if (bullet.x < enemy.x + enemy.width &&
bullet.x + bullet.width > enemy.x &&
bullet.y < enemy.y + enemy.height &&
bullet.y + bullet.height > enemy.y) {
bullets.splice(bulletIndex, 1);
enemies.splice(enemyIndex, 1);
if (enemy.type !== '₿') {
score += 1;
showScoreChange('+1', enemy.x, enemy.y);
} else {
gameOver();
}
}
});
});
scoreElement.textContent = score;
if (enemies.length === 0 || hitBottomBorder) {
if (currentWave === maxWaves) {
gameOver(hitBottomBorder);
} else {
currentWave++;
populateEnemies();
}
}
}
function gameOver(hitBottomBorder) {
clearInterval(intervalId);
gameRunning = false;
document.getElementById('initial-screen').style.display = 'flex';
if (hitBottomBorder) {
document.getElementById('initial-screen').innerHTML = '<h1> Dont lose hope! It will come with practice</h1><button id="start-btn"> Try Again </button>';
}
else {
document.getElementById('initial-screen').innerHTML = '<h1> Oh no! You lost the control. Bitcoin is future - never hit it </h1><button id="start-btn">Try Again</button>';
}
document.getElementById('start-btn').addEventListener('click', () => {
document.getElementById('initial-screen').style.display = 'none';
startGame();
});
}
canvas.addEventListener('mousemove', function(e) {
if (!gameRunning) return;
player.x = Math.max(0, Math.min(e.offsetX - player.width / 2, canvas.width - player.width)); // Keep player within the game border
});
canvas.addEventListener('click', function(e) {
if (!gameRunning) return;
bullets.push({ x: player.x + player.width / 2, y: player.y, width: 15, height: 15 });
});
startBtn.addEventListener('click', startGame);
</script>
</body>
</html>
ID
1e59cca7a1b82494cf7c26237884996a94d0a8614296e8ed13c08f23e7d9dcb5i0
复制
Genesis Txid
UTXO
1e59cca7a1b82494cf7c26237884996a94d0a8614296e8ed13c08f23e7d9dcb5:0
Location
1e59cca7a1b82494cf7c26237884996a94d0a8614296e8ed13c08f23e7d9dcb5:0:0
UTXO Value
10000 sat
Created Time
06-18-2023 21:43:08 (Local)
Genesis Blockheight
794900
Location Blockheight
794900
Content Type
text/html;charset=utf-8
Content Size
11001 bytes