Calculator Tools Calculator Tools
Create

California Tower Game

Nov 11, 2023

About this app

Experience the thrill of jumping from the highest towers in California with a 3D game.

California Tower Game CALIFORNIA Teleport

Related apps

Put this on your site

Source

                    <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>California Tower Game</title>
<meta name="description" content="Experience the thrill of jumping from the highest towers in California with a 3D game.">
<meta name="keywords" content="game, 3D, California, towers, jump, skydive, bellyflop">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Gill+Meister+MT&display=swap" rel="stylesheet">
<style>
/* App CSS */
body {
background-color: #fafafa;
}
.game-container {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.player {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 100px;
height: 100px;
background-image: url('adam_levine.jpg');
background-size: cover;
background-position: center;
border-radius: 50%;
z-index: 1;
}
.tower {
position: relative;
width: 60px;
height: 400px;
background-color: #dcdcdc;
margin: 0 20px;
}
.crack {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-family: 'Gill Meister MT', sans-serif;
font-size: 40px;
font-weight: bold;
color: #000;
}
.teleport-button {
position: fixed;
bottom: 20px;
right: 20px;
width: 80px;
height: 80px;
background-color: #00bfff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 24px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
z-index: 2;
cursor: pointer;
transition: background-color 0.3s ease;
}
.teleport-button:hover {
background-color: #0080ff;
}
.teleport-button:active {
background-color: #0066cc;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<div class="game-container">
<div class="tower"></div>
<div class="player"></div>
</div>
<div class="crack">CALIFORNIA</div>
<div class="teleport-button" onclick="teleportToTop()">Teleport</div>
</div>

<script type="text/javascript">
try {
document.addEventListener("DOMContentLoaded", function() {
const player = document.querySelector('.player');
const tower = document.querySelector('.tower');
const crack = document.querySelector('.crack');

// Jump and skydive animation
player.addEventListener('click', function() {
player.style.animation = 'jump 1.5s ease-in-out 1 forwards';
setTimeout(() => {
player.style.animation = 'skydive 1.5s ease-in-out 1 forwards';
}, 1500);
});

// Bellyflop animation
player.addEventListener('animationend', function() {
player.style.animation = 'bellyflop 0.5s ease-in-out 1 forwards';
const height = player.offsetTop - tower.offsetTop;
const size = Math.min(100, Math.max(20, height / 4)); // Limit size to 20-100 based on height
crack.style.fontSize = size + 'px';
});

// Teleportation
function teleportToTop() {
// Replace the code inside this function with the actual teleportation logic
alert('Teleporting to the top of the tower...');
}
});
} catch (error) {
throw error;
}
</script>
</body>
</html>