2D Pac-Man Game
About this app
Play a fun 2D Pac-Man game with 6 levels and invulnerable ghosts!
2D Pac-Man Game 2D Pac-Man Game 🕹️ Score: 0 Level: 1
Related apps
Put this on your site
Source
<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>2D Pac-Man Game</title>
<meta name="description" content="Play a fun 2D Pac-Man game with 6 levels and invulnerable ghosts!">
<meta name="keywords" content="Pac-Man, Game, 2D, Ghosts, Levels">
<style>
/* App CSS Goes Here */
body, html {
height: 100%;
margin: 0;
background: #000;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-family: 'Changa One', cursive;
}
#game {
width: 600px;
height: 600px;
border: 1px solid #fff;
position: relative;
}
.pacman, .ghost {
position: absolute;
width: 20px;
height: 20px;
}
.pacman {
background: yellow;
}
.ghost {
background: red;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<!-- App HTML Goes Here -->
<h1>2D Pac-Man Game 🕹️</h1>
<h2 id="score">Score: 0</h2>
<h2 id="level">Level: 1</h2>
<div id="game">
<div class="pacman" id="pacman"></div>
<div class="ghost" id="ghost1"></div>
</div>
</div>
<script>
/* App Javascript Goes Here. Place your entire script content inside the try block for error handling. */
try {
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// TODO: Implement Game Logic Here
// This is a placeholder and needs to be replaced with actual game code
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
</body>
</html>
NEW APPS
These are apps made by the community!