mark knopfler game
Log in with itch.io to leave a comment.
MAKE SEX MOTORSPORT 2023!
⣿⣿⣿⣿⣿⣿⣿⣿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠉⠻⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢺⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠆⠜⣿⣿⣿⣿⣿⠿⠿⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠻⣿⣿⣿⣿⡏⠁⠀⠀⠀⠀⠀⣀⣠⣤⣤⣶⣶⣶⣶⣶⣦⣤⡄⠀⠀⠀⠀⢀⣴⣿⣿⣿⣷⣄⠀⠀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⡧⠇⢀⣤⣶⣿⣿⣿⣿⣿⣿⣾⣮⣭⣿⡻⣽⣒⠀⣤⣜⣭⠐⢐⣒⠢⢰⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣿⣿⡟⣾⣿⠂⢈⢿⣷⣞⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣷⣶⣾⡿⠿⣿⠗⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠻⠋⠉⠑⠀⠀⢘⢻⣿⣿⣿⣿⣿⣿⣿⡿⠟⢹⣿⣿⡇⢀⣶⣶⠴⠶⠀⠀⢽⣿⣿⣿⣿⣿⣿⡿⠀⠀⢸⣿⣿⠀⠀⠣⠀⠀⠀⠀⠀⡟⢿⣿⣿⣿⣿⡿⠟⠋⠀⠀⠀⠀⠹⣿⣧⣀⠀⠀⠀⠀⡀⣴⠁⢘⡙⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⠗⠂⠄⠀⣴⡟⠀⠀⡃
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Mark Knopfler Game</title>
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<canvas id="gameCanvas" width="800" height="600"></canvas>
<script>
// Define game variables
var canvas = document.getElementById("gameCanvas");
var ctx = canvas.getContext("2d");
var playerX = canvas.width / 3;
var playerY = canvas.height - 300;
var playerSpeed = 5;
var playerImage = new Image();
playerImage.src = "mark-knopfler.png";
var enemySpeed = 2;
var enemySpawnInterval = 60; // Number of frames between enemy spawns
var enemyImage = new Image();
enemyImage.src = "guitar-pick.png";
var enemies = [];
var score = 0;
var scoreDisplay = document.createElement("div");
scoreDisplay.style.position = "absolute";
scoreDisplay.style.top = "20px";
scoreDisplay.style.left = "20px";
scoreDisplay.style.color = "white";
scoreDisplay.style.fontFamily = "Arial";
scoreDisplay.style.fontSize = "24px";
scoreDisplay.innerHTML = "Score: " + score;
document.body.appendChild(scoreDisplay);
var gameOver = false;
var gameOverDisplay = document.createElement("div");
gameOverDisplay.style.position = "absolute";
gameOverDisplay.style.top = "50%";
gameOverDisplay.style.left = "50%";
gameOverDisplay.style.transform = "translate(-50%, -50%)";
gameOverDisplay.style.color = "white";
gameOverDisplay.style.fontFamily = "Arial";
gameOverDisplay.style.fontSize = "48px";
gameOverDisplay.style.textAlign = "center";
gameOverDisplay.innerHTML = "GAME OVER<br>Final score: " + score;
gameOverDisplay.style.display = "none";
document.body.appendChild(gameOverDisplay);
// Draw Mark Knopfler on canvas
function drawPlayer() {
ctx.drawImage(playerImage, playerX, playerY);
// Move Mark Knopfler with arrow keys
document.addEventListener("keydown", function(event) {
if (event.keyCode == 37) { // Left arrow key
playerX -= playerSpeed;
} else if (event.keyCode == 39) { // Right arrow key
playerX += playerSpeed;
});
// Spawn enemies at random positions
function spawnEnemy() {
var x = Math.random() * canvas.width;
var y = -50;
var enemy = {
x: x,
y: y
};
enemies.push(enemy);
// Draw enemies on canvas
function drawEnemies() {
for (var i = 0; i < enemies.length; i++) {
var enemy = enemies[i];
ctx.drawImage(enemyImage, enemy.x, enemy.y);
// Move enemies and check for collisions with player
function updateEnemies() {
enemy.y += enemySpeed;
if (enemy.y + enemyImage.height >= playerY && enemy.x + enemyImage.width >= playerX && enemy.x <= playerX + playerImage.width) {
gameOver = true;
enemies = enemies.filter(function(enemy) {
return enemy.y < canvas.height;
// Update score and display on screen
function updateScore() {
score++;
// Update game state and redraw canvas
function update() {
if (!gameOver) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawPlayer();
updateEnemies();
drawEnemies();
if (score % 10 == 0) {
enemySpeed += 0.1;
if (score % 20 == 0) {
enemySpawnInterval--;
if (score % 5 == 0) {
updateScore();
} else {
gameOverDisplay.style.display = "block";
// Start game loop
setInterval(function() {
spawnEnemy();
update();
}, enemySpawnInterval);
</script>
</body>
</html>
Comments
Log in with itch.io to leave a comment.
MAKE SEX MOTORSPORT 2023!
⣿⣿⣿⣿⣿⣿⣿⣿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠉⠻⣿
⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢺⣿
⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠆⠜⣿
⣿⣿⣿⣿⠿⠿⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠻⣿⣿
⣿⣿⡏⠁⠀⠀⠀⠀⠀⣀⣠⣤⣤⣶⣶⣶⣶⣶⣦⣤⡄⠀⠀⠀⠀⢀⣴⣿
⣿⣿⣷⣄⠀⠀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⡧⠇⢀⣤⣶
⣿⣿⣿⣿⣿⣿⣾⣮⣭⣿⡻⣽⣒⠀⣤⣜⣭⠐⢐⣒⠢⢰
⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣿⣿⡟⣾⣿⠂⢈⢿⣷⣞
⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣷⣶⣾⡿⠿⣿⠗⠈⢻⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠻⠋⠉⠑⠀⠀⢘⢻
⣿⣿⣿⣿⣿⣿⣿⡿⠟⢹⣿⣿⡇⢀⣶⣶⠴⠶⠀⠀⢽
⣿⣿⣿⣿⣿⣿⡿⠀⠀⢸⣿⣿⠀⠀⠣⠀⠀⠀⠀⠀⡟⢿⣿
⣿⣿⣿⡿⠟⠋⠀⠀⠀⠀⠹⣿⣧⣀⠀⠀⠀⠀⡀⣴⠁⢘⡙
⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⠗⠂⠄⠀⣴⡟⠀⠀⡃
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Mark Knopfler Game</title>
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<canvas id="gameCanvas" width="800" height="600"></canvas>
<script>
// Define game variables
var canvas = document.getElementById("gameCanvas");
var ctx = canvas.getContext("2d");
var playerX = canvas.width / 3;
var playerY = canvas.height - 300;
var playerSpeed = 5;
var playerImage = new Image();
playerImage.src = "mark-knopfler.png";
var enemySpeed = 2;
var enemySpawnInterval = 60; // Number of frames between enemy spawns
var enemyImage = new Image();
enemyImage.src = "guitar-pick.png";
var enemies = [];
var score = 0;
var scoreDisplay = document.createElement("div");
scoreDisplay.style.position = "absolute";
scoreDisplay.style.top = "20px";
scoreDisplay.style.left = "20px";
scoreDisplay.style.color = "white";
scoreDisplay.style.fontFamily = "Arial";
scoreDisplay.style.fontSize = "24px";
scoreDisplay.innerHTML = "Score: " + score;
document.body.appendChild(scoreDisplay);
var gameOver = false;
var gameOverDisplay = document.createElement("div");
gameOverDisplay.style.position = "absolute";
gameOverDisplay.style.top = "50%";
gameOverDisplay.style.left = "50%";
gameOverDisplay.style.transform = "translate(-50%, -50%)";
gameOverDisplay.style.color = "white";
gameOverDisplay.style.fontFamily = "Arial";
gameOverDisplay.style.fontSize = "48px";
gameOverDisplay.style.textAlign = "center";
gameOverDisplay.innerHTML = "GAME OVER<br>Final score: " + score;
gameOverDisplay.style.display = "none";
document.body.appendChild(gameOverDisplay);
// Draw Mark Knopfler on canvas
function drawPlayer() {
ctx.drawImage(playerImage, playerX, playerY);
}
// Move Mark Knopfler with arrow keys
document.addEventListener("keydown", function(event) {
if (event.keyCode == 37) { // Left arrow key
playerX -= playerSpeed;
} else if (event.keyCode == 39) { // Right arrow key
playerX += playerSpeed;
}
});
// Spawn enemies at random positions
function spawnEnemy() {
var x = Math.random() * canvas.width;
var y = -50;
var enemy = {
x: x,
y: y
};
enemies.push(enemy);
}
// Draw enemies on canvas
function drawEnemies() {
for (var i = 0; i < enemies.length; i++) {
var enemy = enemies[i];
ctx.drawImage(enemyImage, enemy.x, enemy.y);
}
}
// Move enemies and check for collisions with player
function updateEnemies() {
for (var i = 0; i < enemies.length; i++) {
var enemy = enemies[i];
enemy.y += enemySpeed;
if (enemy.y + enemyImage.height >= playerY && enemy.x + enemyImage.width >= playerX && enemy.x <= playerX + playerImage.width) {
gameOver = true;
}
}
enemies = enemies.filter(function(enemy) {
return enemy.y < canvas.height;
});
}
// Update score and display on screen
function updateScore() {
score++;
scoreDisplay.innerHTML = "Score: " + score;
}
// Update game state and redraw canvas
function update() {
if (!gameOver) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawPlayer();
updateEnemies();
drawEnemies();
if (score % 10 == 0) {
enemySpeed += 0.1;
}
if (score % 20 == 0) {
enemySpawnInterval--;
}
if (score % 5 == 0) {
updateScore();
}
} else {
gameOverDisplay.style.display = "block";
}
}
// Start game loop
setInterval(function() {
if (!gameOver) {
spawnEnemy();
}
update();
}, enemySpawnInterval);
</script>
</body>
</html>