Mini Game
by FlashEagle3636 lines663 bytes
https:/<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Mini Game</title>
<style>
body { margin:0; overflow:hidden; background:#222; }
#player{
width:50px;
height:50px;
background:lime;
position:absolute;
left:100px;
top:100px;
}
</style>
</head>
<body>
<div id="player"></div>
<script>
const player = document.getElementById("player");
let x = 100, y = 100;
document.addEventListener("keydown", (e)=>{
if(e.key==="ArrowLeft") x-=10;
if(e.key==="ArrowRight") x+=10;
if(e.key==="ArrowUp") y-=10;
if(e.key==="ArrowDown") y+=10;
player.style.left = x + "px";
player.style.top = y + "px";
});
</script>
</body>
</html>.ai/publishGame Source: Mini Game
Creator: FlashEagle36
Libraries: none
Complexity: simple (36 lines, 663 bytes)
The full source code is displayed above on this page.
Remix Instructions
To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: mini-game-flasheagle36" to link back to the original. Then publish at arcadelab.ai/publish.